From 5a5e62ef7aff931b94ff65a08d9386c78228055b Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:12:40 -0700 Subject: [PATCH 1/6] chore: overhaul test file layout to and fix coverage --- Makefile | 8 +- tests/address_test.go => address_test.go | 40 +- tests/api_key_test.go => api_key_test.go | 6 +- tests/batch_test.go => batch_test.go | 18 +- tests/billing_test.go => billing_test.go | 44 +- tests/bootstrap_test.go => bootstrap_test.go | 34 +- ...account_test.go => carrier_account_test.go | 68 +- ...tadata_test.go => carrier_metadata_test.go | 2 +- ...ReferralCustomerBankAccountFromStripe.yaml | 0 ...dReferralCustomerCreditCardFromStripe.yaml | 0 .../TestAddressAll.yaml | 0 .../TestAddressCreate.yaml | 0 .../TestAddressCreateAndVerify.yaml | 0 .../TestAddressCreateAndVerifyCarrier.yaml | 0 .../TestAddressCreateVerify.yaml | 0 .../TestAddressCreateVerifyCarrier.yaml | 0 .../TestAddressCreateVerifyStrict.yaml | 0 .../TestAddressGetNextPage.yaml | 0 .../TestAddressRetrieve.yaml | 0 .../TestAddressVerify.yaml | 0 .../cassettes => cassettes}/TestApiError.yaml | 0 .../TestApiErrorAlternativeFormat.yaml | 0 .../TestApiKeysAll.yaml | 0 .../TestApiKeysForChildUser.yaml | 0 .../TestApiKeysForParentUser.yaml | 0 .../TestBatchAddRemoveShipment.yaml | 0 .../cassettes => cassettes}/TestBatchAll.yaml | 0 .../cassettes => cassettes}/TestBatchBuy.yaml | 0 .../TestBatchCreate.yaml | 0 .../TestBatchCreateScanForm.yaml | 0 .../TestBatchLabel.yaml | 0 .../TestBatchRetrieve.yaml | 0 ...TestBetaCreateBankAccountClientSecret.yaml | 0 .../TestBetaCreateCreditCardClientSecret.yaml | 0 .../TestBetaReferralAddPaymentMethod.yaml | 0 .../TestBetaReferralRefundByAmount.yaml | 0 .../TestBetaReferralRefundByPaymentLogId.yaml | 0 .../TestBetaStatelessRateGetLowest.yaml | 0 .../TestBetaStatelessRateGetLowestError.yaml | 0 .../TestBetaStatelessRateRetrieve.yaml | 0 .../TestBuyLumaShipment.yaml | 0 .../TestBuyShipmentWithEndShipper.yaml | 0 .../TestCarrierAccountAll.yaml | 0 .../TestCarrierAccountCreate.yaml | 0 .../TestCarrierAccountCreateOauth.yaml | 0 .../TestCarrierAccountCreateUps.yaml | 0 ...arrierAccountCreateWithCustomWorkflow.yaml | 0 .../TestCarrierAccountDelete.yaml | 0 .../TestCarrierAccountRetrieve.yaml | 0 .../TestCarrierAccountTypes.yaml | 0 .../TestCarrierAccountUpdate.yaml | 0 .../TestCarrierAccountUpdateUps.yaml | 0 .../cassettes => cassettes}/TestClaimAll.yaml | 0 .../TestClaimCancel.yaml | 0 .../TestClaimCreate.yaml | 0 .../TestClaimGetNextPage.yaml | 0 .../TestClaimRetrieve.yaml | 0 .../TestCreateAndBuyLumaShipment.yaml | 0 .../TestCustomsInfoCreate.yaml | 0 .../TestCustomsInfoRetrieve.yaml | 0 .../TestCustomsItemCreate.yaml | 0 .../TestCustomsItemRetrieve.yaml | 0 .../TestDateTimeJSON.yaml | 0 .../TestEndShipperAll.yaml | 0 .../TestEndShipperCreate.yaml | 0 .../TestEndShipperRetrieve.yaml | 0 .../TestEndShipperUpdate.yaml | 0 .../TestErrorInheritance.yaml | 0 .../TestEstimateDeliveryDateForZipPair.yaml | 0 .../cassettes => cassettes}/TestEventAll.yaml | 0 .../TestEventRetrieve.yaml | 0 .../TestEventRetrieveAllPayloads.yaml | 0 .../TestEventRetrievePayload.yaml | 0 .../TestEventsGetNextPage.yaml | 0 .../TestGetCarrierMetadata.yaml | 0 ...etCarrierMetadataWithCarriersAndTypes.yaml | 0 .../TestGetLumaPromise.yaml | 0 .../TestGetNextPage.yaml | 0 .../TestGetNextPageWithPageSize.yaml | 0 {tests/cassettes => cassettes}/TestHooks.yaml | 0 .../TestHooksUnsubscribing.yaml | 0 .../TestInsuranceAll.yaml | 0 .../TestInsuranceCreate.yaml | 0 .../TestInsuranceGetNextPage.yaml | 0 .../TestInsuranceRefund.yaml | 0 .../TestInsuranceRetrieve.yaml | 0 .../TestMultipleHooks.yaml | 0 .../TestOrderBuyRate.yaml | 0 .../TestOrderCreate.yaml | 0 .../TestOrderGetRates.yaml | 0 .../TestOrderLowestRate.yaml | 0 .../TestOrderRetrieve.yaml | 0 .../TestParcelCreate.yaml | 0 .../TestParcelRetrieve.yaml | 0 .../TestPickupAll.yaml | 0 .../TestPickupBuy.yaml | 0 .../TestPickupCancel.yaml | 0 .../TestPickupCreate.yaml | 0 .../TestPickupLowestRate.yaml | 0 .../TestPickupRetrieve.yaml | 0 .../TestPickupsGetNextPage.yaml | 0 .../TestRateRetrieve.yaml | 0 .../TestRecommendShipDateForZipPair.yaml | 0 .../TestReferralCustomerAddCreditCard.yaml | 0 .../TestReferralCustomerAll.yaml | 0 .../TestReferralCustomerCreate.yaml | 0 .../TestReferralCustomerUpdate.yaml | 0 .../TestReferralCustomersGetNextPage.yaml | 0 .../TestRefundAll.yaml | 0 .../TestRefundCreate.yaml | 0 .../TestRefundRetrieve.yaml | 0 .../TestRefundsGetNextPage.yaml | 0 .../TestReportAll.yaml | 0 .../TestReportCreate.yaml | 0 ...stReportCustomAdditionalColumnsCreate.yaml | 0 .../TestReportCustomColumnsCreate.yaml | 0 .../TestReportRetrieve.yaml | 0 .../TestReportsGetNextPage.yaml | 0 .../TestScanFormAll.yaml | 0 .../TestScanFormCreate.yaml | 0 .../TestScanFormRetrieve.yaml | 0 .../TestScanFormsGetNextPage.yaml | 0 .../TestShipmentAll.yaml | 0 .../TestShipmentBuy.yaml | 0 .../TestShipmentConvertLabel.yaml | 0 .../TestShipmentCreate.yaml | 0 .../TestShipmentCreateEmptyObjects.yaml | 0 .../TestShipmentCreateTaxIdentifier.yaml | 0 .../TestShipmentCreateWithIds.yaml | 0 .../TestShipmentGenerateForm.yaml | 0 ...pmentGetShipmentEstimatedDeliveryDate.yaml | 0 .../TestShipmentInstanceLowestSmartRate.yaml | 0 .../TestShipmentInsure.yaml | 0 .../TestShipmentLowestRate.yaml | 0 .../TestShipmentRecommendShipDate.yaml | 0 .../TestShipmentRefund.yaml | 0 .../TestShipmentRegenerateRates.yaml | 0 .../TestShipmentRetrieve.yaml | 0 .../TestShipmentSmartrate.yaml | 0 .../TestShipmentsGetNextPage.yaml | 0 .../TestTrackerAll.yaml | 0 .../TestTrackerCreate.yaml | 0 .../TestTrackerRetrieve.yaml | 0 .../TestTrackerRetrieveBatch.yaml | 0 .../TestTrackersGetNextPage.yaml | 0 .../TestUserAllChildUsers.yaml | 0 .../TestUserCreate.yaml | 0 .../TestUserDelete.yaml | 0 .../TestUserGetNextChildUserPage.yaml | 0 .../TestUserRetrieve.yaml | 0 .../TestUserRetrieveMe.yaml | 0 .../TestUserUpdate.yaml | 0 .../TestUserUpdateBrand.yaml | 0 .../TestWebhookAll.yaml | 0 .../TestWebhookCreate.yaml | 0 .../TestWebhookCreateWithSecret.yaml | 0 .../TestWebhookDelete.yaml | 0 .../TestWebhookRetrieve.yaml | 0 .../TestWebhookUpdate.yaml | 0 .../TestWebhookUpdateWithSecret.yaml | 0 tests/claim_test.go => claim_test.go | 20 +- tests/client_test.go => client_test.go | 48 +- coverage.out | 799 ++++++++++++++++++ ...stoms_info_test.go => customs_info_test.go | 8 +- ...stoms_item_test.go => customs_item_test.go | 8 +- tests/datetime_test.go => datetime_test.go | 17 +- tests/easypost_test.go => easypost_test.go | 8 +- .../endshipper_test.go => endshipper_test.go | 12 +- tests/error_test.go => error_test.go | 142 ++-- tests/event_test.go => event_test.go | 24 +- tests/fixture_test.go => fixture_test.go | 98 ++- tests/insurance_test.go => insurance_test.go | 20 +- tests/luma_test.go => luma_test.go | 8 +- tests/order_test.go => order_test.go | 12 +- ...on_test.go => paginated_collection_test.go | 22 +- tests/parcel_test.go => parcel_test.go | 8 +- tests/pickup_test.go => pickup_test.go | 24 +- tests/rate_test.go => rate_test.go | 10 +- ...tomer_test.go => referral_customer_test.go | 36 +- tests/refund_test.go => refund_test.go | 16 +- tests/report_test.go => report_test.go | 28 +- tests/scan_form_test.go => scan_form_test.go | 16 +- tests/shipment_test.go => shipment_test.go | 44 +- .../smart_rate_test.go => smart_rate_test.go | 10 +- tests/tracker_test.go => tracker_test.go | 26 +- tests/user_test.go => user_test.go | 28 +- tests/util_test.go => util_test.go | 10 +- tests/webhook_test.go => webhook_test.go | 38 +- 188 files changed, 1242 insertions(+), 518 deletions(-) rename tests/address_test.go => address_test.go (84%) rename tests/api_key_test.go => api_key_test.go (84%) rename tests/batch_test.go => batch_test.go (86%) rename tests/billing_test.go => billing_test.go (70%) rename tests/bootstrap_test.go => bootstrap_test.go (90%) rename tests/carrier_account_test.go => carrier_account_test.go (74%) rename tests/carrier_metadata_test.go => carrier_metadata_test.go (98%) rename {tests/cassettes => cassettes}/TestAddReferralCustomerBankAccountFromStripe.yaml (100%) rename {tests/cassettes => cassettes}/TestAddReferralCustomerCreditCardFromStripe.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressAll.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressCreateAndVerify.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressCreateAndVerifyCarrier.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressCreateVerify.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressCreateVerifyCarrier.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressCreateVerifyStrict.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestAddressVerify.yaml (100%) rename {tests/cassettes => cassettes}/TestApiError.yaml (100%) rename {tests/cassettes => cassettes}/TestApiErrorAlternativeFormat.yaml (100%) rename {tests/cassettes => cassettes}/TestApiKeysAll.yaml (100%) rename {tests/cassettes => cassettes}/TestApiKeysForChildUser.yaml (100%) rename {tests/cassettes => cassettes}/TestApiKeysForParentUser.yaml (100%) rename {tests/cassettes => cassettes}/TestBatchAddRemoveShipment.yaml (100%) rename {tests/cassettes => cassettes}/TestBatchAll.yaml (100%) rename {tests/cassettes => cassettes}/TestBatchBuy.yaml (100%) rename {tests/cassettes => cassettes}/TestBatchCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestBatchCreateScanForm.yaml (100%) rename {tests/cassettes => cassettes}/TestBatchLabel.yaml (100%) rename {tests/cassettes => cassettes}/TestBatchRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaCreateBankAccountClientSecret.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaCreateCreditCardClientSecret.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaReferralAddPaymentMethod.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaReferralRefundByAmount.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaReferralRefundByPaymentLogId.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaStatelessRateGetLowest.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaStatelessRateGetLowestError.yaml (100%) rename {tests/cassettes => cassettes}/TestBetaStatelessRateRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestBuyLumaShipment.yaml (100%) rename {tests/cassettes => cassettes}/TestBuyShipmentWithEndShipper.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountAll.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountCreateOauth.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountCreateUps.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountCreateWithCustomWorkflow.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountDelete.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountTypes.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountUpdate.yaml (100%) rename {tests/cassettes => cassettes}/TestCarrierAccountUpdateUps.yaml (100%) rename {tests/cassettes => cassettes}/TestClaimAll.yaml (100%) rename {tests/cassettes => cassettes}/TestClaimCancel.yaml (100%) rename {tests/cassettes => cassettes}/TestClaimCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestClaimGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestClaimRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestCreateAndBuyLumaShipment.yaml (100%) rename {tests/cassettes => cassettes}/TestCustomsInfoCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestCustomsInfoRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestCustomsItemCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestCustomsItemRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestDateTimeJSON.yaml (100%) rename {tests/cassettes => cassettes}/TestEndShipperAll.yaml (100%) rename {tests/cassettes => cassettes}/TestEndShipperCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestEndShipperRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestEndShipperUpdate.yaml (100%) rename {tests/cassettes => cassettes}/TestErrorInheritance.yaml (100%) rename {tests/cassettes => cassettes}/TestEstimateDeliveryDateForZipPair.yaml (100%) rename {tests/cassettes => cassettes}/TestEventAll.yaml (100%) rename {tests/cassettes => cassettes}/TestEventRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestEventRetrieveAllPayloads.yaml (100%) rename {tests/cassettes => cassettes}/TestEventRetrievePayload.yaml (100%) rename {tests/cassettes => cassettes}/TestEventsGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestGetCarrierMetadata.yaml (100%) rename {tests/cassettes => cassettes}/TestGetCarrierMetadataWithCarriersAndTypes.yaml (100%) rename {tests/cassettes => cassettes}/TestGetLumaPromise.yaml (100%) rename {tests/cassettes => cassettes}/TestGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestGetNextPageWithPageSize.yaml (100%) rename {tests/cassettes => cassettes}/TestHooks.yaml (100%) rename {tests/cassettes => cassettes}/TestHooksUnsubscribing.yaml (100%) rename {tests/cassettes => cassettes}/TestInsuranceAll.yaml (100%) rename {tests/cassettes => cassettes}/TestInsuranceCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestInsuranceGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestInsuranceRefund.yaml (100%) rename {tests/cassettes => cassettes}/TestInsuranceRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestMultipleHooks.yaml (100%) rename {tests/cassettes => cassettes}/TestOrderBuyRate.yaml (100%) rename {tests/cassettes => cassettes}/TestOrderCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestOrderGetRates.yaml (100%) rename {tests/cassettes => cassettes}/TestOrderLowestRate.yaml (100%) rename {tests/cassettes => cassettes}/TestOrderRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestParcelCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestParcelRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestPickupAll.yaml (100%) rename {tests/cassettes => cassettes}/TestPickupBuy.yaml (100%) rename {tests/cassettes => cassettes}/TestPickupCancel.yaml (100%) rename {tests/cassettes => cassettes}/TestPickupCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestPickupLowestRate.yaml (100%) rename {tests/cassettes => cassettes}/TestPickupRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestPickupsGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestRateRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestRecommendShipDateForZipPair.yaml (100%) rename {tests/cassettes => cassettes}/TestReferralCustomerAddCreditCard.yaml (100%) rename {tests/cassettes => cassettes}/TestReferralCustomerAll.yaml (100%) rename {tests/cassettes => cassettes}/TestReferralCustomerCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestReferralCustomerUpdate.yaml (100%) rename {tests/cassettes => cassettes}/TestReferralCustomersGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestRefundAll.yaml (100%) rename {tests/cassettes => cassettes}/TestRefundCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestRefundRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestRefundsGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestReportAll.yaml (100%) rename {tests/cassettes => cassettes}/TestReportCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestReportCustomAdditionalColumnsCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestReportCustomColumnsCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestReportRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestReportsGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestScanFormAll.yaml (100%) rename {tests/cassettes => cassettes}/TestScanFormCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestScanFormRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestScanFormsGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentAll.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentBuy.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentConvertLabel.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentCreateEmptyObjects.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentCreateTaxIdentifier.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentCreateWithIds.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentGenerateForm.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentGetShipmentEstimatedDeliveryDate.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentInstanceLowestSmartRate.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentInsure.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentLowestRate.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentRecommendShipDate.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentRefund.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentRegenerateRates.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentSmartrate.yaml (100%) rename {tests/cassettes => cassettes}/TestShipmentsGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestTrackerAll.yaml (100%) rename {tests/cassettes => cassettes}/TestTrackerCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestTrackerRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestTrackerRetrieveBatch.yaml (100%) rename {tests/cassettes => cassettes}/TestTrackersGetNextPage.yaml (100%) rename {tests/cassettes => cassettes}/TestUserAllChildUsers.yaml (100%) rename {tests/cassettes => cassettes}/TestUserCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestUserDelete.yaml (100%) rename {tests/cassettes => cassettes}/TestUserGetNextChildUserPage.yaml (100%) rename {tests/cassettes => cassettes}/TestUserRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestUserRetrieveMe.yaml (100%) rename {tests/cassettes => cassettes}/TestUserUpdate.yaml (100%) rename {tests/cassettes => cassettes}/TestUserUpdateBrand.yaml (100%) rename {tests/cassettes => cassettes}/TestWebhookAll.yaml (100%) rename {tests/cassettes => cassettes}/TestWebhookCreate.yaml (100%) rename {tests/cassettes => cassettes}/TestWebhookCreateWithSecret.yaml (100%) rename {tests/cassettes => cassettes}/TestWebhookDelete.yaml (100%) rename {tests/cassettes => cassettes}/TestWebhookRetrieve.yaml (100%) rename {tests/cassettes => cassettes}/TestWebhookUpdate.yaml (100%) rename {tests/cassettes => cassettes}/TestWebhookUpdateWithSecret.yaml (100%) rename tests/claim_test.go => claim_test.go (84%) rename tests/client_test.go => client_test.go (71%) create mode 100644 coverage.out rename tests/customs_info_test.go => customs_info_test.go (75%) rename tests/customs_item_test.go => customs_item_test.go (75%) rename tests/datetime_test.go => datetime_test.go (82%) rename tests/easypost_test.go => easypost_test.go (84%) rename tests/endshipper_test.go => endshipper_test.go (84%) rename tests/error_test.go => error_test.go (68%) rename tests/event_test.go => event_test.go (88%) rename tests/fixture_test.go => fixture_test.go (56%) rename tests/insurance_test.go => insurance_test.go (83%) rename tests/luma_test.go => luma_test.go (79%) rename tests/order_test.go => order_test.go (86%) rename tests/paginated_collection_test.go => paginated_collection_test.go (82%) rename tests/parcel_test.go => parcel_test.go (74%) rename tests/pickup_test.go => pickup_test.go (87%) rename tests/rate_test.go => rate_test.go (82%) rename tests/referral_customer_test.go => referral_customer_test.go (84%) rename tests/refund_test.go => refund_test.go (86%) rename tests/report_test.go => report_test.go (85%) rename tests/scan_form_test.go => scan_form_test.go (82%) rename tests/shipment_test.go => shipment_test.go (90%) rename tests/smart_rate_test.go => smart_rate_test.go (90%) rename tests/tracker_test.go => tracker_test.go (79%) rename tests/user_test.go => user_test.go (82%) rename tests/util_test.go => util_test.go (56%) rename tests/webhook_test.go => webhook_test.go (80%) diff --git a/Makefile b/Makefile index 2a6a402..4d232d4 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,13 @@ clean: ## coverage - Get test coverage and open it in a browser coverage: - go clean -testcache && GOEXPERIMENT=nocoverageredesign go test ./tests -v -coverprofile=covprofile -coverpkg=./... && go tool cover -html=covprofile + go clean -testcache + go test -coverprofile=covprofile ./... + @statement_cov=$$(go tool cover -func=covprofile | grep total: | awk '{print substr($$NF, 1, length($$NF)-1)}'); \ + if [ $$(echo "$$statement_cov < 78.0" | bc) -eq 1 ]; then \ + echo "Tests passed but statement coverage failed with coverage: $$statement_cov"; \ + exit 1; \ + fi ## init-examples-submodule - Initialize the examples submodule init-examples-submodule: diff --git a/tests/address_test.go b/address_test.go similarity index 84% rename from tests/address_test.go rename to address_test.go index c7a2d00..fc9f13d 100644 --- a/tests/address_test.go +++ b/address_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestAddressCreate() { @@ -18,7 +16,7 @@ func (c *ClientTests) TestAddressCreate() { ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(address)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(address)) assert.True(strings.HasPrefix(address.ID, "adr_")) assert.Equal("388 Townsend St", address.Street1) } @@ -29,13 +27,13 @@ func (c *ClientTests) TestAddressCreateVerifyStrict() { address, err := client.CreateAddress( c.fixture.CaAddress1(), - &easypost.CreateAddressOptions{ + &CreateAddressOptions{ VerifyStrict: true, }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(address)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(address)) assert.True(strings.HasPrefix(address.ID, "adr_")) assert.Equal("388 TOWNSEND ST APT 20", address.Street1) } @@ -53,7 +51,7 @@ func (c *ClientTests) TestAddressRetrieve() { retrievedAddress, err := client.GetAddress(address.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(retrievedAddress)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(retrievedAddress)) assert.Equal(address, retrievedAddress) } @@ -62,7 +60,7 @@ func (c *ClientTests) TestAddressAll() { assert, require := c.Assert(), c.Require() addresses, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -71,7 +69,7 @@ func (c *ClientTests) TestAddressAll() { assert.LessOrEqual(len(addresses.Addresses), c.fixture.pageSize()) assert.NotNil(addresses.HasMore) for _, address := range addresses.Addresses { - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(address)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(address)) } } @@ -80,7 +78,7 @@ func (c *ClientTests) TestAddressGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -98,7 +96,7 @@ func (c *ClientTests) TestAddressGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -114,14 +112,14 @@ func (c *ClientTests) TestAddressCreateVerify() { address, err := client.CreateAddress( c.fixture.IncorrectAddress(), - &easypost.CreateAddressOptions{ + &CreateAddressOptions{ Verify: true, }, ) // Does return an address from CreateAddress even if requested verification fails require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(address)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(address)) // Delivery verification assertions deliveryVerification := address.Verifications.Delivery @@ -151,17 +149,17 @@ func (c *ClientTests) TestAddressCreateAndVerify() { // Creating normally (without specifying "verify") will make the address, perform no verifications address, err := client.CreateAddress( c.fixture.IncorrectAddress(), - &easypost.CreateAddressOptions{}, + &CreateAddressOptions{}, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(address)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(address)) assert.Nil(address.Verifications.Delivery) // Creating with verify would attempt to make the address and perform verifications address, err = client.CreateAndVerifyAddress( c.fixture.IncorrectAddress(), - &easypost.CreateAddressOptions{ + &CreateAddressOptions{ Verify: true, }, ) @@ -184,7 +182,7 @@ func (c *ClientTests) TestAddressVerify() { verifiedAddress, err := client.VerifyAddress(address.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(verifiedAddress)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(verifiedAddress)) assert.True(strings.HasPrefix(verifiedAddress.ID, "adr_")) assert.Equal("388 TOWNSEND ST APT 20", verifiedAddress.Street1) } @@ -196,14 +194,14 @@ func (c *ClientTests) TestAddressCreateVerifyCarrier() { address, err := client.CreateAddress( c.fixture.IncorrectAddress(), - &easypost.CreateAddressOptions{ + &CreateAddressOptions{ Verify: true, VerifyCarrier: "UPS", }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(address)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(address)) deliveryVerification := address.Verifications.Delivery deliveryError := deliveryVerification.Errors[0] @@ -220,13 +218,13 @@ func (c *ClientTests) TestAddressCreateAndVerifyCarrier() { address, err := client.CreateAndVerifyAddress( c.fixture.IncorrectAddress(), - &easypost.CreateAddressOptions{ + &CreateAddressOptions{ VerifyCarrier: "UPS", }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(address)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(address)) deliveryVerification := address.Verifications.Delivery deliveryError := deliveryVerification.Errors[0] diff --git a/tests/api_key_test.go b/api_key_test.go similarity index 84% rename from tests/api_key_test.go rename to api_key_test.go index 3d8422f..e085abf 100644 --- a/tests/api_key_test.go +++ b/api_key_test.go @@ -1,9 +1,7 @@ -package easypost_test +package easypost import ( "reflect" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestApiKeysAll() { @@ -39,5 +37,5 @@ func (c *ClientTests) TestApiKeysForChildUser() { require.Error(err) assert.Nil(apiKeys) - assert.Equal(reflect.TypeOf(&easypost.FilteringError{}), reflect.TypeOf(err)) + assert.Equal(reflect.TypeOf(&FilteringError{}), reflect.TypeOf(err)) } diff --git a/tests/batch_test.go b/batch_test.go similarity index 86% rename from tests/batch_test.go rename to batch_test.go index f08ac4a..12ca3f5 100644 --- a/tests/batch_test.go +++ b/batch_test.go @@ -1,4 +1,4 @@ -package easypost_test +package easypost import ( "errors" @@ -7,8 +7,6 @@ import ( "reflect" "strings" "time" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestBatchCreate() { @@ -20,7 +18,7 @@ func (c *ClientTests) TestBatchCreate() { ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Batch{}), reflect.TypeOf(batch)) + assert.Equal(reflect.TypeOf(&Batch{}), reflect.TypeOf(batch)) assert.True(strings.HasPrefix(batch.ID, "batch_")) assert.NotNil(batch.Shipments) } @@ -37,7 +35,7 @@ func (c *ClientTests) TestBatchRetrieve() { retrievedBatch, err := client.GetBatch(batch.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Batch{}), reflect.TypeOf(retrievedBatch)) + assert.Equal(reflect.TypeOf(&Batch{}), reflect.TypeOf(retrievedBatch)) assert.Equal(batch.ID, retrievedBatch.ID) } @@ -46,7 +44,7 @@ func (c *ClientTests) TestBatchAll() { assert, require := c.Assert(), c.Require() batches, err := client.ListBatches( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -55,7 +53,7 @@ func (c *ClientTests) TestBatchAll() { assert.LessOrEqual(len(batches.Batch), c.fixture.pageSize()) assert.NotNil(batches.HasMore) for _, batch := range batches.Batch { - assert.Equal(reflect.TypeOf(&easypost.Batch{}), reflect.TypeOf(batch)) + assert.Equal(reflect.TypeOf(&Batch{}), reflect.TypeOf(batch)) } } @@ -71,7 +69,7 @@ func (c *ClientTests) TestBatchBuy() { boughtBatch, err := client.BuyBatch(batch.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Batch{}), reflect.TypeOf(boughtBatch)) + assert.Equal(reflect.TypeOf(&Batch{}), reflect.TypeOf(boughtBatch)) assert.Equal(1, boughtBatch.NumShipments) } @@ -97,7 +95,7 @@ func (c *ClientTests) TestBatchCreateScanForm() { require.NoError(err) // We can't assert anything meaningful here because the scanform gets queued for generation and may not be immediately available - assert.Equal(reflect.TypeOf(&easypost.Batch{}), reflect.TypeOf(batchWithScanForm)) + assert.Equal(reflect.TypeOf(&Batch{}), reflect.TypeOf(batchWithScanForm)) } func (c *ClientTests) TestBatchAddRemoveShipment() { @@ -145,5 +143,5 @@ func (c *ClientTests) TestBatchLabel() { require.NoError(err) // We can't assert anything meaningful here because the label gets queued for generation and may not be immediately available - assert.Equal(reflect.TypeOf(&easypost.Batch{}), reflect.TypeOf(batchWithLabel)) + assert.Equal(reflect.TypeOf(&Batch{}), reflect.TypeOf(batchWithLabel)) } diff --git a/tests/billing_test.go b/billing_test.go similarity index 70% rename from tests/billing_test.go rename to billing_test.go index fed6bc4..5245610 100644 --- a/tests/billing_test.go +++ b/billing_test.go @@ -1,55 +1,53 @@ -package easypost_test +package easypost -import "github.com/EasyPost/easypost-go/v5" - -func GetBillingMockRequests() []easypost.MockRequest { - return []easypost.MockRequest{ +func GetBillingMockRequests() []MockRequest { + return []MockRequest{ { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "POST", UrlRegexPattern: "v2\\/bank_accounts\\/\\S*\\/charges$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{}`, }, }, { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "POST", UrlRegexPattern: "v2\\/credit_cards\\/\\S*\\/charges$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{}`, }, }, { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "DELETE", UrlRegexPattern: "v2\\/bank_accounts\\/\\S*$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{}`, }, }, { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "DELETE", UrlRegexPattern: "v2\\/credit_cards\\/\\S*$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{}`, }, }, { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "GET", UrlRegexPattern: "v2\\/payment_methods$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{"id": "summary_123", "primary_payment_method": {"id": "pm_123", "object": "CreditCard", "last4": "1234"}, "secondary_payment_method": {"id": "pm_123", "object": "BankAccount", "bank_name": "Mock Bank"}}`, }, @@ -63,7 +61,7 @@ func (c *ClientTests) TestDeletePaymentMethod() { client := c.MockClient(mockRequests) require := c.Require() - err := client.DeletePaymentMethod(easypost.PrimaryPaymentMethodPriority) + err := client.DeletePaymentMethod(PrimaryPaymentMethodPriority) require.NoError(err) } @@ -73,7 +71,7 @@ func (c *ClientTests) TestFundWallet() { client := c.MockClient(mockRequests) require := c.Require() - err := client.FundWallet("2000", easypost.PrimaryPaymentMethodPriority) + err := client.FundWallet("2000", PrimaryPaymentMethodPriority) require.NoError(err) } @@ -91,23 +89,23 @@ func (c *ClientTests) TestRetrievePaymentMethods() { } func (c *ClientTests) TestGetPaymentMethodInfoByObjectType() { - mockRequests := []easypost.MockRequest{ + mockRequests := []MockRequest{ { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "GET", UrlRegexPattern: "v2\\/payment_methods$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{"id": "summary_123", "primary_payment_method": {"id": "pm_123", "object": "CreditCard"}, "secondary_payment_method": {"id": "pm_123", "object": "BankAccount"}}`, }, }, { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "DELETE", UrlRegexPattern: "v2\\/credit_cards\\/pm_123$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{}`, }, @@ -120,6 +118,6 @@ func (c *ClientTests) TestGetPaymentMethodInfoByObjectType() { // getPaymentMethodObjectType is a private method, so we can't test it directly, but we can test it via DeletePaymentMethod // The mocking setup here makes it so only /v2/credit_cards/pm_123 is allowed to be called // If the method works correctly without error, we can assume it's because it found the correct payment method type - err := client.DeletePaymentMethod(easypost.PrimaryPaymentMethodPriority) + err := client.DeletePaymentMethod(PrimaryPaymentMethodPriority) require.NoError(err) } diff --git a/tests/bootstrap_test.go b/bootstrap_test.go similarity index 90% rename from tests/bootstrap_test.go rename to bootstrap_test.go index f3d0201..7f6b8ee 100644 --- a/tests/bootstrap_test.go +++ b/bootstrap_test.go @@ -1,4 +1,4 @@ -package easypost_test +package easypost import ( "bytes" @@ -13,7 +13,6 @@ import ( "testing" "time" - "github.com/EasyPost/easypost-go/v5" "github.com/dnaeon/go-vcr/cassette" "github.com/dnaeon/go-vcr/recorder" "github.com/stretchr/testify/suite" @@ -251,38 +250,38 @@ func (c *ClientTests) TearDownTest() { } // TestClient sets up the test mode client object to be used in the test -func (c *ClientTests) TestClient() *easypost.Client { - return &easypost.Client{ +func (c *ClientTests) TestClient() *Client { + return &Client{ APIKey: TestAPIKey, Client: &http.Client{Transport: c.recorder}, } } // ProdClient sets up the prod mode client object to be used in the test -func (c *ClientTests) ProdClient() *easypost.Client { - return &easypost.Client{ +func (c *ClientTests) ProdClient() *Client { + return &Client{ APIKey: ProdAPIKey, Client: &http.Client{Transport: c.recorder}, } } // PartnerClient sets up the partner user client object to be used in the test -func (c *ClientTests) PartnerClient() *easypost.Client { +func (c *ClientTests) PartnerClient() *Client { if len(PartnerAPIKey) == 0 { PartnerAPIKey = "123" } - return &easypost.Client{ + return &Client{ APIKey: PartnerAPIKey, Client: &http.Client{Transport: c.recorder}, } } // ReferralClient sets up the referral customer client object to be used in the test -func (c *ClientTests) ReferralClient() *easypost.Client { +func (c *ClientTests) ReferralClient() *Client { if len(ReferralAPIKey) == 0 { ReferralAPIKey = "123" } - return &easypost.Client{ + return &Client{ APIKey: ReferralAPIKey, Client: &http.Client{Transport: c.recorder}, } @@ -297,8 +296,8 @@ func (c *ClientTests) ReferralAPIKey() string { } // MockClient sets up the mock client object to be used in the test -func (c *ClientTests) MockClient(requests []easypost.MockRequest) *easypost.Client { - return &easypost.Client{ +func (c *ClientTests) MockClient(requests []MockRequest) *Client { + return &Client{ APIKey: "cannot_be_blank", Client: &http.Client{Transport: c.recorder}, MockRequests: requests, @@ -345,17 +344,6 @@ func TestMain(m *testing.M) { flag.Parse() testSuite := m.Run() - // Fail test suite below desired coverage - // `testSuite = 0` means it passed, CoverMode will be non-empty if run with -cover - coverageMinPercentage := 0.72 // TODO: This number for whatever reason is about ~5% lower than what the CLI reports which is the real value - if testSuite == 0 && testing.CoverMode() != "" { - coverage := testing.Coverage() - if coverage < coverageMinPercentage { - fmt.Println("Tests passed but coverage failed with coverage: ", coverage) - testSuite = -1 - } - } - // Exit once tests complete os.Exit(testSuite) } diff --git a/tests/carrier_account_test.go b/carrier_account_test.go similarity index 74% rename from tests/carrier_account_test.go rename to carrier_account_test.go index b102c27..60fe5e0 100644 --- a/tests/carrier_account_test.go +++ b/carrier_account_test.go @@ -1,14 +1,12 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) -func (c *ClientTests) GenerateCarrierAccount() (*easypost.CarrierAccount, error) { +func (c *ClientTests) GenerateCarrierAccount() (*CarrierAccount, error) { client := c.ProdClient() carrierAccount, err := client.CreateCarrierAccount(c.fixture.BasicCarrierAccount()) @@ -23,7 +21,7 @@ func (c *ClientTests) TestCarrierAccountCreate() { carrierAccount, err := c.GenerateCarrierAccount() require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CarrierAccount{}), reflect.TypeOf(carrierAccount)) + assert.Equal(reflect.TypeOf(&CarrierAccount{}), reflect.TypeOf(carrierAccount)) assert.True(strings.HasPrefix(carrierAccount.ID, "ca_")) assert.Equal("DhlEcsAccount", carrierAccount.Type) @@ -47,13 +45,13 @@ func (c *ClientTests) TestCarrierAccountCreateWithCustomWorkflow() { // FedExAcc // We're sending bad data to the API, so we expect an error require.Error(err) - var invalidRequestError *easypost.InvalidRequestError + var invalidRequestError *InvalidRequestError if errors.As(err, &invalidRequestError) { - assert.Equal(reflect.TypeOf(&easypost.InvalidRequestError{}), reflect.TypeOf(err)) + assert.Equal(reflect.TypeOf(&InvalidRequestError{}), reflect.TypeOf(err)) assert.Equal(422, invalidRequestError.StatusCode) // We expect one of the sub-errors to be regarding a missing field if errorsList, ok := invalidRequestError.Errors.([]interface{}); ok { - if fieldError, ok := errorsList[0].(*easypost.FieldError); ok { + if fieldError, ok := errorsList[0].(*FieldError); ok { assert.Equal("shipping_streets", fieldError.Field) assert.Equal("must be present and a string", fieldError.Message) } @@ -71,14 +69,14 @@ func (c *ClientTests) TestCarrierAccountPreventUsersUsingUpsAccountForGenericCre _, err := client.CreateCarrierAccount(createParameters) require.Error(err) - assert.Equal(reflect.TypeOf(&easypost.InvalidFunctionError{}), reflect.TypeOf(err)) + assert.Equal(reflect.TypeOf(&InvalidFunctionError{}), reflect.TypeOf(err)) } func (c *ClientTests) TestCarrierAccountCreateUps() { client := c.ProdClient() assert, require := c.Assert(), c.Require() - createParameters := &easypost.UpsCarrierAccountCreationParameters{ + createParameters := &UpsCarrierAccountCreationParameters{ AccountNumber: "123456789", Type: "UpsAccount", } @@ -86,7 +84,7 @@ func (c *ClientTests) TestCarrierAccountCreateUps() { carrierAccount, err := client.CreateUpsCarrierAccount(createParameters) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CarrierAccount{}), reflect.TypeOf(carrierAccount)) + assert.Equal(reflect.TypeOf(&CarrierAccount{}), reflect.TypeOf(carrierAccount)) assert.True(strings.HasPrefix(carrierAccount.ID, "ca_")) assert.Equal("UpsAccount", carrierAccount.Type) @@ -98,7 +96,7 @@ func (c *ClientTests) TestCarrierAccountPreventUsersUsingNotUpsAccountForUpsCrea client := c.ProdClient() assert, require := c.Assert(), c.Require() - createParameters := &easypost.UpsCarrierAccountCreationParameters{ + createParameters := &UpsCarrierAccountCreationParameters{ AccountNumber: "123456789", Type: "NotUpsAccount", } @@ -106,21 +104,21 @@ func (c *ClientTests) TestCarrierAccountPreventUsersUsingNotUpsAccountForUpsCrea _, err := client.CreateUpsCarrierAccount(createParameters) require.Error(err) - assert.Equal(reflect.TypeOf(&easypost.InvalidFunctionError{}), reflect.TypeOf(err)) + assert.Equal(reflect.TypeOf(&InvalidFunctionError{}), reflect.TypeOf(err)) } func (c *ClientTests) TestCarrierAccountCreateOauth() { client := c.ProdClient() assert, require := c.Assert(), c.Require() - createParameters := &easypost.CarrierAccount{ + createParameters := &CarrierAccount{ Type: "AmazonShippingAccount", } carrierAccount, err := client.CreateOauthCarrierAccount(createParameters) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CarrierAccount{}), reflect.TypeOf(carrierAccount)) + assert.Equal(reflect.TypeOf(&CarrierAccount{}), reflect.TypeOf(carrierAccount)) assert.True(strings.HasPrefix(carrierAccount.ID, "ca_")) assert.Equal("AmazonShippingAccount", carrierAccount.Type) @@ -132,14 +130,14 @@ func (c *ClientTests) TestCarrierAccountPreventUsersUsingNotOauthAccountForOauth client := c.ProdClient() assert, require := c.Assert(), c.Require() - createParameters := &easypost.CarrierAccount{ + createParameters := &CarrierAccount{ Type: "NotOauthAccount", } _, err := client.CreateOauthCarrierAccount(createParameters) require.Error(err) - assert.Equal(reflect.TypeOf(&easypost.InvalidFunctionError{}), reflect.TypeOf(err)) + assert.Equal(reflect.TypeOf(&InvalidFunctionError{}), reflect.TypeOf(err)) } func (c *ClientTests) TestCarrierAccountRetrieve() { @@ -152,7 +150,7 @@ func (c *ClientTests) TestCarrierAccountRetrieve() { retrievedCarrierAccount, err := client.GetCarrierAccount(carrierAccount.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CarrierAccount{}), reflect.TypeOf(retrievedCarrierAccount)) + assert.Equal(reflect.TypeOf(&CarrierAccount{}), reflect.TypeOf(retrievedCarrierAccount)) assert.Equal(carrierAccount, retrievedCarrierAccount) err = client.DeleteCarrierAccount(carrierAccount.ID) @@ -167,7 +165,7 @@ func (c *ClientTests) TestCarrierAccountAll() { require.NoError(err) for _, carrierAccount := range carrierAccounts { - assert.Equal(reflect.TypeOf(&easypost.CarrierAccount{}), reflect.TypeOf(carrierAccount)) + assert.Equal(reflect.TypeOf(&CarrierAccount{}), reflect.TypeOf(carrierAccount)) } } @@ -180,7 +178,7 @@ func (c *ClientTests) TestCarrierAccountUpdate() { carrierAccount, err := c.GenerateCarrierAccount() require.NoError(err) - updateParameters := &easypost.CarrierAccount{ + updateParameters := &CarrierAccount{ ID: carrierAccount.ID, Description: testDescription, } @@ -188,7 +186,7 @@ func (c *ClientTests) TestCarrierAccountUpdate() { updatedCarrierAccount, err := client.UpdateCarrierAccount(updateParameters) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CarrierAccount{}), reflect.TypeOf(updatedCarrierAccount)) + assert.Equal(reflect.TypeOf(&CarrierAccount{}), reflect.TypeOf(updatedCarrierAccount)) assert.True(strings.HasPrefix(updatedCarrierAccount.ID, "ca_")) assert.Equal(testDescription, updatedCarrierAccount.Description) @@ -199,13 +197,13 @@ func (c *ClientTests) TestCarrierAccountUpdate() { func (c *ClientTests) TestCarrierAccountPreventUsersUsingUpsAccountForGenericUpdate() { id := "ca_123" - mockRequests := []easypost.MockRequest{ + mockRequests := []MockRequest{ { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "GET", UrlRegexPattern: "v2\\/carrier_accounts/" + id + "$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{"id": "` + id + `", "type": "UpsAccount"}`, }, @@ -215,7 +213,7 @@ func (c *ClientTests) TestCarrierAccountPreventUsersUsingUpsAccountForGenericUpd client := c.MockClient(mockRequests) assert, require := c.Assert(), c.Require() - updateParameters := &easypost.CarrierAccount{ + updateParameters := &CarrierAccount{ ID: id, Description: "My custom description", } @@ -223,14 +221,14 @@ func (c *ClientTests) TestCarrierAccountPreventUsersUsingUpsAccountForGenericUpd _, err := client.UpdateCarrierAccount(updateParameters) require.Error(err) - assert.Equal(reflect.TypeOf(&easypost.InvalidFunctionError{}), reflect.TypeOf(err)) + assert.Equal(reflect.TypeOf(&InvalidFunctionError{}), reflect.TypeOf(err)) } func (c *ClientTests) TestCarrierAccountUpdateUps() { client := c.ProdClient() assert, require := c.Assert(), c.Require() - createParameters := &easypost.UpsCarrierAccountCreationParameters{ + createParameters := &UpsCarrierAccountCreationParameters{ AccountNumber: "123456789", Type: "UpsAccount", } @@ -238,14 +236,14 @@ func (c *ClientTests) TestCarrierAccountUpdateUps() { carrierAccount, err := client.CreateUpsCarrierAccount(createParameters) require.NoError(err) - updateParameters := &easypost.UpsCarrierAccountUpdateParameters{ + updateParameters := &UpsCarrierAccountUpdateParameters{ AccountNumber: "987654321", } updatedCarrierAccount, err := client.UpdateUpsCarrierAccount(carrierAccount.ID, updateParameters) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CarrierAccount{}), reflect.TypeOf(updatedCarrierAccount)) + assert.Equal(reflect.TypeOf(&CarrierAccount{}), reflect.TypeOf(updatedCarrierAccount)) assert.True(strings.HasPrefix(updatedCarrierAccount.ID, "ca_")) err = client.DeleteCarrierAccount(carrierAccount.ID) @@ -255,13 +253,13 @@ func (c *ClientTests) TestCarrierAccountUpdateUps() { func (c *ClientTests) TestCarrierAccountPreventUsersUsingNotUpsAccountForUpsUpdate() { id := "ca_123" - mockRequests := []easypost.MockRequest{ + mockRequests := []MockRequest{ { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "GET", UrlRegexPattern: "v2\\/carrier_accounts/" + id + "$", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{"id": "` + id + `", "type": "NotUpsAccount"}`, }, @@ -271,14 +269,14 @@ func (c *ClientTests) TestCarrierAccountPreventUsersUsingNotUpsAccountForUpsUpda client := c.MockClient(mockRequests) assert, require := c.Assert(), c.Require() - updateParameters := &easypost.UpsCarrierAccountUpdateParameters{ + updateParameters := &UpsCarrierAccountUpdateParameters{ AccountNumber: "987654321", } _, err := client.UpdateUpsCarrierAccount(id, updateParameters) require.Error(err) - assert.Equal(reflect.TypeOf(&easypost.InvalidFunctionError{}), reflect.TypeOf(err)) + assert.Equal(reflect.TypeOf(&InvalidFunctionError{}), reflect.TypeOf(err)) } func (c *ClientTests) TestCarrierAccountDelete() { @@ -299,5 +297,5 @@ func (c *ClientTests) TestCarrierAccountTypes() { carriersAccountTypes, err := client.GetCarrierTypes() require.NoError(err) - assert.Equal(reflect.TypeOf([]*easypost.CarrierType{}), reflect.TypeOf(carriersAccountTypes)) + assert.Equal(reflect.TypeOf([]*CarrierType{}), reflect.TypeOf(carriersAccountTypes)) } diff --git a/tests/carrier_metadata_test.go b/carrier_metadata_test.go similarity index 98% rename from tests/carrier_metadata_test.go rename to carrier_metadata_test.go index 3a5040b..c4b2dd4 100644 --- a/tests/carrier_metadata_test.go +++ b/carrier_metadata_test.go @@ -1,4 +1,4 @@ -package easypost_test +package easypost func (c *ClientTests) TestGetCarrierMetadata() { client := c.TestClient() diff --git a/tests/cassettes/TestAddReferralCustomerBankAccountFromStripe.yaml b/cassettes/TestAddReferralCustomerBankAccountFromStripe.yaml similarity index 100% rename from tests/cassettes/TestAddReferralCustomerBankAccountFromStripe.yaml rename to cassettes/TestAddReferralCustomerBankAccountFromStripe.yaml diff --git a/tests/cassettes/TestAddReferralCustomerCreditCardFromStripe.yaml b/cassettes/TestAddReferralCustomerCreditCardFromStripe.yaml similarity index 100% rename from tests/cassettes/TestAddReferralCustomerCreditCardFromStripe.yaml rename to cassettes/TestAddReferralCustomerCreditCardFromStripe.yaml diff --git a/tests/cassettes/TestAddressAll.yaml b/cassettes/TestAddressAll.yaml similarity index 100% rename from tests/cassettes/TestAddressAll.yaml rename to cassettes/TestAddressAll.yaml diff --git a/tests/cassettes/TestAddressCreate.yaml b/cassettes/TestAddressCreate.yaml similarity index 100% rename from tests/cassettes/TestAddressCreate.yaml rename to cassettes/TestAddressCreate.yaml diff --git a/tests/cassettes/TestAddressCreateAndVerify.yaml b/cassettes/TestAddressCreateAndVerify.yaml similarity index 100% rename from tests/cassettes/TestAddressCreateAndVerify.yaml rename to cassettes/TestAddressCreateAndVerify.yaml diff --git a/tests/cassettes/TestAddressCreateAndVerifyCarrier.yaml b/cassettes/TestAddressCreateAndVerifyCarrier.yaml similarity index 100% rename from tests/cassettes/TestAddressCreateAndVerifyCarrier.yaml rename to cassettes/TestAddressCreateAndVerifyCarrier.yaml diff --git a/tests/cassettes/TestAddressCreateVerify.yaml b/cassettes/TestAddressCreateVerify.yaml similarity index 100% rename from tests/cassettes/TestAddressCreateVerify.yaml rename to cassettes/TestAddressCreateVerify.yaml diff --git a/tests/cassettes/TestAddressCreateVerifyCarrier.yaml b/cassettes/TestAddressCreateVerifyCarrier.yaml similarity index 100% rename from tests/cassettes/TestAddressCreateVerifyCarrier.yaml rename to cassettes/TestAddressCreateVerifyCarrier.yaml diff --git a/tests/cassettes/TestAddressCreateVerifyStrict.yaml b/cassettes/TestAddressCreateVerifyStrict.yaml similarity index 100% rename from tests/cassettes/TestAddressCreateVerifyStrict.yaml rename to cassettes/TestAddressCreateVerifyStrict.yaml diff --git a/tests/cassettes/TestAddressGetNextPage.yaml b/cassettes/TestAddressGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestAddressGetNextPage.yaml rename to cassettes/TestAddressGetNextPage.yaml diff --git a/tests/cassettes/TestAddressRetrieve.yaml b/cassettes/TestAddressRetrieve.yaml similarity index 100% rename from tests/cassettes/TestAddressRetrieve.yaml rename to cassettes/TestAddressRetrieve.yaml diff --git a/tests/cassettes/TestAddressVerify.yaml b/cassettes/TestAddressVerify.yaml similarity index 100% rename from tests/cassettes/TestAddressVerify.yaml rename to cassettes/TestAddressVerify.yaml diff --git a/tests/cassettes/TestApiError.yaml b/cassettes/TestApiError.yaml similarity index 100% rename from tests/cassettes/TestApiError.yaml rename to cassettes/TestApiError.yaml diff --git a/tests/cassettes/TestApiErrorAlternativeFormat.yaml b/cassettes/TestApiErrorAlternativeFormat.yaml similarity index 100% rename from tests/cassettes/TestApiErrorAlternativeFormat.yaml rename to cassettes/TestApiErrorAlternativeFormat.yaml diff --git a/tests/cassettes/TestApiKeysAll.yaml b/cassettes/TestApiKeysAll.yaml similarity index 100% rename from tests/cassettes/TestApiKeysAll.yaml rename to cassettes/TestApiKeysAll.yaml diff --git a/tests/cassettes/TestApiKeysForChildUser.yaml b/cassettes/TestApiKeysForChildUser.yaml similarity index 100% rename from tests/cassettes/TestApiKeysForChildUser.yaml rename to cassettes/TestApiKeysForChildUser.yaml diff --git a/tests/cassettes/TestApiKeysForParentUser.yaml b/cassettes/TestApiKeysForParentUser.yaml similarity index 100% rename from tests/cassettes/TestApiKeysForParentUser.yaml rename to cassettes/TestApiKeysForParentUser.yaml diff --git a/tests/cassettes/TestBatchAddRemoveShipment.yaml b/cassettes/TestBatchAddRemoveShipment.yaml similarity index 100% rename from tests/cassettes/TestBatchAddRemoveShipment.yaml rename to cassettes/TestBatchAddRemoveShipment.yaml diff --git a/tests/cassettes/TestBatchAll.yaml b/cassettes/TestBatchAll.yaml similarity index 100% rename from tests/cassettes/TestBatchAll.yaml rename to cassettes/TestBatchAll.yaml diff --git a/tests/cassettes/TestBatchBuy.yaml b/cassettes/TestBatchBuy.yaml similarity index 100% rename from tests/cassettes/TestBatchBuy.yaml rename to cassettes/TestBatchBuy.yaml diff --git a/tests/cassettes/TestBatchCreate.yaml b/cassettes/TestBatchCreate.yaml similarity index 100% rename from tests/cassettes/TestBatchCreate.yaml rename to cassettes/TestBatchCreate.yaml diff --git a/tests/cassettes/TestBatchCreateScanForm.yaml b/cassettes/TestBatchCreateScanForm.yaml similarity index 100% rename from tests/cassettes/TestBatchCreateScanForm.yaml rename to cassettes/TestBatchCreateScanForm.yaml diff --git a/tests/cassettes/TestBatchLabel.yaml b/cassettes/TestBatchLabel.yaml similarity index 100% rename from tests/cassettes/TestBatchLabel.yaml rename to cassettes/TestBatchLabel.yaml diff --git a/tests/cassettes/TestBatchRetrieve.yaml b/cassettes/TestBatchRetrieve.yaml similarity index 100% rename from tests/cassettes/TestBatchRetrieve.yaml rename to cassettes/TestBatchRetrieve.yaml diff --git a/tests/cassettes/TestBetaCreateBankAccountClientSecret.yaml b/cassettes/TestBetaCreateBankAccountClientSecret.yaml similarity index 100% rename from tests/cassettes/TestBetaCreateBankAccountClientSecret.yaml rename to cassettes/TestBetaCreateBankAccountClientSecret.yaml diff --git a/tests/cassettes/TestBetaCreateCreditCardClientSecret.yaml b/cassettes/TestBetaCreateCreditCardClientSecret.yaml similarity index 100% rename from tests/cassettes/TestBetaCreateCreditCardClientSecret.yaml rename to cassettes/TestBetaCreateCreditCardClientSecret.yaml diff --git a/tests/cassettes/TestBetaReferralAddPaymentMethod.yaml b/cassettes/TestBetaReferralAddPaymentMethod.yaml similarity index 100% rename from tests/cassettes/TestBetaReferralAddPaymentMethod.yaml rename to cassettes/TestBetaReferralAddPaymentMethod.yaml diff --git a/tests/cassettes/TestBetaReferralRefundByAmount.yaml b/cassettes/TestBetaReferralRefundByAmount.yaml similarity index 100% rename from tests/cassettes/TestBetaReferralRefundByAmount.yaml rename to cassettes/TestBetaReferralRefundByAmount.yaml diff --git a/tests/cassettes/TestBetaReferralRefundByPaymentLogId.yaml b/cassettes/TestBetaReferralRefundByPaymentLogId.yaml similarity index 100% rename from tests/cassettes/TestBetaReferralRefundByPaymentLogId.yaml rename to cassettes/TestBetaReferralRefundByPaymentLogId.yaml diff --git a/tests/cassettes/TestBetaStatelessRateGetLowest.yaml b/cassettes/TestBetaStatelessRateGetLowest.yaml similarity index 100% rename from tests/cassettes/TestBetaStatelessRateGetLowest.yaml rename to cassettes/TestBetaStatelessRateGetLowest.yaml diff --git a/tests/cassettes/TestBetaStatelessRateGetLowestError.yaml b/cassettes/TestBetaStatelessRateGetLowestError.yaml similarity index 100% rename from tests/cassettes/TestBetaStatelessRateGetLowestError.yaml rename to cassettes/TestBetaStatelessRateGetLowestError.yaml diff --git a/tests/cassettes/TestBetaStatelessRateRetrieve.yaml b/cassettes/TestBetaStatelessRateRetrieve.yaml similarity index 100% rename from tests/cassettes/TestBetaStatelessRateRetrieve.yaml rename to cassettes/TestBetaStatelessRateRetrieve.yaml diff --git a/tests/cassettes/TestBuyLumaShipment.yaml b/cassettes/TestBuyLumaShipment.yaml similarity index 100% rename from tests/cassettes/TestBuyLumaShipment.yaml rename to cassettes/TestBuyLumaShipment.yaml diff --git a/tests/cassettes/TestBuyShipmentWithEndShipper.yaml b/cassettes/TestBuyShipmentWithEndShipper.yaml similarity index 100% rename from tests/cassettes/TestBuyShipmentWithEndShipper.yaml rename to cassettes/TestBuyShipmentWithEndShipper.yaml diff --git a/tests/cassettes/TestCarrierAccountAll.yaml b/cassettes/TestCarrierAccountAll.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountAll.yaml rename to cassettes/TestCarrierAccountAll.yaml diff --git a/tests/cassettes/TestCarrierAccountCreate.yaml b/cassettes/TestCarrierAccountCreate.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountCreate.yaml rename to cassettes/TestCarrierAccountCreate.yaml diff --git a/tests/cassettes/TestCarrierAccountCreateOauth.yaml b/cassettes/TestCarrierAccountCreateOauth.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountCreateOauth.yaml rename to cassettes/TestCarrierAccountCreateOauth.yaml diff --git a/tests/cassettes/TestCarrierAccountCreateUps.yaml b/cassettes/TestCarrierAccountCreateUps.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountCreateUps.yaml rename to cassettes/TestCarrierAccountCreateUps.yaml diff --git a/tests/cassettes/TestCarrierAccountCreateWithCustomWorkflow.yaml b/cassettes/TestCarrierAccountCreateWithCustomWorkflow.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountCreateWithCustomWorkflow.yaml rename to cassettes/TestCarrierAccountCreateWithCustomWorkflow.yaml diff --git a/tests/cassettes/TestCarrierAccountDelete.yaml b/cassettes/TestCarrierAccountDelete.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountDelete.yaml rename to cassettes/TestCarrierAccountDelete.yaml diff --git a/tests/cassettes/TestCarrierAccountRetrieve.yaml b/cassettes/TestCarrierAccountRetrieve.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountRetrieve.yaml rename to cassettes/TestCarrierAccountRetrieve.yaml diff --git a/tests/cassettes/TestCarrierAccountTypes.yaml b/cassettes/TestCarrierAccountTypes.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountTypes.yaml rename to cassettes/TestCarrierAccountTypes.yaml diff --git a/tests/cassettes/TestCarrierAccountUpdate.yaml b/cassettes/TestCarrierAccountUpdate.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountUpdate.yaml rename to cassettes/TestCarrierAccountUpdate.yaml diff --git a/tests/cassettes/TestCarrierAccountUpdateUps.yaml b/cassettes/TestCarrierAccountUpdateUps.yaml similarity index 100% rename from tests/cassettes/TestCarrierAccountUpdateUps.yaml rename to cassettes/TestCarrierAccountUpdateUps.yaml diff --git a/tests/cassettes/TestClaimAll.yaml b/cassettes/TestClaimAll.yaml similarity index 100% rename from tests/cassettes/TestClaimAll.yaml rename to cassettes/TestClaimAll.yaml diff --git a/tests/cassettes/TestClaimCancel.yaml b/cassettes/TestClaimCancel.yaml similarity index 100% rename from tests/cassettes/TestClaimCancel.yaml rename to cassettes/TestClaimCancel.yaml diff --git a/tests/cassettes/TestClaimCreate.yaml b/cassettes/TestClaimCreate.yaml similarity index 100% rename from tests/cassettes/TestClaimCreate.yaml rename to cassettes/TestClaimCreate.yaml diff --git a/tests/cassettes/TestClaimGetNextPage.yaml b/cassettes/TestClaimGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestClaimGetNextPage.yaml rename to cassettes/TestClaimGetNextPage.yaml diff --git a/tests/cassettes/TestClaimRetrieve.yaml b/cassettes/TestClaimRetrieve.yaml similarity index 100% rename from tests/cassettes/TestClaimRetrieve.yaml rename to cassettes/TestClaimRetrieve.yaml diff --git a/tests/cassettes/TestCreateAndBuyLumaShipment.yaml b/cassettes/TestCreateAndBuyLumaShipment.yaml similarity index 100% rename from tests/cassettes/TestCreateAndBuyLumaShipment.yaml rename to cassettes/TestCreateAndBuyLumaShipment.yaml diff --git a/tests/cassettes/TestCustomsInfoCreate.yaml b/cassettes/TestCustomsInfoCreate.yaml similarity index 100% rename from tests/cassettes/TestCustomsInfoCreate.yaml rename to cassettes/TestCustomsInfoCreate.yaml diff --git a/tests/cassettes/TestCustomsInfoRetrieve.yaml b/cassettes/TestCustomsInfoRetrieve.yaml similarity index 100% rename from tests/cassettes/TestCustomsInfoRetrieve.yaml rename to cassettes/TestCustomsInfoRetrieve.yaml diff --git a/tests/cassettes/TestCustomsItemCreate.yaml b/cassettes/TestCustomsItemCreate.yaml similarity index 100% rename from tests/cassettes/TestCustomsItemCreate.yaml rename to cassettes/TestCustomsItemCreate.yaml diff --git a/tests/cassettes/TestCustomsItemRetrieve.yaml b/cassettes/TestCustomsItemRetrieve.yaml similarity index 100% rename from tests/cassettes/TestCustomsItemRetrieve.yaml rename to cassettes/TestCustomsItemRetrieve.yaml diff --git a/tests/cassettes/TestDateTimeJSON.yaml b/cassettes/TestDateTimeJSON.yaml similarity index 100% rename from tests/cassettes/TestDateTimeJSON.yaml rename to cassettes/TestDateTimeJSON.yaml diff --git a/tests/cassettes/TestEndShipperAll.yaml b/cassettes/TestEndShipperAll.yaml similarity index 100% rename from tests/cassettes/TestEndShipperAll.yaml rename to cassettes/TestEndShipperAll.yaml diff --git a/tests/cassettes/TestEndShipperCreate.yaml b/cassettes/TestEndShipperCreate.yaml similarity index 100% rename from tests/cassettes/TestEndShipperCreate.yaml rename to cassettes/TestEndShipperCreate.yaml diff --git a/tests/cassettes/TestEndShipperRetrieve.yaml b/cassettes/TestEndShipperRetrieve.yaml similarity index 100% rename from tests/cassettes/TestEndShipperRetrieve.yaml rename to cassettes/TestEndShipperRetrieve.yaml diff --git a/tests/cassettes/TestEndShipperUpdate.yaml b/cassettes/TestEndShipperUpdate.yaml similarity index 100% rename from tests/cassettes/TestEndShipperUpdate.yaml rename to cassettes/TestEndShipperUpdate.yaml diff --git a/tests/cassettes/TestErrorInheritance.yaml b/cassettes/TestErrorInheritance.yaml similarity index 100% rename from tests/cassettes/TestErrorInheritance.yaml rename to cassettes/TestErrorInheritance.yaml diff --git a/tests/cassettes/TestEstimateDeliveryDateForZipPair.yaml b/cassettes/TestEstimateDeliveryDateForZipPair.yaml similarity index 100% rename from tests/cassettes/TestEstimateDeliveryDateForZipPair.yaml rename to cassettes/TestEstimateDeliveryDateForZipPair.yaml diff --git a/tests/cassettes/TestEventAll.yaml b/cassettes/TestEventAll.yaml similarity index 100% rename from tests/cassettes/TestEventAll.yaml rename to cassettes/TestEventAll.yaml diff --git a/tests/cassettes/TestEventRetrieve.yaml b/cassettes/TestEventRetrieve.yaml similarity index 100% rename from tests/cassettes/TestEventRetrieve.yaml rename to cassettes/TestEventRetrieve.yaml diff --git a/tests/cassettes/TestEventRetrieveAllPayloads.yaml b/cassettes/TestEventRetrieveAllPayloads.yaml similarity index 100% rename from tests/cassettes/TestEventRetrieveAllPayloads.yaml rename to cassettes/TestEventRetrieveAllPayloads.yaml diff --git a/tests/cassettes/TestEventRetrievePayload.yaml b/cassettes/TestEventRetrievePayload.yaml similarity index 100% rename from tests/cassettes/TestEventRetrievePayload.yaml rename to cassettes/TestEventRetrievePayload.yaml diff --git a/tests/cassettes/TestEventsGetNextPage.yaml b/cassettes/TestEventsGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestEventsGetNextPage.yaml rename to cassettes/TestEventsGetNextPage.yaml diff --git a/tests/cassettes/TestGetCarrierMetadata.yaml b/cassettes/TestGetCarrierMetadata.yaml similarity index 100% rename from tests/cassettes/TestGetCarrierMetadata.yaml rename to cassettes/TestGetCarrierMetadata.yaml diff --git a/tests/cassettes/TestGetCarrierMetadataWithCarriersAndTypes.yaml b/cassettes/TestGetCarrierMetadataWithCarriersAndTypes.yaml similarity index 100% rename from tests/cassettes/TestGetCarrierMetadataWithCarriersAndTypes.yaml rename to cassettes/TestGetCarrierMetadataWithCarriersAndTypes.yaml diff --git a/tests/cassettes/TestGetLumaPromise.yaml b/cassettes/TestGetLumaPromise.yaml similarity index 100% rename from tests/cassettes/TestGetLumaPromise.yaml rename to cassettes/TestGetLumaPromise.yaml diff --git a/tests/cassettes/TestGetNextPage.yaml b/cassettes/TestGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestGetNextPage.yaml rename to cassettes/TestGetNextPage.yaml diff --git a/tests/cassettes/TestGetNextPageWithPageSize.yaml b/cassettes/TestGetNextPageWithPageSize.yaml similarity index 100% rename from tests/cassettes/TestGetNextPageWithPageSize.yaml rename to cassettes/TestGetNextPageWithPageSize.yaml diff --git a/tests/cassettes/TestHooks.yaml b/cassettes/TestHooks.yaml similarity index 100% rename from tests/cassettes/TestHooks.yaml rename to cassettes/TestHooks.yaml diff --git a/tests/cassettes/TestHooksUnsubscribing.yaml b/cassettes/TestHooksUnsubscribing.yaml similarity index 100% rename from tests/cassettes/TestHooksUnsubscribing.yaml rename to cassettes/TestHooksUnsubscribing.yaml diff --git a/tests/cassettes/TestInsuranceAll.yaml b/cassettes/TestInsuranceAll.yaml similarity index 100% rename from tests/cassettes/TestInsuranceAll.yaml rename to cassettes/TestInsuranceAll.yaml diff --git a/tests/cassettes/TestInsuranceCreate.yaml b/cassettes/TestInsuranceCreate.yaml similarity index 100% rename from tests/cassettes/TestInsuranceCreate.yaml rename to cassettes/TestInsuranceCreate.yaml diff --git a/tests/cassettes/TestInsuranceGetNextPage.yaml b/cassettes/TestInsuranceGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestInsuranceGetNextPage.yaml rename to cassettes/TestInsuranceGetNextPage.yaml diff --git a/tests/cassettes/TestInsuranceRefund.yaml b/cassettes/TestInsuranceRefund.yaml similarity index 100% rename from tests/cassettes/TestInsuranceRefund.yaml rename to cassettes/TestInsuranceRefund.yaml diff --git a/tests/cassettes/TestInsuranceRetrieve.yaml b/cassettes/TestInsuranceRetrieve.yaml similarity index 100% rename from tests/cassettes/TestInsuranceRetrieve.yaml rename to cassettes/TestInsuranceRetrieve.yaml diff --git a/tests/cassettes/TestMultipleHooks.yaml b/cassettes/TestMultipleHooks.yaml similarity index 100% rename from tests/cassettes/TestMultipleHooks.yaml rename to cassettes/TestMultipleHooks.yaml diff --git a/tests/cassettes/TestOrderBuyRate.yaml b/cassettes/TestOrderBuyRate.yaml similarity index 100% rename from tests/cassettes/TestOrderBuyRate.yaml rename to cassettes/TestOrderBuyRate.yaml diff --git a/tests/cassettes/TestOrderCreate.yaml b/cassettes/TestOrderCreate.yaml similarity index 100% rename from tests/cassettes/TestOrderCreate.yaml rename to cassettes/TestOrderCreate.yaml diff --git a/tests/cassettes/TestOrderGetRates.yaml b/cassettes/TestOrderGetRates.yaml similarity index 100% rename from tests/cassettes/TestOrderGetRates.yaml rename to cassettes/TestOrderGetRates.yaml diff --git a/tests/cassettes/TestOrderLowestRate.yaml b/cassettes/TestOrderLowestRate.yaml similarity index 100% rename from tests/cassettes/TestOrderLowestRate.yaml rename to cassettes/TestOrderLowestRate.yaml diff --git a/tests/cassettes/TestOrderRetrieve.yaml b/cassettes/TestOrderRetrieve.yaml similarity index 100% rename from tests/cassettes/TestOrderRetrieve.yaml rename to cassettes/TestOrderRetrieve.yaml diff --git a/tests/cassettes/TestParcelCreate.yaml b/cassettes/TestParcelCreate.yaml similarity index 100% rename from tests/cassettes/TestParcelCreate.yaml rename to cassettes/TestParcelCreate.yaml diff --git a/tests/cassettes/TestParcelRetrieve.yaml b/cassettes/TestParcelRetrieve.yaml similarity index 100% rename from tests/cassettes/TestParcelRetrieve.yaml rename to cassettes/TestParcelRetrieve.yaml diff --git a/tests/cassettes/TestPickupAll.yaml b/cassettes/TestPickupAll.yaml similarity index 100% rename from tests/cassettes/TestPickupAll.yaml rename to cassettes/TestPickupAll.yaml diff --git a/tests/cassettes/TestPickupBuy.yaml b/cassettes/TestPickupBuy.yaml similarity index 100% rename from tests/cassettes/TestPickupBuy.yaml rename to cassettes/TestPickupBuy.yaml diff --git a/tests/cassettes/TestPickupCancel.yaml b/cassettes/TestPickupCancel.yaml similarity index 100% rename from tests/cassettes/TestPickupCancel.yaml rename to cassettes/TestPickupCancel.yaml diff --git a/tests/cassettes/TestPickupCreate.yaml b/cassettes/TestPickupCreate.yaml similarity index 100% rename from tests/cassettes/TestPickupCreate.yaml rename to cassettes/TestPickupCreate.yaml diff --git a/tests/cassettes/TestPickupLowestRate.yaml b/cassettes/TestPickupLowestRate.yaml similarity index 100% rename from tests/cassettes/TestPickupLowestRate.yaml rename to cassettes/TestPickupLowestRate.yaml diff --git a/tests/cassettes/TestPickupRetrieve.yaml b/cassettes/TestPickupRetrieve.yaml similarity index 100% rename from tests/cassettes/TestPickupRetrieve.yaml rename to cassettes/TestPickupRetrieve.yaml diff --git a/tests/cassettes/TestPickupsGetNextPage.yaml b/cassettes/TestPickupsGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestPickupsGetNextPage.yaml rename to cassettes/TestPickupsGetNextPage.yaml diff --git a/tests/cassettes/TestRateRetrieve.yaml b/cassettes/TestRateRetrieve.yaml similarity index 100% rename from tests/cassettes/TestRateRetrieve.yaml rename to cassettes/TestRateRetrieve.yaml diff --git a/tests/cassettes/TestRecommendShipDateForZipPair.yaml b/cassettes/TestRecommendShipDateForZipPair.yaml similarity index 100% rename from tests/cassettes/TestRecommendShipDateForZipPair.yaml rename to cassettes/TestRecommendShipDateForZipPair.yaml diff --git a/tests/cassettes/TestReferralCustomerAddCreditCard.yaml b/cassettes/TestReferralCustomerAddCreditCard.yaml similarity index 100% rename from tests/cassettes/TestReferralCustomerAddCreditCard.yaml rename to cassettes/TestReferralCustomerAddCreditCard.yaml diff --git a/tests/cassettes/TestReferralCustomerAll.yaml b/cassettes/TestReferralCustomerAll.yaml similarity index 100% rename from tests/cassettes/TestReferralCustomerAll.yaml rename to cassettes/TestReferralCustomerAll.yaml diff --git a/tests/cassettes/TestReferralCustomerCreate.yaml b/cassettes/TestReferralCustomerCreate.yaml similarity index 100% rename from tests/cassettes/TestReferralCustomerCreate.yaml rename to cassettes/TestReferralCustomerCreate.yaml diff --git a/tests/cassettes/TestReferralCustomerUpdate.yaml b/cassettes/TestReferralCustomerUpdate.yaml similarity index 100% rename from tests/cassettes/TestReferralCustomerUpdate.yaml rename to cassettes/TestReferralCustomerUpdate.yaml diff --git a/tests/cassettes/TestReferralCustomersGetNextPage.yaml b/cassettes/TestReferralCustomersGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestReferralCustomersGetNextPage.yaml rename to cassettes/TestReferralCustomersGetNextPage.yaml diff --git a/tests/cassettes/TestRefundAll.yaml b/cassettes/TestRefundAll.yaml similarity index 100% rename from tests/cassettes/TestRefundAll.yaml rename to cassettes/TestRefundAll.yaml diff --git a/tests/cassettes/TestRefundCreate.yaml b/cassettes/TestRefundCreate.yaml similarity index 100% rename from tests/cassettes/TestRefundCreate.yaml rename to cassettes/TestRefundCreate.yaml diff --git a/tests/cassettes/TestRefundRetrieve.yaml b/cassettes/TestRefundRetrieve.yaml similarity index 100% rename from tests/cassettes/TestRefundRetrieve.yaml rename to cassettes/TestRefundRetrieve.yaml diff --git a/tests/cassettes/TestRefundsGetNextPage.yaml b/cassettes/TestRefundsGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestRefundsGetNextPage.yaml rename to cassettes/TestRefundsGetNextPage.yaml diff --git a/tests/cassettes/TestReportAll.yaml b/cassettes/TestReportAll.yaml similarity index 100% rename from tests/cassettes/TestReportAll.yaml rename to cassettes/TestReportAll.yaml diff --git a/tests/cassettes/TestReportCreate.yaml b/cassettes/TestReportCreate.yaml similarity index 100% rename from tests/cassettes/TestReportCreate.yaml rename to cassettes/TestReportCreate.yaml diff --git a/tests/cassettes/TestReportCustomAdditionalColumnsCreate.yaml b/cassettes/TestReportCustomAdditionalColumnsCreate.yaml similarity index 100% rename from tests/cassettes/TestReportCustomAdditionalColumnsCreate.yaml rename to cassettes/TestReportCustomAdditionalColumnsCreate.yaml diff --git a/tests/cassettes/TestReportCustomColumnsCreate.yaml b/cassettes/TestReportCustomColumnsCreate.yaml similarity index 100% rename from tests/cassettes/TestReportCustomColumnsCreate.yaml rename to cassettes/TestReportCustomColumnsCreate.yaml diff --git a/tests/cassettes/TestReportRetrieve.yaml b/cassettes/TestReportRetrieve.yaml similarity index 100% rename from tests/cassettes/TestReportRetrieve.yaml rename to cassettes/TestReportRetrieve.yaml diff --git a/tests/cassettes/TestReportsGetNextPage.yaml b/cassettes/TestReportsGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestReportsGetNextPage.yaml rename to cassettes/TestReportsGetNextPage.yaml diff --git a/tests/cassettes/TestScanFormAll.yaml b/cassettes/TestScanFormAll.yaml similarity index 100% rename from tests/cassettes/TestScanFormAll.yaml rename to cassettes/TestScanFormAll.yaml diff --git a/tests/cassettes/TestScanFormCreate.yaml b/cassettes/TestScanFormCreate.yaml similarity index 100% rename from tests/cassettes/TestScanFormCreate.yaml rename to cassettes/TestScanFormCreate.yaml diff --git a/tests/cassettes/TestScanFormRetrieve.yaml b/cassettes/TestScanFormRetrieve.yaml similarity index 100% rename from tests/cassettes/TestScanFormRetrieve.yaml rename to cassettes/TestScanFormRetrieve.yaml diff --git a/tests/cassettes/TestScanFormsGetNextPage.yaml b/cassettes/TestScanFormsGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestScanFormsGetNextPage.yaml rename to cassettes/TestScanFormsGetNextPage.yaml diff --git a/tests/cassettes/TestShipmentAll.yaml b/cassettes/TestShipmentAll.yaml similarity index 100% rename from tests/cassettes/TestShipmentAll.yaml rename to cassettes/TestShipmentAll.yaml diff --git a/tests/cassettes/TestShipmentBuy.yaml b/cassettes/TestShipmentBuy.yaml similarity index 100% rename from tests/cassettes/TestShipmentBuy.yaml rename to cassettes/TestShipmentBuy.yaml diff --git a/tests/cassettes/TestShipmentConvertLabel.yaml b/cassettes/TestShipmentConvertLabel.yaml similarity index 100% rename from tests/cassettes/TestShipmentConvertLabel.yaml rename to cassettes/TestShipmentConvertLabel.yaml diff --git a/tests/cassettes/TestShipmentCreate.yaml b/cassettes/TestShipmentCreate.yaml similarity index 100% rename from tests/cassettes/TestShipmentCreate.yaml rename to cassettes/TestShipmentCreate.yaml diff --git a/tests/cassettes/TestShipmentCreateEmptyObjects.yaml b/cassettes/TestShipmentCreateEmptyObjects.yaml similarity index 100% rename from tests/cassettes/TestShipmentCreateEmptyObjects.yaml rename to cassettes/TestShipmentCreateEmptyObjects.yaml diff --git a/tests/cassettes/TestShipmentCreateTaxIdentifier.yaml b/cassettes/TestShipmentCreateTaxIdentifier.yaml similarity index 100% rename from tests/cassettes/TestShipmentCreateTaxIdentifier.yaml rename to cassettes/TestShipmentCreateTaxIdentifier.yaml diff --git a/tests/cassettes/TestShipmentCreateWithIds.yaml b/cassettes/TestShipmentCreateWithIds.yaml similarity index 100% rename from tests/cassettes/TestShipmentCreateWithIds.yaml rename to cassettes/TestShipmentCreateWithIds.yaml diff --git a/tests/cassettes/TestShipmentGenerateForm.yaml b/cassettes/TestShipmentGenerateForm.yaml similarity index 100% rename from tests/cassettes/TestShipmentGenerateForm.yaml rename to cassettes/TestShipmentGenerateForm.yaml diff --git a/tests/cassettes/TestShipmentGetShipmentEstimatedDeliveryDate.yaml b/cassettes/TestShipmentGetShipmentEstimatedDeliveryDate.yaml similarity index 100% rename from tests/cassettes/TestShipmentGetShipmentEstimatedDeliveryDate.yaml rename to cassettes/TestShipmentGetShipmentEstimatedDeliveryDate.yaml diff --git a/tests/cassettes/TestShipmentInstanceLowestSmartRate.yaml b/cassettes/TestShipmentInstanceLowestSmartRate.yaml similarity index 100% rename from tests/cassettes/TestShipmentInstanceLowestSmartRate.yaml rename to cassettes/TestShipmentInstanceLowestSmartRate.yaml diff --git a/tests/cassettes/TestShipmentInsure.yaml b/cassettes/TestShipmentInsure.yaml similarity index 100% rename from tests/cassettes/TestShipmentInsure.yaml rename to cassettes/TestShipmentInsure.yaml diff --git a/tests/cassettes/TestShipmentLowestRate.yaml b/cassettes/TestShipmentLowestRate.yaml similarity index 100% rename from tests/cassettes/TestShipmentLowestRate.yaml rename to cassettes/TestShipmentLowestRate.yaml diff --git a/tests/cassettes/TestShipmentRecommendShipDate.yaml b/cassettes/TestShipmentRecommendShipDate.yaml similarity index 100% rename from tests/cassettes/TestShipmentRecommendShipDate.yaml rename to cassettes/TestShipmentRecommendShipDate.yaml diff --git a/tests/cassettes/TestShipmentRefund.yaml b/cassettes/TestShipmentRefund.yaml similarity index 100% rename from tests/cassettes/TestShipmentRefund.yaml rename to cassettes/TestShipmentRefund.yaml diff --git a/tests/cassettes/TestShipmentRegenerateRates.yaml b/cassettes/TestShipmentRegenerateRates.yaml similarity index 100% rename from tests/cassettes/TestShipmentRegenerateRates.yaml rename to cassettes/TestShipmentRegenerateRates.yaml diff --git a/tests/cassettes/TestShipmentRetrieve.yaml b/cassettes/TestShipmentRetrieve.yaml similarity index 100% rename from tests/cassettes/TestShipmentRetrieve.yaml rename to cassettes/TestShipmentRetrieve.yaml diff --git a/tests/cassettes/TestShipmentSmartrate.yaml b/cassettes/TestShipmentSmartrate.yaml similarity index 100% rename from tests/cassettes/TestShipmentSmartrate.yaml rename to cassettes/TestShipmentSmartrate.yaml diff --git a/tests/cassettes/TestShipmentsGetNextPage.yaml b/cassettes/TestShipmentsGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestShipmentsGetNextPage.yaml rename to cassettes/TestShipmentsGetNextPage.yaml diff --git a/tests/cassettes/TestTrackerAll.yaml b/cassettes/TestTrackerAll.yaml similarity index 100% rename from tests/cassettes/TestTrackerAll.yaml rename to cassettes/TestTrackerAll.yaml diff --git a/tests/cassettes/TestTrackerCreate.yaml b/cassettes/TestTrackerCreate.yaml similarity index 100% rename from tests/cassettes/TestTrackerCreate.yaml rename to cassettes/TestTrackerCreate.yaml diff --git a/tests/cassettes/TestTrackerRetrieve.yaml b/cassettes/TestTrackerRetrieve.yaml similarity index 100% rename from tests/cassettes/TestTrackerRetrieve.yaml rename to cassettes/TestTrackerRetrieve.yaml diff --git a/tests/cassettes/TestTrackerRetrieveBatch.yaml b/cassettes/TestTrackerRetrieveBatch.yaml similarity index 100% rename from tests/cassettes/TestTrackerRetrieveBatch.yaml rename to cassettes/TestTrackerRetrieveBatch.yaml diff --git a/tests/cassettes/TestTrackersGetNextPage.yaml b/cassettes/TestTrackersGetNextPage.yaml similarity index 100% rename from tests/cassettes/TestTrackersGetNextPage.yaml rename to cassettes/TestTrackersGetNextPage.yaml diff --git a/tests/cassettes/TestUserAllChildUsers.yaml b/cassettes/TestUserAllChildUsers.yaml similarity index 100% rename from tests/cassettes/TestUserAllChildUsers.yaml rename to cassettes/TestUserAllChildUsers.yaml diff --git a/tests/cassettes/TestUserCreate.yaml b/cassettes/TestUserCreate.yaml similarity index 100% rename from tests/cassettes/TestUserCreate.yaml rename to cassettes/TestUserCreate.yaml diff --git a/tests/cassettes/TestUserDelete.yaml b/cassettes/TestUserDelete.yaml similarity index 100% rename from tests/cassettes/TestUserDelete.yaml rename to cassettes/TestUserDelete.yaml diff --git a/tests/cassettes/TestUserGetNextChildUserPage.yaml b/cassettes/TestUserGetNextChildUserPage.yaml similarity index 100% rename from tests/cassettes/TestUserGetNextChildUserPage.yaml rename to cassettes/TestUserGetNextChildUserPage.yaml diff --git a/tests/cassettes/TestUserRetrieve.yaml b/cassettes/TestUserRetrieve.yaml similarity index 100% rename from tests/cassettes/TestUserRetrieve.yaml rename to cassettes/TestUserRetrieve.yaml diff --git a/tests/cassettes/TestUserRetrieveMe.yaml b/cassettes/TestUserRetrieveMe.yaml similarity index 100% rename from tests/cassettes/TestUserRetrieveMe.yaml rename to cassettes/TestUserRetrieveMe.yaml diff --git a/tests/cassettes/TestUserUpdate.yaml b/cassettes/TestUserUpdate.yaml similarity index 100% rename from tests/cassettes/TestUserUpdate.yaml rename to cassettes/TestUserUpdate.yaml diff --git a/tests/cassettes/TestUserUpdateBrand.yaml b/cassettes/TestUserUpdateBrand.yaml similarity index 100% rename from tests/cassettes/TestUserUpdateBrand.yaml rename to cassettes/TestUserUpdateBrand.yaml diff --git a/tests/cassettes/TestWebhookAll.yaml b/cassettes/TestWebhookAll.yaml similarity index 100% rename from tests/cassettes/TestWebhookAll.yaml rename to cassettes/TestWebhookAll.yaml diff --git a/tests/cassettes/TestWebhookCreate.yaml b/cassettes/TestWebhookCreate.yaml similarity index 100% rename from tests/cassettes/TestWebhookCreate.yaml rename to cassettes/TestWebhookCreate.yaml diff --git a/tests/cassettes/TestWebhookCreateWithSecret.yaml b/cassettes/TestWebhookCreateWithSecret.yaml similarity index 100% rename from tests/cassettes/TestWebhookCreateWithSecret.yaml rename to cassettes/TestWebhookCreateWithSecret.yaml diff --git a/tests/cassettes/TestWebhookDelete.yaml b/cassettes/TestWebhookDelete.yaml similarity index 100% rename from tests/cassettes/TestWebhookDelete.yaml rename to cassettes/TestWebhookDelete.yaml diff --git a/tests/cassettes/TestWebhookRetrieve.yaml b/cassettes/TestWebhookRetrieve.yaml similarity index 100% rename from tests/cassettes/TestWebhookRetrieve.yaml rename to cassettes/TestWebhookRetrieve.yaml diff --git a/tests/cassettes/TestWebhookUpdate.yaml b/cassettes/TestWebhookUpdate.yaml similarity index 100% rename from tests/cassettes/TestWebhookUpdate.yaml rename to cassettes/TestWebhookUpdate.yaml diff --git a/tests/cassettes/TestWebhookUpdateWithSecret.yaml b/cassettes/TestWebhookUpdateWithSecret.yaml similarity index 100% rename from tests/cassettes/TestWebhookUpdateWithSecret.yaml rename to cassettes/TestWebhookUpdateWithSecret.yaml diff --git a/tests/claim_test.go b/claim_test.go similarity index 84% rename from tests/claim_test.go rename to claim_test.go index e3bb5dd..d600f1e 100644 --- a/tests/claim_test.go +++ b/claim_test.go @@ -1,15 +1,13 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strconv" "strings" - - "github.com/EasyPost/easypost-go/v5" ) -func prepareInsuredShipment(client *easypost.Client, shipmentCreateParams *easypost.Shipment, claimAmount float64) *easypost.Shipment { +func prepareInsuredShipment(client *Client, shipmentCreateParams *Shipment, claimAmount float64) *Shipment { shipment, err := client.CreateShipment(shipmentCreateParams) if err != nil { panic(err) @@ -44,7 +42,7 @@ func (c *ClientTests) TestClaimCreate() { claim, err := client.CreateClaim(createClaimParams) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Claim{}), reflect.TypeOf(claim)) + assert.Equal(reflect.TypeOf(&Claim{}), reflect.TypeOf(claim)) assert.True(strings.HasPrefix(claim.ID, "clm_")) assert.Equal(createClaimParams.TrackingCode, claim.TrackingCode) assert.Equal(claimAmountStr, claim.RequestedAmount) @@ -69,7 +67,7 @@ func (c *ClientTests) TestClaimRetrieve() { retrievedClaim, err := client.GetClaim(claim.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Claim{}), reflect.TypeOf(retrievedClaim)) + assert.Equal(reflect.TypeOf(&Claim{}), reflect.TypeOf(retrievedClaim)) assert.Equal(claim.ID, retrievedClaim.ID) } @@ -77,7 +75,7 @@ func (c *ClientTests) TestClaimAll() { client := c.TestClient() assert, require := c.Assert(), c.Require() - listClaimsParams := &easypost.ListClaimsParameters{ + listClaimsParams := &ListClaimsParameters{ PageSize: c.fixture.pageSize(), } @@ -89,7 +87,7 @@ func (c *ClientTests) TestClaimAll() { assert.LessOrEqual(len(claimsList), c.fixture.pageSize()) assert.NotNil(claims.HasMore) for _, claim := range claimsList { - assert.Equal(reflect.TypeOf(&easypost.Claim{}), reflect.TypeOf(claim)) + assert.Equal(reflect.TypeOf(&Claim{}), reflect.TypeOf(claim)) } } @@ -97,7 +95,7 @@ func (c *ClientTests) TestClaimGetNextPage() { client := c.TestClient() assert, require := c.Assert(), c.Require() - listClaimsParams := &easypost.ListClaimsParameters{ + listClaimsParams := &ListClaimsParameters{ PageSize: c.fixture.pageSize(), } @@ -116,7 +114,7 @@ func (c *ClientTests) TestClaimGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -144,7 +142,7 @@ func (c *ClientTests) TestClaimCancel() { cancelledClaim, err := client.CancelClaim(claim.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Claim{}), reflect.TypeOf(cancelledClaim)) + assert.Equal(reflect.TypeOf(&Claim{}), reflect.TypeOf(cancelledClaim)) assert.True(strings.HasPrefix(cancelledClaim.ID, "clm_")) assert.Equal("cancelled", cancelledClaim.Status) } diff --git a/tests/client_test.go b/client_test.go similarity index 71% rename from tests/client_test.go rename to client_test.go index 7c05478..8501e62 100644 --- a/tests/client_test.go +++ b/client_test.go @@ -1,18 +1,18 @@ -package easypost_test +package easypost import ( "context" - "github.com/EasyPost/easypost-go/v5" + "github.com/google/uuid" ) func (c *ClientTests) TestCreateClient() { require := c.Require() - client := easypost.New("") + client := New("") _, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -30,28 +30,28 @@ func (c *ClientTests) TestHooks() { var pairId uuid.UUID client.Hooks.AddRequestEventSubscriber( - easypost.RequestHookEventSubscriber{ - Callback: func(ctx context.Context, event easypost.RequestHookEvent) error { + RequestHookEventSubscriber{ + Callback: func(ctx context.Context, event RequestHookEvent) error { assert.Equal("GET", event.Method) - assert.Regexp("^https://api.easypost.com/v2/addresses", event.Url.String()) + // assert.Regexp("https://api.easypost.com/v2/addresses?page_size=5", event.Url.String()) pairId = event.Id requestHookCalled = true return nil }, - HookEventSubscriber: easypost.HookEventSubscriber{ + HookEventSubscriber: HookEventSubscriber{ ID: "hook_1", }, }) client.Hooks.AddResponseEventSubscriber( - easypost.ResponseHookEventSubscriber{ - Callback: func(ctx context.Context, event easypost.ResponseHookEvent) error { + ResponseHookEventSubscriber{ + Callback: func(ctx context.Context, event ResponseHookEvent) error { assert.Equal(200, event.HttpStatus) assert.Equal("GET", event.Method) assert.Equal(pairId, event.Id) responseHookCalled = true return nil }, - HookEventSubscriber: easypost.HookEventSubscriber{ + HookEventSubscriber: HookEventSubscriber{ ID: "hook_2", }, }) @@ -62,7 +62,7 @@ func (c *ClientTests) TestHooks() { // fire off a request _, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -82,22 +82,22 @@ func (c *ClientTests) TestMultipleHooks() { requestHook2Called := false client.Hooks.AddRequestEventSubscriber( - easypost.RequestHookEventSubscriber{ - Callback: func(ctx context.Context, event easypost.RequestHookEvent) error { + RequestHookEventSubscriber{ + Callback: func(ctx context.Context, event RequestHookEvent) error { requestHook1Called = true return nil }, - HookEventSubscriber: easypost.HookEventSubscriber{ + HookEventSubscriber: HookEventSubscriber{ ID: "hook_1", }, }) client.Hooks.AddRequestEventSubscriber( - easypost.RequestHookEventSubscriber{ - Callback: func(ctx context.Context, event easypost.RequestHookEvent) error { + RequestHookEventSubscriber{ + Callback: func(ctx context.Context, event RequestHookEvent) error { requestHook2Called = true return nil }, - HookEventSubscriber: easypost.HookEventSubscriber{ + HookEventSubscriber: HookEventSubscriber{ ID: "hook_2", }, }) @@ -107,7 +107,7 @@ func (c *ClientTests) TestMultipleHooks() { // fire off a request _, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -126,12 +126,12 @@ func (c *ClientTests) TestHooksUnsubscribing() { requestCallbackCallCount := 0 hookName := "hook_1" - subscriber := easypost.RequestHookEventSubscriber{ - Callback: func(ctx context.Context, event easypost.RequestHookEvent) error { + subscriber := RequestHookEventSubscriber{ + Callback: func(ctx context.Context, event RequestHookEvent) error { requestCallbackCallCount++ return nil }, - HookEventSubscriber: easypost.HookEventSubscriber{ + HookEventSubscriber: HookEventSubscriber{ ID: hookName, }, } @@ -143,7 +143,7 @@ func (c *ClientTests) TestHooksUnsubscribing() { // fire off a request _, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -158,7 +158,7 @@ func (c *ClientTests) TestHooksUnsubscribing() { // fire off a request // fire off a request _, err = client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) diff --git a/coverage.out b/coverage.out new file mode 100644 index 0000000..fe0b956 --- /dev/null +++ b/coverage.out @@ -0,0 +1,799 @@ +mode: set +github.com/EasyPost/easypost-go/v5/address.go:110.99,112.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:116.131,120.2 3 1 +github.com/EasyPost/easypost-go/v5/address.go:123.87,125.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:129.119,132.2 2 1 +github.com/EasyPost/easypost-go/v5/address.go:135.104,137.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:140.130,142.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:146.136,148.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:152.162,153.36 1 1 +github.com/EasyPost/easypost-go/v5/address.go:153.36,156.3 2 1 +github.com/EasyPost/easypost-go/v5/address.go:157.2,159.16 3 1 +github.com/EasyPost/easypost-go/v5/address.go:159.16,161.3 1 0 +github.com/EasyPost/easypost-go/v5/address.go:162.2,162.48 1 1 +github.com/EasyPost/easypost-go/v5/address.go:166.76,168.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:172.108,177.2 4 1 +github.com/EasyPost/easypost-go/v5/address.go:180.73,182.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:186.105,189.2 2 1 +github.com/EasyPost/easypost-go/v5/address.go:192.108,194.2 1 1 +github.com/EasyPost/easypost-go/v5/address.go:198.140,204.2 5 1 +github.com/EasyPost/easypost-go/v5/api_key.go:25.57,27.2 1 1 +github.com/EasyPost/easypost-go/v5/api_key.go:31.87,34.2 2 1 +github.com/EasyPost/easypost-go/v5/api_key.go:37.77,39.2 1 1 +github.com/EasyPost/easypost-go/v5/api_key.go:43.109,46.16 2 1 +github.com/EasyPost/easypost-go/v5/api_key.go:46.16,48.3 1 0 +github.com/EasyPost/easypost-go/v5/api_key.go:50.2,50.23 1 1 +github.com/EasyPost/easypost-go/v5/api_key.go:50.23,52.3 1 1 +github.com/EasyPost/easypost-go/v5/api_key.go:54.2,54.38 1 1 +github.com/EasyPost/easypost-go/v5/api_key.go:54.38,55.25 1 1 +github.com/EasyPost/easypost-go/v5/api_key.go:55.25,57.4 1 0 +github.com/EasyPost/easypost-go/v5/api_key.go:60.2,60.49 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:57.71,59.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:63.103,67.2 3 1 +github.com/EasyPost/easypost-go/v5/batch.go:70.85,72.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:76.117,79.2 2 1 +github.com/EasyPost/easypost-go/v5/batch.go:85.102,87.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:92.134,96.2 3 1 +github.com/EasyPost/easypost-go/v5/batch.go:100.107,102.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:107.139,111.2 3 1 +github.com/EasyPost/easypost-go/v5/batch.go:115.67,117.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:121.99,124.2 2 1 +github.com/EasyPost/easypost-go/v5/batch.go:127.67,129.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:133.99,136.2 2 1 +github.com/EasyPost/easypost-go/v5/batch.go:140.81,142.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:146.113,152.2 3 1 +github.com/EasyPost/easypost-go/v5/batch.go:155.87,157.2 1 1 +github.com/EasyPost/easypost-go/v5/batch.go:162.119,168.2 3 1 +github.com/EasyPost/easypost-go/v5/billing.go:9.82,11.2 1 1 +github.com/EasyPost/easypost-go/v5/billing.go:15.114,19.2 3 1 +github.com/EasyPost/easypost-go/v5/billing.go:22.88,24.2 1 1 +github.com/EasyPost/easypost-go/v5/billing.go:28.120,39.2 6 1 +github.com/EasyPost/easypost-go/v5/billing.go:42.75,44.2 1 1 +github.com/EasyPost/easypost-go/v5/billing.go:48.105,51.18 2 1 +github.com/EasyPost/easypost-go/v5/billing.go:51.18,53.3 1 0 +github.com/EasyPost/easypost-go/v5/billing.go:55.2,55.8 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:80.74,81.70 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:81.70,82.21 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:82.21,84.4 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:87.2,87.54 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:87.54,88.21 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:88.21,90.4 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:93.2,93.66 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:93.66,94.21 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:94.21,96.4 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:99.2,99.27 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:103.68,105.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:108.98,111.2 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:136.92,138.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:142.124,144.54 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:144.54,145.25 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:145.25,147.4 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:150.2,150.66 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:150.66,151.25 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:151.25,153.4 1 0 +github.com/EasyPost/easypost-go/v5/carrier.go:156.2,159.8 4 1 +github.com/EasyPost/easypost-go/v5/carrier.go:164.116,166.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:170.148,173.54 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:173.54,174.25 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:174.25,176.9 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:179.2,179.19 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:179.19,181.3 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:183.2,186.8 4 1 +github.com/EasyPost/easypost-go/v5/carrier.go:191.97,193.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:197.129,200.66 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:200.66,201.25 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:201.25,203.9 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:206.2,206.21 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:206.21,208.3 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:210.2,213.8 4 1 +github.com/EasyPost/easypost-go/v5/carrier.go:217.75,219.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:222.105,225.2 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:228.94,230.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:233.126,236.2 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:252.92,254.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:258.124,260.16 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:260.16,262.3 1 0 +github.com/EasyPost/easypost-go/v5/carrier.go:265.2,265.54 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:265.54,266.30 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:266.30,268.4 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:271.2,273.8 3 1 +github.com/EasyPost/easypost-go/v5/carrier.go:278.125,280.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:284.157,286.16 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:286.16,288.3 1 0 +github.com/EasyPost/easypost-go/v5/carrier.go:291.2,292.54 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:292.54,293.30 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:293.30,295.9 2 1 +github.com/EasyPost/easypost-go/v5/carrier.go:298.2,298.19 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:298.19,300.3 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:302.2,304.8 3 1 +github.com/EasyPost/easypost-go/v5/carrier.go:308.70,310.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier.go:313.102,315.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:58.75,60.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:63.104,65.2 1 0 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:68.98,70.2 1 0 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:73.128,75.2 1 1 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:78.140,85.21 3 1 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:85.21,87.3 1 1 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:88.2,88.18 1 1 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:88.18,90.3 1 1 +github.com/EasyPost/easypost-go/v5/carrier_metadata.go:92.2,97.8 3 1 +github.com/EasyPost/easypost-go/v5/claim.go:76.81,78.2 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:81.113,84.2 2 1 +github.com/EasyPost/easypost-go/v5/claim.go:87.92,89.2 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:92.124,97.2 3 1 +github.com/EasyPost/easypost-go/v5/claim.go:100.100,102.2 1 0 +github.com/EasyPost/easypost-go/v5/claim.go:105.126,107.2 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:110.132,112.2 1 0 +github.com/EasyPost/easypost-go/v5/claim.go:115.158,116.33 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:116.33,119.3 2 0 +github.com/EasyPost/easypost-go/v5/claim.go:120.2,122.16 3 1 +github.com/EasyPost/easypost-go/v5/claim.go:122.16,124.3 1 0 +github.com/EasyPost/easypost-go/v5/claim.go:125.2,127.18 3 1 +github.com/EasyPost/easypost-go/v5/claim.go:127.18,129.3 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:130.2,130.50 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:134.67,136.2 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:139.99,142.2 2 1 +github.com/EasyPost/easypost-go/v5/claim.go:145.70,147.2 1 1 +github.com/EasyPost/easypost-go/v5/claim.go:150.102,153.2 2 1 +github.com/EasyPost/easypost-go/v5/client.go:26.13,32.2 2 1 +github.com/EasyPost/easypost-go/v5/client.go:62.33,64.2 1 1 +github.com/EasyPost/easypost-go/v5/client.go:66.37,67.22 1 1 +github.com/EasyPost/easypost-go/v5/client.go:67.22,69.3 1 0 +github.com/EasyPost/easypost-go/v5/client.go:70.2,70.19 1 1 +github.com/EasyPost/easypost-go/v5/client.go:73.37,74.23 1 1 +github.com/EasyPost/easypost-go/v5/client.go:74.23,76.3 1 0 +github.com/EasyPost/easypost-go/v5/client.go:77.2,77.25 1 1 +github.com/EasyPost/easypost-go/v5/client.go:80.42,83.20 2 1 +github.com/EasyPost/easypost-go/v5/client.go:83.20,85.3 1 1 +github.com/EasyPost/easypost-go/v5/client.go:86.2,86.50 1 1 +github.com/EasyPost/easypost-go/v5/client.go:89.40,91.19 2 1 +github.com/EasyPost/easypost-go/v5/client.go:91.19,93.3 1 0 +github.com/EasyPost/easypost-go/v5/client.go:94.2,95.15 2 1 +github.com/EasyPost/easypost-go/v5/client.go:98.77,99.20 1 1 +github.com/EasyPost/easypost-go/v5/client.go:100.41,104.13 3 1 +github.com/EasyPost/easypost-go/v5/client.go:106.57,109.17 2 1 +github.com/EasyPost/easypost-go/v5/client.go:109.17,111.4 1 0 +github.com/EasyPost/easypost-go/v5/client.go:112.3,113.47 2 1 +github.com/EasyPost/easypost-go/v5/client.go:113.47,115.4 1 0 +github.com/EasyPost/easypost-go/v5/client.go:116.3,121.13 3 1 +github.com/EasyPost/easypost-go/v5/client.go:122.10,123.58 1 0 +github.com/EasyPost/easypost-go/v5/client.go:127.106,128.20 1 1 +github.com/EasyPost/easypost-go/v5/client.go:128.20,130.3 1 1 +github.com/EasyPost/easypost-go/v5/client.go:132.2,139.53 3 1 +github.com/EasyPost/easypost-go/v5/client.go:139.53,141.3 1 0 +github.com/EasyPost/easypost-go/v5/client.go:143.2,144.16 2 1 +github.com/EasyPost/easypost-go/v5/client.go:144.16,146.3 1 1 +github.com/EasyPost/easypost-go/v5/client.go:148.2,164.61 6 1 +github.com/EasyPost/easypost-go/v5/client.go:164.61,166.3 1 1 +github.com/EasyPost/easypost-go/v5/client.go:168.2,168.29 1 1 +github.com/EasyPost/easypost-go/v5/client.go:168.29,171.17 2 1 +github.com/EasyPost/easypost-go/v5/client.go:171.17,173.4 1 0 +github.com/EasyPost/easypost-go/v5/client.go:174.8,177.3 1 1 +github.com/EasyPost/easypost-go/v5/client.go:179.2,179.16 1 1 +github.com/EasyPost/easypost-go/v5/client.go:179.16,192.63 2 0 +github.com/EasyPost/easypost-go/v5/client.go:192.63,194.4 1 0 +github.com/EasyPost/easypost-go/v5/client.go:196.3,196.13 1 0 +github.com/EasyPost/easypost-go/v5/client.go:200.2,212.62 2 1 +github.com/EasyPost/easypost-go/v5/client.go:212.62,214.3 1 1 +github.com/EasyPost/easypost-go/v5/client.go:216.2,216.15 1 1 +github.com/EasyPost/easypost-go/v5/client.go:216.15,216.39 1 1 +github.com/EasyPost/easypost-go/v5/client.go:219.2,219.52 1 1 +github.com/EasyPost/easypost-go/v5/client.go:219.52,220.17 1 1 +github.com/EasyPost/easypost-go/v5/client.go:220.17,222.4 1 1 +github.com/EasyPost/easypost-go/v5/client.go:223.3,223.13 1 1 +github.com/EasyPost/easypost-go/v5/client.go:227.2,229.15 2 1 +github.com/EasyPost/easypost-go/v5/constants.go:3.59,5.2 1 1 +github.com/EasyPost/easypost-go/v5/constants.go:10.43,12.2 1 1 +github.com/EasyPost/easypost-go/v5/constants.go:14.55,16.2 1 1 +github.com/EasyPost/easypost-go/v5/customs.go:73.83,75.2 1 1 +github.com/EasyPost/easypost-go/v5/customs.go:80.115,84.2 3 1 +github.com/EasyPost/easypost-go/v5/customs.go:87.85,89.2 1 1 +github.com/EasyPost/easypost-go/v5/customs.go:93.117,96.2 2 1 +github.com/EasyPost/easypost-go/v5/customs.go:111.83,113.2 1 1 +github.com/EasyPost/easypost-go/v5/customs.go:118.115,122.2 3 1 +github.com/EasyPost/easypost-go/v5/customs.go:125.85,127.2 1 1 +github.com/EasyPost/easypost-go/v5/customs.go:131.117,134.2 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:10.57,12.25 1 1 +github.com/EasyPost/easypost-go/v5/datetime.go:12.25,14.3 1 0 +github.com/EasyPost/easypost-go/v5/datetime.go:16.2,20.16 3 1 +github.com/EasyPost/easypost-go/v5/datetime.go:20.16,23.3 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:26.2,27.16 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:27.16,29.3 1 0 +github.com/EasyPost/easypost-go/v5/datetime.go:30.2,31.12 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:34.51,36.2 1 1 +github.com/EasyPost/easypost-go/v5/datetime.go:38.37,40.2 1 1 +github.com/EasyPost/easypost-go/v5/datetime.go:43.72,46.2 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:48.40,50.2 1 1 +github.com/EasyPost/easypost-go/v5/datetime.go:70.106,73.2 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:76.45,78.2 1 1 +github.com/EasyPost/easypost-go/v5/datetime.go:80.60,86.16 3 1 +github.com/EasyPost/easypost-go/v5/datetime.go:86.16,89.3 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:93.2,94.16 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:94.16,97.3 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:101.2,102.16 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:102.16,105.3 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:109.2,110.16 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:110.16,113.3 2 1 +github.com/EasyPost/easypost-go/v5/datetime.go:117.2,118.16 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:118.16,121.3 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:125.2,126.16 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:126.16,129.3 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:133.2,134.16 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:134.16,137.3 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:141.2,142.16 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:142.16,145.3 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:149.2,150.16 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:150.16,153.3 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:157.2,158.16 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:158.16,161.3 2 0 +github.com/EasyPost/easypost-go/v5/datetime.go:163.2,163.8 1 0 +github.com/EasyPost/easypost-go/v5/endshipper.go:15.74,17.2 1 1 +github.com/EasyPost/easypost-go/v5/endshipper.go:21.106,27.2 3 1 +github.com/EasyPost/easypost-go/v5/endshipper.go:30.79,32.2 1 1 +github.com/EasyPost/easypost-go/v5/endshipper.go:36.111,39.2 2 1 +github.com/EasyPost/easypost-go/v5/endshipper.go:42.92,44.2 1 1 +github.com/EasyPost/easypost-go/v5/endshipper.go:48.124,51.2 2 1 +github.com/EasyPost/easypost-go/v5/endshipper.go:56.75,58.2 1 1 +github.com/EasyPost/easypost-go/v5/endshipper.go:62.107,69.2 3 1 +github.com/EasyPost/easypost-go/v5/error.go:18.39,20.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:22.57,30.56 3 0 +github.com/EasyPost/easypost-go/v5/error.go:30.56,32.3 1 0 +github.com/EasyPost/easypost-go/v5/error.go:35.2,38.12 3 0 +github.com/EasyPost/easypost-go/v5/error.go:42.68,43.29 1 1 +github.com/EasyPost/easypost-go/v5/error.go:44.21,45.30 1 1 +github.com/EasyPost/easypost-go/v5/error.go:45.30,47.4 1 1 +github.com/EasyPost/easypost-go/v5/error.go:48.30,49.30 1 1 +github.com/EasyPost/easypost-go/v5/error.go:49.30,51.4 1 1 +github.com/EasyPost/easypost-go/v5/error.go:52.10,53.48 1 1 +github.com/EasyPost/easypost-go/v5/error.go:56.2,56.17 1 1 +github.com/EasyPost/easypost-go/v5/error.go:67.37,69.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:77.47,79.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:82.54,84.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:92.41,94.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:97.56,99.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:107.45,109.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:112.64,114.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:122.47,124.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:127.69,130.2 2 1 +github.com/EasyPost/easypost-go/v5/error.go:138.55,140.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:143.70,145.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:153.56,155.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:158.72,160.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:168.43,170.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:173.60,175.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:183.47,185.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:188.68,190.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:210.35,212.33 2 1 +github.com/EasyPost/easypost-go/v5/error.go:213.14,214.16 1 1 +github.com/EasyPost/easypost-go/v5/error.go:215.45,217.41 2 1 +github.com/EasyPost/easypost-go/v5/error.go:218.10,219.28 1 0 +github.com/EasyPost/easypost-go/v5/error.go:222.2,222.19 1 1 +github.com/EasyPost/easypost-go/v5/error.go:222.19,223.19 1 1 +github.com/EasyPost/easypost-go/v5/error.go:223.19,225.4 1 1 +github.com/EasyPost/easypost-go/v5/error.go:226.3,226.17 1 0 +github.com/EasyPost/easypost-go/v5/error.go:228.2,228.18 1 0 +github.com/EasyPost/easypost-go/v5/error.go:228.18,230.3 1 0 +github.com/EasyPost/easypost-go/v5/error.go:231.2,231.51 1 0 +github.com/EasyPost/easypost-go/v5/error.go:234.35,236.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:256.42,258.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:266.42,268.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:276.46,278.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:286.46,288.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:296.46,298.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:306.48,308.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:316.40,318.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:326.39,328.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:336.37,338.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:346.41,348.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:356.40,358.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:366.37,368.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:376.50,378.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:386.35,388.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:396.39,398.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:406.44,408.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:416.41,418.2 1 1 +github.com/EasyPost/easypost-go/v5/error.go:426.43,428.2 1 0 +github.com/EasyPost/easypost-go/v5/error.go:432.60,448.43 4 1 +github.com/EasyPost/easypost-go/v5/error.go:448.43,450.28 1 1 +github.com/EasyPost/easypost-go/v5/error.go:450.28,453.36 3 1 +github.com/EasyPost/easypost-go/v5/error.go:453.36,454.51 1 1 +github.com/EasyPost/easypost-go/v5/error.go:455.24,457.33 2 1 +github.com/EasyPost/easypost-go/v5/error.go:457.33,458.32 1 1 +github.com/EasyPost/easypost-go/v5/error.go:459.35,461.50 2 1 +github.com/EasyPost/easypost-go/v5/error.go:461.50,463.9 1 1 +github.com/EasyPost/easypost-go/v5/error.go:464.8,464.54 1 1 +github.com/EasyPost/easypost-go/v5/error.go:464.54,466.9 1 1 +github.com/EasyPost/easypost-go/v5/error.go:467.8,467.60 1 1 +github.com/EasyPost/easypost-go/v5/error.go:467.60,469.9 1 0 +github.com/EasyPost/easypost-go/v5/error.go:470.8,470.49 1 1 +github.com/EasyPost/easypost-go/v5/error.go:471.15,472.54 1 1 +github.com/EasyPost/easypost-go/v5/error.go:475.6,475.33 1 1 +github.com/EasyPost/easypost-go/v5/error.go:476.13,477.30 1 0 +github.com/EasyPost/easypost-go/v5/error.go:481.8,483.28 1 1 +github.com/EasyPost/easypost-go/v5/error.go:483.28,485.4 1 1 +github.com/EasyPost/easypost-go/v5/error.go:486.3,488.36 3 1 +github.com/EasyPost/easypost-go/v5/error.go:492.2,492.29 1 1 +github.com/EasyPost/easypost-go/v5/error.go:493.9,494.47 1 1 +github.com/EasyPost/easypost-go/v5/error.go:495.26,496.42 1 1 +github.com/EasyPost/easypost-go/v5/error.go:497.51,498.45 1 1 +github.com/EasyPost/easypost-go/v5/error.go:499.11,500.47 1 1 +github.com/EasyPost/easypost-go/v5/error.go:501.11,502.49 1 1 +github.com/EasyPost/easypost-go/v5/error.go:503.11,504.44 1 1 +github.com/EasyPost/easypost-go/v5/error.go:505.11,506.46 1 1 +github.com/EasyPost/easypost-go/v5/error.go:507.11,508.45 1 1 +github.com/EasyPost/easypost-go/v5/error.go:509.11,510.53 1 1 +github.com/EasyPost/easypost-go/v5/error.go:511.11,512.42 1 1 +github.com/EasyPost/easypost-go/v5/error.go:513.11,514.44 1 1 +github.com/EasyPost/easypost-go/v5/error.go:515.11,516.51 1 1 +github.com/EasyPost/easypost-go/v5/error.go:517.11,518.46 1 1 +github.com/EasyPost/easypost-go/v5/error.go:519.11,520.51 1 1 +github.com/EasyPost/easypost-go/v5/error.go:521.11,522.55 1 1 +github.com/EasyPost/easypost-go/v5/error.go:523.16,524.51 1 1 +github.com/EasyPost/easypost-go/v5/error.go:525.10,526.48 1 1 +github.com/EasyPost/easypost-go/v5/event.go:65.56,70.68 4 1 +github.com/EasyPost/easypost-go/v5/event.go:70.68,72.3 1 0 +github.com/EasyPost/easypost-go/v5/event.go:74.2,74.62 1 1 +github.com/EasyPost/easypost-go/v5/event.go:74.62,76.3 1 1 +github.com/EasyPost/easypost-go/v5/event.go:78.2,78.12 1 1 +github.com/EasyPost/easypost-go/v5/event.go:83.63,88.70 4 0 +github.com/EasyPost/easypost-go/v5/event.go:88.70,90.3 1 0 +github.com/EasyPost/easypost-go/v5/event.go:93.2,93.64 1 0 +github.com/EasyPost/easypost-go/v5/event.go:93.64,95.3 1 0 +github.com/EasyPost/easypost-go/v5/event.go:99.2,99.75 1 0 +github.com/EasyPost/easypost-go/v5/event.go:99.75,101.3 1 0 +github.com/EasyPost/easypost-go/v5/event.go:103.2,104.12 2 0 +github.com/EasyPost/easypost-go/v5/event.go:108.83,110.2 1 1 +github.com/EasyPost/easypost-go/v5/event.go:114.115,117.2 2 1 +github.com/EasyPost/easypost-go/v5/event.go:120.100,122.2 1 0 +github.com/EasyPost/easypost-go/v5/event.go:125.126,127.2 1 1 +github.com/EasyPost/easypost-go/v5/event.go:131.132,133.2 1 0 +github.com/EasyPost/easypost-go/v5/event.go:137.158,138.33 1 1 +github.com/EasyPost/easypost-go/v5/event.go:138.33,141.3 2 0 +github.com/EasyPost/easypost-go/v5/event.go:142.2,144.16 3 1 +github.com/EasyPost/easypost-go/v5/event.go:144.16,146.3 1 0 +github.com/EasyPost/easypost-go/v5/event.go:147.2,147.45 1 1 +github.com/EasyPost/easypost-go/v5/event.go:151.67,153.2 1 1 +github.com/EasyPost/easypost-go/v5/event.go:157.99,160.2 2 1 +github.com/EasyPost/easypost-go/v5/event.go:163.85,165.2 1 1 +github.com/EasyPost/easypost-go/v5/event.go:169.117,172.2 2 1 +github.com/EasyPost/easypost-go/v5/event.go:175.92,177.2 1 1 +github.com/EasyPost/easypost-go/v5/event.go:181.124,184.2 2 1 +github.com/EasyPost/easypost-go/v5/hooks.go:42.90,44.16 2 1 +github.com/EasyPost/easypost-go/v5/hooks.go:44.16,46.3 1 0 +github.com/EasyPost/easypost-go/v5/hooks.go:72.92,74.16 2 1 +github.com/EasyPost/easypost-go/v5/hooks.go:74.16,76.3 1 0 +github.com/EasyPost/easypost-go/v5/hooks.go:86.82,88.2 1 1 +github.com/EasyPost/easypost-go/v5/hooks.go:91.84,93.2 1 1 +github.com/EasyPost/easypost-go/v5/hooks.go:96.85,97.54 1 1 +github.com/EasyPost/easypost-go/v5/hooks.go:97.54,98.30 1 1 +github.com/EasyPost/easypost-go/v5/hooks.go:98.30,101.4 2 1 +github.com/EasyPost/easypost-go/v5/hooks.go:106.87,107.55 1 0 +github.com/EasyPost/easypost-go/v5/hooks.go:107.55,108.30 1 0 +github.com/EasyPost/easypost-go/v5/hooks.go:108.30,111.4 2 0 +github.com/EasyPost/easypost-go/v5/insurance.go:57.77,59.2 1 1 +github.com/EasyPost/easypost-go/v5/insurance.go:63.109,67.2 3 1 +github.com/EasyPost/easypost-go/v5/insurance.go:70.91,72.2 1 1 +github.com/EasyPost/easypost-go/v5/insurance.go:76.123,79.2 2 1 +github.com/EasyPost/easypost-go/v5/insurance.go:82.112,84.2 1 0 +github.com/EasyPost/easypost-go/v5/insurance.go:87.138,89.2 1 1 +github.com/EasyPost/easypost-go/v5/insurance.go:93.144,95.2 1 0 +github.com/EasyPost/easypost-go/v5/insurance.go:99.170,100.37 1 1 +github.com/EasyPost/easypost-go/v5/insurance.go:100.37,103.3 2 0 +github.com/EasyPost/easypost-go/v5/insurance.go:104.2,106.16 3 1 +github.com/EasyPost/easypost-go/v5/insurance.go:106.16,108.3 1 0 +github.com/EasyPost/easypost-go/v5/insurance.go:109.2,109.49 1 1 +github.com/EasyPost/easypost-go/v5/insurance.go:113.79,115.2 1 1 +github.com/EasyPost/easypost-go/v5/insurance.go:119.111,122.2 2 1 +github.com/EasyPost/easypost-go/v5/insurance.go:125.82,127.2 1 1 +github.com/EasyPost/easypost-go/v5/insurance.go:131.114,134.2 2 1 +github.com/EasyPost/easypost-go/v5/list_options.go:14.98,15.14 1 1 +github.com/EasyPost/easypost-go/v5/list_options.go:15.14,18.3 2 1 +github.com/EasyPost/easypost-go/v5/list_options.go:19.2,22.18 2 1 +github.com/EasyPost/easypost-go/v5/list_options.go:22.18,24.3 1 1 +github.com/EasyPost/easypost-go/v5/list_options.go:25.2,25.8 1 1 +github.com/EasyPost/easypost-go/v5/list_options.go:30.107,31.14 1 1 +github.com/EasyPost/easypost-go/v5/list_options.go:31.14,34.3 2 0 +github.com/EasyPost/easypost-go/v5/list_options.go:35.2,38.18 2 1 +github.com/EasyPost/easypost-go/v5/list_options.go:38.18,40.3 1 1 +github.com/EasyPost/easypost-go/v5/list_options.go:41.2,41.8 1 1 +github.com/EasyPost/easypost-go/v5/luma.go:47.77,49.2 1 1 +github.com/EasyPost/easypost-go/v5/luma.go:53.109,61.2 5 1 +github.com/EasyPost/easypost-go/v5/mocking.go:20.60,22.2 1 1 +github.com/EasyPost/easypost-go/v5/mocking.go:29.63,38.2 1 1 +github.com/EasyPost/easypost-go/v5/mocking.go:40.76,41.41 1 1 +github.com/EasyPost/easypost-go/v5/mocking.go:41.41,45.30 4 1 +github.com/EasyPost/easypost-go/v5/mocking.go:45.30,47.4 1 1 +github.com/EasyPost/easypost-go/v5/mocking.go:49.2,49.12 1 0 +github.com/EasyPost/easypost-go/v5/object.go:14.60,15.20 1 1 +github.com/EasyPost/easypost-go/v5/object.go:15.20,17.3 1 1 +github.com/EasyPost/easypost-go/v5/object.go:19.2,23.51 2 1 +github.com/EasyPost/easypost-go/v5/object.go:23.51,25.3 1 0 +github.com/EasyPost/easypost-go/v5/object.go:27.2,28.20 2 1 +github.com/EasyPost/easypost-go/v5/object.go:29.17,30.24 1 0 +github.com/EasyPost/easypost-go/v5/object.go:31.16,32.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:33.15,34.22 1 0 +github.com/EasyPost/easypost-go/v5/object.go:35.24,36.31 1 0 +github.com/EasyPost/easypost-go/v5/object.go:37.23,38.38 1 0 +github.com/EasyPost/easypost-go/v5/object.go:39.21,40.28 1 0 +github.com/EasyPost/easypost-go/v5/object.go:41.21,42.28 1 0 +github.com/EasyPost/easypost-go/v5/object.go:43.21,44.28 1 0 +github.com/EasyPost/easypost-go/v5/object.go:45.15,46.22 1 0 +github.com/EasyPost/easypost-go/v5/object.go:47.14,48.21 1 0 +github.com/EasyPost/easypost-go/v5/object.go:49.19,50.26 1 0 +github.com/EasyPost/easypost-go/v5/object.go:51.15,52.22 1 0 +github.com/EasyPost/easypost-go/v5/object.go:53.16,54.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:55.17,56.29 1 0 +github.com/EasyPost/easypost-go/v5/object.go:57.20,58.27 1 0 +github.com/EasyPost/easypost-go/v5/object.go:59.26,60.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:61.16,62.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:63.22,64.29 1 0 +github.com/EasyPost/easypost-go/v5/object.go:65.14,66.21 1 0 +github.com/EasyPost/easypost-go/v5/object.go:67.16,68.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:69.22,70.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:71.18,72.25 1 0 +github.com/EasyPost/easypost-go/v5/object.go:73.18,74.25 1 0 +github.com/EasyPost/easypost-go/v5/object.go:75.31,76.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:77.24,78.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:79.17,80.24 1 1 +github.com/EasyPost/easypost-go/v5/object.go:81.23,82.23 1 0 +github.com/EasyPost/easypost-go/v5/object.go:83.24,84.31 1 0 +github.com/EasyPost/easypost-go/v5/object.go:85.26,86.33 1 0 +github.com/EasyPost/easypost-go/v5/object.go:87.14,88.21 1 0 +github.com/EasyPost/easypost-go/v5/object.go:89.17,90.24 1 0 +github.com/EasyPost/easypost-go/v5/object.go:96.2,96.54 1 1 +github.com/EasyPost/easypost-go/v5/object.go:96.54,98.3 1 0 +github.com/EasyPost/easypost-go/v5/object.go:100.2,100.20 1 1 +github.com/EasyPost/easypost-go/v5/order.go:63.94,65.2 1 1 +github.com/EasyPost/easypost-go/v5/order.go:69.126,74.2 4 1 +github.com/EasyPost/easypost-go/v5/order.go:77.67,79.2 1 1 +github.com/EasyPost/easypost-go/v5/order.go:83.99,86.2 2 1 +github.com/EasyPost/easypost-go/v5/order.go:89.72,91.2 1 1 +github.com/EasyPost/easypost-go/v5/order.go:95.104,98.2 2 1 +github.com/EasyPost/easypost-go/v5/order.go:105.85,107.2 1 1 +github.com/EasyPost/easypost-go/v5/order.go:111.117,118.2 3 1 +github.com/EasyPost/easypost-go/v5/order.go:121.70,123.2 1 1 +github.com/EasyPost/easypost-go/v5/order.go:127.100,129.2 1 1 +github.com/EasyPost/easypost-go/v5/order.go:133.129,135.2 1 1 +github.com/EasyPost/easypost-go/v5/parcel.go:37.68,39.2 1 1 +github.com/EasyPost/easypost-go/v5/parcel.go:43.100,46.2 2 1 +github.com/EasyPost/easypost-go/v5/parcel.go:49.70,51.2 1 1 +github.com/EasyPost/easypost-go/v5/parcel.go:55.102,58.2 2 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:40.109,41.35 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:41.35,43.3 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:43.8,43.43 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:43.43,45.3 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:45.8,47.3 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:48.2,48.8 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:52.96,54.27 2 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:55.29,56.23 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:57.30,58.24 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:59.10,60.61 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:62.2,62.8 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:66.115,68.16 2 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:68.16,70.3 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:72.2,72.18 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:73.36,74.44 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:75.38,76.46 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:79.2,79.16 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:79.16,81.3 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:83.2,83.17 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:87.112,88.28 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:89.36,90.18 1 1 +github.com/EasyPost/easypost-go/v5/payment_method.go:91.38,92.20 1 0 +github.com/EasyPost/easypost-go/v5/payment_method.go:95.2,95.8 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:70.68,72.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:76.100,79.2 2 1 +github.com/EasyPost/easypost-go/v5/pickup.go:82.70,84.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:88.102,91.2 2 1 +github.com/EasyPost/easypost-go/v5/pickup.go:98.88,100.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:104.120,111.2 3 1 +github.com/EasyPost/easypost-go/v5/pickup.go:114.73,116.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:120.105,123.2 2 1 +github.com/EasyPost/easypost-go/v5/pickup.go:126.79,128.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:132.109,134.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:138.138,140.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:143.84,145.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:149.116,152.2 2 1 +github.com/EasyPost/easypost-go/v5/pickup.go:155.101,157.2 1 0 +github.com/EasyPost/easypost-go/v5/pickup.go:160.127,162.2 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:166.133,168.2 1 0 +github.com/EasyPost/easypost-go/v5/pickup.go:172.159,173.34 1 1 +github.com/EasyPost/easypost-go/v5/pickup.go:173.34,176.3 2 0 +github.com/EasyPost/easypost-go/v5/pickup.go:177.2,179.16 3 1 +github.com/EasyPost/easypost-go/v5/pickup.go:179.16,181.3 1 0 +github.com/EasyPost/easypost-go/v5/pickup.go:182.2,182.46 1 1 +github.com/EasyPost/easypost-go/v5/rate.go:94.64,96.2 1 1 +github.com/EasyPost/easypost-go/v5/rate.go:100.96,103.2 2 1 +github.com/EasyPost/easypost-go/v5/rate.go:106.88,108.2 1 1 +github.com/EasyPost/easypost-go/v5/rate.go:112.120,117.2 4 1 +github.com/EasyPost/easypost-go/v5/rate.go:120.93,122.2 1 1 +github.com/EasyPost/easypost-go/v5/rate.go:126.123,128.2 1 1 +github.com/EasyPost/easypost-go/v5/rate.go:132.152,134.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:72.93,74.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:78.125,81.2 2 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:84.105,86.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:90.137,93.2 2 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:96.133,98.2 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:101.159,103.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:107.165,109.2 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:113.191,114.44 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:114.44,117.3 2 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:118.2,120.16 3 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:120.16,122.3 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:123.2,123.56 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:127.110,129.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:133.142,141.2 3 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:144.187,146.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:150.219,152.87 2 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:152.87,159.3 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:161.2,162.78 2 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:162.78,164.3 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:166.2,166.98 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:170.183,172.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:176.215,191.2 4 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:194.210,196.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:200.249,214.2 4 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:216.107,219.2 2 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:221.154,229.16 7 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:229.16,231.3 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:233.2,237.16 4 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:237.16,239.3 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:241.2,241.33 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:241.33,243.3 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:245.2,246.16 2 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:246.16,248.3 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:250.2,251.16 2 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:251.16,253.3 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:255.2,255.8 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:258.185,275.2 5 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:278.165,280.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:284.197,295.2 3 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:298.91,300.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:304.123,311.2 3 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:314.98,316.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:320.130,327.2 3 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:330.92,332.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:336.122,340.2 3 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:343.93,345.2 1 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:349.123,353.2 3 1 +github.com/EasyPost/easypost-go/v5/referral_customer.go:356.122,358.2 1 0 +github.com/EasyPost/easypost-go/v5/referral_customer.go:362.154,369.2 4 0 +github.com/EasyPost/easypost-go/v5/refund.go:26.85,28.2 1 1 +github.com/EasyPost/easypost-go/v5/refund.go:32.117,36.2 3 1 +github.com/EasyPost/easypost-go/v5/refund.go:39.84,41.2 1 1 +github.com/EasyPost/easypost-go/v5/refund.go:45.116,48.2 2 1 +github.com/EasyPost/easypost-go/v5/refund.go:51.101,53.2 1 0 +github.com/EasyPost/easypost-go/v5/refund.go:56.127,58.2 1 1 +github.com/EasyPost/easypost-go/v5/refund.go:62.133,64.2 1 0 +github.com/EasyPost/easypost-go/v5/refund.go:68.159,69.34 1 1 +github.com/EasyPost/easypost-go/v5/refund.go:69.34,72.3 2 0 +github.com/EasyPost/easypost-go/v5/refund.go:73.2,75.16 3 1 +github.com/EasyPost/easypost-go/v5/refund.go:75.16,77.3 1 1 +github.com/EasyPost/easypost-go/v5/refund.go:78.2,78.46 1 0 +github.com/EasyPost/easypost-go/v5/refund.go:82.70,84.2 1 1 +github.com/EasyPost/easypost-go/v5/refund.go:88.102,91.2 2 1 +github.com/EasyPost/easypost-go/v5/report.go:43.80,45.2 1 1 +github.com/EasyPost/easypost-go/v5/report.go:49.112,52.2 2 1 +github.com/EasyPost/easypost-go/v5/report.go:55.97,57.2 1 1 +github.com/EasyPost/easypost-go/v5/report.go:61.129,66.2 3 1 +github.com/EasyPost/easypost-go/v5/report.go:69.103,71.2 1 0 +github.com/EasyPost/easypost-go/v5/report.go:74.129,76.2 1 1 +github.com/EasyPost/easypost-go/v5/report.go:80.135,82.2 1 0 +github.com/EasyPost/easypost-go/v5/report.go:86.161,87.34 1 1 +github.com/EasyPost/easypost-go/v5/report.go:87.34,90.3 2 0 +github.com/EasyPost/easypost-go/v5/report.go:91.2,93.16 3 1 +github.com/EasyPost/easypost-go/v5/report.go:93.16,95.3 1 0 +github.com/EasyPost/easypost-go/v5/report.go:96.2,99.18 2 1 +github.com/EasyPost/easypost-go/v5/report.go:99.18,101.3 1 1 +github.com/EasyPost/easypost-go/v5/report.go:102.2,102.69 1 1 +github.com/EasyPost/easypost-go/v5/report.go:106.75,108.2 1 1 +github.com/EasyPost/easypost-go/v5/report.go:112.107,115.2 2 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:34.65,38.30 3 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:38.30,40.3 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:41.2,41.12 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:48.83,50.2 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:54.115,57.2 2 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:60.89,62.2 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:66.121,69.2 2 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:72.109,74.2 1 0 +github.com/EasyPost/easypost-go/v5/scan_form.go:77.135,79.2 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:83.141,85.2 1 0 +github.com/EasyPost/easypost-go/v5/scan_form.go:89.167,90.36 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:90.36,93.3 2 0 +github.com/EasyPost/easypost-go/v5/scan_form.go:94.2,96.16 3 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:96.16,98.3 1 0 +github.com/EasyPost/easypost-go/v5/scan_form.go:99.2,99.48 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:103.76,105.2 1 1 +github.com/EasyPost/easypost-go/v5/scan_form.go:109.108,112.2 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:163.74,165.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:169.106,173.2 3 1 +github.com/EasyPost/easypost-go/v5/shipment.go:176.98,178.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:182.130,188.2 4 1 +github.com/EasyPost/easypost-go/v5/shipment.go:191.109,193.2 1 0 +github.com/EasyPost/easypost-go/v5/shipment.go:196.135,198.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:202.141,204.2 1 0 +github.com/EasyPost/easypost-go/v5/shipment.go:208.167,209.36 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:209.36,212.3 2 0 +github.com/EasyPost/easypost-go/v5/shipment.go:213.2,215.16 3 1 +github.com/EasyPost/easypost-go/v5/shipment.go:215.16,217.3 1 0 +github.com/EasyPost/easypost-go/v5/shipment.go:218.2,223.18 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:223.18,225.3 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:226.2,226.56 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:230.76,232.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:236.108,239.2 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:241.121,244.2 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:251.106,253.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:257.138,260.2 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:263.141,265.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:269.173,272.2 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:277.89,279.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:283.121,290.2 4 1 +github.com/EasyPost/easypost-go/v5/shipment.go:293.89,295.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:299.121,305.2 3 1 +github.com/EasyPost/easypost-go/v5/shipment.go:311.87,313.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:317.119,323.2 3 1 +github.com/EasyPost/easypost-go/v5/shipment.go:326.79,328.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:332.111,335.2 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:338.77,340.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:344.109,348.2 3 1 +github.com/EasyPost/easypost-go/v5/shipment.go:351.79,353.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:357.109,359.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:363.138,365.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:368.124,371.2 2 1 +github.com/EasyPost/easypost-go/v5/shipment.go:374.102,376.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:380.134,382.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:385.149,387.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:391.181,396.2 4 1 +github.com/EasyPost/easypost-go/v5/shipment.go:399.136,401.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:404.168,413.2 4 1 +github.com/EasyPost/easypost-go/v5/shipment.go:416.149,418.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:421.181,432.2 4 1 +github.com/EasyPost/easypost-go/v5/shipment.go:435.87,437.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:440.119,444.2 3 1 +github.com/EasyPost/easypost-go/v5/shipment.go:447.97,449.2 1 1 +github.com/EasyPost/easypost-go/v5/shipment.go:452.129,455.2 2 1 +github.com/EasyPost/easypost-go/v5/smart_rate.go:77.150,79.2 1 1 +github.com/EasyPost/easypost-go/v5/smart_rate.go:82.182,85.2 2 1 +github.com/EasyPost/easypost-go/v5/smart_rate.go:88.141,90.2 1 1 +github.com/EasyPost/easypost-go/v5/smart_rate.go:93.173,96.2 2 1 +github.com/EasyPost/easypost-go/v5/tracker.go:113.63,115.26 2 1 +github.com/EasyPost/easypost-go/v5/tracker.go:115.26,117.3 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:118.2,118.21 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:118.21,120.3 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:121.2,121.20 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:121.20,123.3 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:124.2,125.28 2 1 +github.com/EasyPost/easypost-go/v5/tracker.go:125.28,127.3 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:128.2,128.16 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:128.16,130.3 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:131.2,132.29 2 1 +github.com/EasyPost/easypost-go/v5/tracker.go:132.29,134.3 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:135.2,135.29 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:135.29,137.3 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:138.2,138.17 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:138.17,140.3 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:141.2,141.10 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:147.86,149.2 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:153.118,156.2 2 1 +github.com/EasyPost/easypost-go/v5/tracker.go:159.95,161.2 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:165.127,171.2 4 1 +github.com/EasyPost/easypost-go/v5/tracker.go:174.106,176.2 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:179.132,181.2 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:185.138,187.2 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:191.164,192.35 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:192.35,195.3 2 0 +github.com/EasyPost/easypost-go/v5/tracker.go:196.2,198.16 3 1 +github.com/EasyPost/easypost-go/v5/tracker.go:198.16,200.3 1 0 +github.com/EasyPost/easypost-go/v5/tracker.go:201.2,206.18 2 1 +github.com/EasyPost/easypost-go/v5/tracker.go:206.18,208.3 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:209.2,209.54 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:213.73,215.2 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:219.105,222.2 2 1 +github.com/EasyPost/easypost-go/v5/tracker.go:225.103,227.2 1 1 +github.com/EasyPost/easypost-go/v5/tracker.go:231.135,234.2 2 1 +github.com/EasyPost/easypost-go/v5/user.go:55.69,57.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:61.101,64.2 2 1 +github.com/EasyPost/easypost-go/v5/user.go:67.64,69.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:73.96,76.2 2 1 +github.com/EasyPost/easypost-go/v5/user.go:81.69,83.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:87.101,90.17 3 1 +github.com/EasyPost/easypost-go/v5/user.go:90.17,92.3 1 1 +github.com/EasyPost/easypost-go/v5/user.go:93.2,94.8 2 1 +github.com/EasyPost/easypost-go/v5/user.go:98.50,100.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:104.82,106.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:109.54,111.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:115.84,118.2 2 1 +github.com/EasyPost/easypost-go/v5/user.go:121.91,123.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:127.123,130.2 2 1 +github.com/EasyPost/easypost-go/v5/user.go:133.112,135.2 1 0 +github.com/EasyPost/easypost-go/v5/user.go:138.138,140.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:144.144,146.2 1 0 +github.com/EasyPost/easypost-go/v5/user.go:150.170,151.35 1 1 +github.com/EasyPost/easypost-go/v5/user.go:151.35,154.3 2 0 +github.com/EasyPost/easypost-go/v5/user.go:155.2,157.16 3 1 +github.com/EasyPost/easypost-go/v5/user.go:157.16,159.3 1 0 +github.com/EasyPost/easypost-go/v5/user.go:160.2,160.49 1 1 +github.com/EasyPost/easypost-go/v5/user.go:164.100,166.2 1 1 +github.com/EasyPost/easypost-go/v5/user.go:170.132,175.2 4 1 +github.com/EasyPost/easypost-go/v5/util.go:17.34,19.2 1 1 +github.com/EasyPost/easypost-go/v5/util.go:22.28,24.2 1 1 +github.com/EasyPost/easypost-go/v5/util.go:27.69,28.34 1 1 +github.com/EasyPost/easypost-go/v5/util.go:28.34,29.30 1 1 +github.com/EasyPost/easypost-go/v5/util.go:29.30,31.4 1 1 +github.com/EasyPost/easypost-go/v5/util.go:33.2,33.14 1 1 +github.com/EasyPost/easypost-go/v5/util.go:37.124,42.85 2 1 +github.com/EasyPost/easypost-go/v5/util.go:42.85,44.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:46.2,46.29 1 1 +github.com/EasyPost/easypost-go/v5/util.go:46.29,49.44 2 1 +github.com/EasyPost/easypost-go/v5/util.go:50.24,51.58 1 0 +github.com/EasyPost/easypost-go/v5/util.go:52.24,53.58 1 0 +github.com/EasyPost/easypost-go/v5/util.go:54.24,55.58 1 0 +github.com/EasyPost/easypost-go/v5/util.go:56.24,57.58 1 1 +github.com/EasyPost/easypost-go/v5/util.go:58.24,59.58 1 0 +github.com/EasyPost/easypost-go/v5/util.go:60.24,61.58 1 0 +github.com/EasyPost/easypost-go/v5/util.go:62.24,63.58 1 0 +github.com/EasyPost/easypost-go/v5/util.go:64.11,65.12 1 0 +github.com/EasyPost/easypost-go/v5/util.go:69.3,69.42 1 1 +github.com/EasyPost/easypost-go/v5/util.go:69.42,70.12 1 1 +github.com/EasyPost/easypost-go/v5/util.go:74.3,74.27 1 1 +github.com/EasyPost/easypost-go/v5/util.go:74.27,76.12 2 1 +github.com/EasyPost/easypost-go/v5/util.go:80.3,80.44 1 1 +github.com/EasyPost/easypost-go/v5/util.go:80.44,82.4 1 0 +github.com/EasyPost/easypost-go/v5/util.go:86.2,86.26 1 1 +github.com/EasyPost/easypost-go/v5/util.go:86.26,88.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:90.2,90.8 1 1 +github.com/EasyPost/easypost-go/v5/util.go:94.120,97.35 2 1 +github.com/EasyPost/easypost-go/v5/util.go:97.35,99.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:101.2,101.35 1 1 +github.com/EasyPost/easypost-go/v5/util.go:101.35,103.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:105.2,105.29 1 1 +github.com/EasyPost/easypost-go/v5/util.go:105.29,108.72 1 1 +github.com/EasyPost/easypost-go/v5/util.go:108.72,109.12 1 1 +github.com/EasyPost/easypost-go/v5/util.go:112.3,116.30 3 1 +github.com/EasyPost/easypost-go/v5/util.go:116.30,118.12 2 1 +github.com/EasyPost/easypost-go/v5/util.go:122.3,122.43 1 1 +github.com/EasyPost/easypost-go/v5/util.go:122.43,124.4 1 1 +github.com/EasyPost/easypost-go/v5/util.go:128.2,128.29 1 1 +github.com/EasyPost/easypost-go/v5/util.go:128.29,130.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:132.2,132.8 1 1 +github.com/EasyPost/easypost-go/v5/util.go:136.110,138.29 2 1 +github.com/EasyPost/easypost-go/v5/util.go:138.29,145.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:147.2,148.16 2 1 +github.com/EasyPost/easypost-go/v5/util.go:148.16,149.30 1 1 +github.com/EasyPost/easypost-go/v5/util.go:149.30,150.32 1 1 +github.com/EasyPost/easypost-go/v5/util.go:150.32,152.5 1 1 +github.com/EasyPost/easypost-go/v5/util.go:155.2,155.8 1 1 +github.com/EasyPost/easypost-go/v5/util.go:159.131,161.29 2 1 +github.com/EasyPost/easypost-go/v5/util.go:161.29,168.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:170.2,171.16 2 1 +github.com/EasyPost/easypost-go/v5/util.go:171.16,172.30 1 1 +github.com/EasyPost/easypost-go/v5/util.go:172.30,174.80 1 1 +github.com/EasyPost/easypost-go/v5/util.go:174.80,176.5 1 1 +github.com/EasyPost/easypost-go/v5/util.go:179.2,179.8 1 1 +github.com/EasyPost/easypost-go/v5/util.go:183.122,185.29 2 1 +github.com/EasyPost/easypost-go/v5/util.go:185.29,192.3 1 1 +github.com/EasyPost/easypost-go/v5/util.go:194.2,195.16 2 1 +github.com/EasyPost/easypost-go/v5/util.go:195.16,196.30 1 1 +github.com/EasyPost/easypost-go/v5/util.go:196.30,197.32 1 1 +github.com/EasyPost/easypost-go/v5/util.go:197.32,199.5 1 1 +github.com/EasyPost/easypost-go/v5/util.go:202.2,202.8 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:54.102,62.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:64.102,69.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:72.92,74.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:79.62,83.2 3 1 +github.com/EasyPost/easypost-go/v5/webhook.go:86.61,88.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:93.91,96.2 2 1 +github.com/EasyPost/easypost-go/v5/webhook.go:99.73,101.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:105.105,108.2 2 1 +github.com/EasyPost/easypost-go/v5/webhook.go:111.110,113.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:118.80,122.2 3 1 +github.com/EasyPost/easypost-go/v5/webhook.go:125.56,127.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:131.88,133.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:138.130,140.2 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:144.162,147.22 2 1 +github.com/EasyPost/easypost-go/v5/webhook.go:147.22,156.64 6 1 +github.com/EasyPost/easypost-go/v5/webhook.go:156.64,158.65 2 1 +github.com/EasyPost/easypost-go/v5/webhook.go:158.65,160.5 1 0 +github.com/EasyPost/easypost-go/v5/webhook.go:160.10,162.5 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:163.9,165.4 1 1 +github.com/EasyPost/easypost-go/v5/webhook.go:166.8,168.3 1 1 diff --git a/tests/customs_info_test.go b/customs_info_test.go similarity index 75% rename from tests/customs_info_test.go rename to customs_info_test.go index 9e34b6e..f5bedbb 100644 --- a/tests/customs_info_test.go +++ b/customs_info_test.go @@ -1,10 +1,8 @@ -package easypost_test +package easypost import ( "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestCustomsInfoCreate() { @@ -14,7 +12,7 @@ func (c *ClientTests) TestCustomsInfoCreate() { customsInfo, err := client.CreateCustomsInfo(c.fixture.BasicCustomsInfo()) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CustomsInfo{}), reflect.TypeOf(customsInfo)) + assert.Equal(reflect.TypeOf(&CustomsInfo{}), reflect.TypeOf(customsInfo)) assert.True(strings.HasPrefix(customsInfo.ID, "cstinfo_")) assert.Equal("NOEEI 30.37(a)", customsInfo.EELPFC) } @@ -29,6 +27,6 @@ func (c *ClientTests) TestCustomsInfoRetrieve() { retrievedCustomsInfo, err := client.GetCustomsInfo(customsInfo.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CustomsInfo{}), reflect.TypeOf(retrievedCustomsInfo)) + assert.Equal(reflect.TypeOf(&CustomsInfo{}), reflect.TypeOf(retrievedCustomsInfo)) assert.Equal(customsInfo, retrievedCustomsInfo) } diff --git a/tests/customs_item_test.go b/customs_item_test.go similarity index 75% rename from tests/customs_item_test.go rename to customs_item_test.go index 7ab3293..f25d2e7 100644 --- a/tests/customs_item_test.go +++ b/customs_item_test.go @@ -1,10 +1,8 @@ -package easypost_test +package easypost import ( "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestCustomsItemCreate() { @@ -14,7 +12,7 @@ func (c *ClientTests) TestCustomsItemCreate() { customsItem, err := client.CreateCustomsItem(c.fixture.BasicCustomsItem()) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CustomsItem{}), reflect.TypeOf(customsItem)) + assert.Equal(reflect.TypeOf(&CustomsItem{}), reflect.TypeOf(customsItem)) assert.True(strings.HasPrefix(customsItem.ID, "cstitem_")) assert.Equal(23.25, customsItem.Value) } @@ -29,6 +27,6 @@ func (c *ClientTests) TestCustomsItemRetrieve() { retrievedCustomsItem, err := client.GetCustomsItem(customsItem.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.CustomsItem{}), reflect.TypeOf(retrievedCustomsItem)) + assert.Equal(reflect.TypeOf(&CustomsItem{}), reflect.TypeOf(retrievedCustomsItem)) assert.Equal(customsItem, retrievedCustomsItem) } diff --git a/tests/datetime_test.go b/datetime_test.go similarity index 82% rename from tests/datetime_test.go rename to datetime_test.go index 89576c6..7c89205 100644 --- a/tests/datetime_test.go +++ b/datetime_test.go @@ -1,7 +1,6 @@ -package easypost_test +package easypost import ( - "github.com/EasyPost/easypost-go/v5" "reflect" "time" @@ -22,13 +21,13 @@ func (c *ClientTests) TestDateTime() { _time := time.Date(year, month, day, hour, minute, second, nanosecond, location) - datetime := easypost.DateTime(_time) + datetime := DateTime(_time) assert.Equal(_time, datetime.AsTime()) - datetimeFromTime := easypost.DateTimeFromTime(_time) + datetimeFromTime := DateTimeFromTime(_time) assert.Equal(_time, datetimeFromTime.AsTime()) - datetimeFromNumbers := easypost.NewDateTime(year, month, day, hour, minute, second, nanosecond, location) + datetimeFromNumbers := NewDateTime(year, month, day, hour, minute, second, nanosecond, location) assert.Equal(_time, datetimeFromNumbers.AsTime()) } @@ -47,7 +46,7 @@ func (c *ClientTests) TestDateTimeJSON() { pickup, err := client.CreatePickup(pickupData) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Pickup{}), reflect.TypeOf(pickup)) + assert.Equal(reflect.TypeOf(&Pickup{}), reflect.TypeOf(pickup)) assert.NotNil(pickup.MaxDatetime) assert.NotNil(pickup.MinDatetime) @@ -69,10 +68,10 @@ func (c *ClientTests) TestDateTimeUrlQueryStringParameterInclusion() { now := time.Now().UTC() past := now.AddDate(0, -4, 0) - start := easypost.DateTimeFromTime(past) - end := easypost.DateTimeFromTime(now) + start := DateTimeFromTime(past) + end := DateTimeFromTime(now) - options := easypost.ListOptions{ + options := ListOptions{ StartDateTime: &start, EndDateTime: &end, PageSize: 100, diff --git a/tests/easypost_test.go b/easypost_test.go similarity index 84% rename from tests/easypost_test.go rename to easypost_test.go index 176527d..9f3e15a 100644 --- a/tests/easypost_test.go +++ b/easypost_test.go @@ -1,15 +1,11 @@ -package easypost_test - -import ( - "github.com/EasyPost/easypost-go/v5" -) +package easypost func (c *ClientTests) TestClientTimeout() { timeout1 := 1000 timeout2 := 10 tempClient := c.TestClient() // set the timeout as part of the client initialization - client := &easypost.Client{ + client := &Client{ APIKey: tempClient.APIKey, Timeout: timeout1, } diff --git a/tests/endshipper_test.go b/endshipper_test.go similarity index 84% rename from tests/endshipper_test.go rename to endshipper_test.go index c3fdd04..2abb96e 100644 --- a/tests/endshipper_test.go +++ b/endshipper_test.go @@ -1,10 +1,8 @@ -package easypost_test +package easypost import ( "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestEndShipperCreate() { @@ -14,7 +12,7 @@ func (c *ClientTests) TestEndShipperCreate() { endshipper, err := client.CreateEndShipper(c.fixture.CaAddress1()) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(endshipper)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(endshipper)) assert.True(strings.HasPrefix(endshipper.ID, "es")) assert.Equal("388 TOWNSEND ST APT 20", endshipper.Street1) } @@ -29,7 +27,7 @@ func (c *ClientTests) TestEndShipperRetrieve() { retrievedEndShipper, err := client.GetEndShipper(endshipper.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(retrievedEndShipper)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(retrievedEndShipper)) assert.True(strings.HasPrefix(retrievedEndShipper.ID, "es")) assert.Equal(endshipper.Street1, retrievedEndShipper.Street1) } @@ -39,7 +37,7 @@ func (c *ClientTests) TestEndShipperAll() { assert, require := c.Assert(), c.Require() endshippers, err := client.ListEndShippers( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -48,7 +46,7 @@ func (c *ClientTests) TestEndShipperAll() { assert.LessOrEqual(len(endshippers.EndShippers), c.fixture.pageSize()) assert.NotNil(endshippers.HasMore) for _, endshipper := range endshippers.EndShippers { - assert.Equal(reflect.TypeOf(&easypost.Address{}), reflect.TypeOf(endshipper)) + assert.Equal(reflect.TypeOf(&Address{}), reflect.TypeOf(endshipper)) } } diff --git a/tests/error_test.go b/error_test.go similarity index 68% rename from tests/error_test.go rename to error_test.go index 2f5a13c..be5a67c 100644 --- a/tests/error_test.go +++ b/error_test.go @@ -1,12 +1,10 @@ -package easypost_test +package easypost import ( "errors" "io" "net/http" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestErrorInheritance() { @@ -16,22 +14,22 @@ func (c *ClientTests) TestErrorInheritance() { client.APIKey = "not-a-real-key" // Invalid API key will result in 403 Forbidden error _, err := client.CreateAddress( - &easypost.Address{ + &Address{ Street1: "", }, - &easypost.CreateAddressOptions{}, + &CreateAddressOptions{}, ) require.Error(err) // LibraryError is the base of all errors thrown in this library, error should be able to be cast to this - var libraryError *easypost.LibraryError + var libraryError *LibraryError if !errors.As(err, &libraryError) { assert.Fail("Error should be a LibraryError") } // APIError is the base of all errors thrown due to the API, error should be able to be cast to this - var apiError *easypost.APIError + var apiError *APIError if !errors.As(err, &apiError) { assert.Fail("Error should be an APIError") } @@ -39,13 +37,13 @@ func (c *ClientTests) TestErrorInheritance() { assert.Equal(403, apiError.StatusCode) // LocalError is the base of all errors thrown due to the library itself, and a subtype of LibraryError, but separate from APIError, error should NOT be able to be cast to this - var localError *easypost.LocalError + var localError *LocalError if errors.As(err, &localError) { assert.Fail("Error should not be a LocalError") } // ForbiddenError is an error due to a 403 status code, and a subtype of APIError, error should be able to be cast to this - var forbiddenError *easypost.ForbiddenError + var forbiddenError *ForbiddenError if !errors.As(err, &forbiddenError) { assert.Fail("Error should be a ForbiddenError") } @@ -65,18 +63,18 @@ func (c *ClientTests) TestApiError() { assert, require := c.Assert(), c.Require() // Create a bad shipment so we can work with errors - _, err := client.CreateShipment(&easypost.Shipment{}) + _, err := client.CreateShipment(&Shipment{}) require.Error(err) - var invalidRequestError *easypost.InvalidRequestError + var invalidRequestError *InvalidRequestError if errors.As(err, &invalidRequestError) { assert.Equal(422, invalidRequestError.StatusCode) assert.Equal("PARAMETER.REQUIRED", invalidRequestError.Code) assert.Equal("Missing required parameter.", invalidRequestError.Message) if errorsList, ok := invalidRequestError.Errors.([]interface{}); ok { assert.Equal(1, len(errorsList)) - if fieldError, ok := errorsList[0].(*easypost.FieldError); ok { + if fieldError, ok := errorsList[0].(*FieldError); ok { assert.Equal("shipment", fieldError.Field) assert.Equal("cannot be blank", fieldError.Message) } @@ -100,7 +98,7 @@ func (c *ClientTests) TestApiErrorAlternativeFormat() { require.Error(err) - var notFoundError *easypost.NotFoundError + var notFoundError *NotFoundError if errors.As(err, ¬FoundError) { assert.Equal(404, notFoundError.StatusCode) assert.Equal("NOT_FOUND", notFoundError.Code) @@ -125,143 +123,143 @@ func (c *ClientTests) TestApiErrorStatusCodes() { } res.StatusCode = 0 - err := easypost.BuildErrorFromResponse(res) - ok := errors.As(err, new(*easypost.ConnectionError)) + err := BuildErrorFromResponse(res) + ok := errors.As(err, new(*ConnectionError)) assert.True(ok) res.StatusCode = 100 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RetryError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RetryError)) assert.True(ok) res.StatusCode = 101 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RetryError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RetryError)) assert.True(ok) res.StatusCode = 102 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RetryError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RetryError)) assert.True(ok) res.StatusCode = 103 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RetryError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RetryError)) assert.True(ok) res.StatusCode = 300 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 301 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 302 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 303 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 304 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 305 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 306 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 307 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 308 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RedirectError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RedirectError)) assert.True(ok) res.StatusCode = 400 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.BadRequestError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*BadRequestError)) assert.True(ok) res.StatusCode = 401 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.UnauthorizedError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*UnauthorizedError)) assert.True(ok) res.StatusCode = 402 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.PaymentError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*PaymentError)) assert.True(ok) res.StatusCode = 403 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.ForbiddenError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*ForbiddenError)) assert.True(ok) res.StatusCode = 404 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.NotFoundError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*NotFoundError)) assert.True(ok) res.StatusCode = 405 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.MethodNotAllowedError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*MethodNotAllowedError)) assert.True(ok) res.StatusCode = 407 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.ProxyError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*ProxyError)) assert.True(ok) res.StatusCode = 408 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.TimeoutError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*TimeoutError)) assert.True(ok) res.StatusCode = 422 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.InvalidRequestError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*InvalidRequestError)) assert.True(ok) res.StatusCode = 429 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.RateLimitError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*RateLimitError)) assert.True(ok) res.StatusCode = 500 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.InternalServerError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*InternalServerError)) assert.True(ok) res.StatusCode = 503 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.ServiceUnavailableError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*ServiceUnavailableError)) assert.True(ok) res.StatusCode = 504 - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.GatewayTimeoutError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*GatewayTimeoutError)) assert.True(ok) res.StatusCode = 7000 // unaccounted for status code - err = easypost.BuildErrorFromResponse(res) - ok = errors.As(err, new(*easypost.UnknownHttpError)) + err = BuildErrorFromResponse(res) + ok = errors.As(err, new(*UnknownHttpError)) assert.True(ok) } @@ -282,7 +280,7 @@ func (c *ClientTests) TestApiErrorMessageParseArray() { Body: io.NopCloser(strings.NewReader(fakeErrorResponse)), } - err := easypost.BuildErrorFromResponse(res) + err := BuildErrorFromResponse(res) errorMessage := err.Error() assert.Equal("UNPROCESSABLE_ENTITY Bad format, Bad format 2", errorMessage) @@ -309,7 +307,7 @@ func (c *ClientTests) TestErrorMessageParseMap() { Body: io.NopCloser(strings.NewReader(fakeErrorResponse)), } - err := easypost.BuildErrorFromResponse(res) + err := BuildErrorFromResponse(res) errorMessage := err.Error() assert.Equal("UNPROCESSABLE_ENTITY Bad format, Bad format 2", errorMessage) @@ -348,7 +346,7 @@ func (c *ClientTests) TestErrorMessageParseExtreme() { Body: io.NopCloser(strings.NewReader(fakeErrorResponse)), } - err := easypost.BuildErrorFromResponse(res) + err := BuildErrorFromResponse(res) errorMessage := err.Error() messages := []string{"message1", "message2", "message3", "message4", "message5", "message6"} diff --git a/tests/event_test.go b/event_test.go similarity index 88% rename from tests/event_test.go rename to event_test.go index 35b2b3a..d8bacf1 100644 --- a/tests/event_test.go +++ b/event_test.go @@ -1,4 +1,4 @@ -package easypost_test +package easypost import ( "errors" @@ -7,8 +7,6 @@ import ( "reflect" "strings" "time" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestEventAll() { @@ -16,7 +14,7 @@ func (c *ClientTests) TestEventAll() { assert, require := c.Assert(), c.Require() events, err := client.ListEvents( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -27,7 +25,7 @@ func (c *ClientTests) TestEventAll() { assert.LessOrEqual(len(eventsList), c.fixture.pageSize()) assert.NotNil(events.HasMore) for _, event := range eventsList { - assert.Equal(reflect.TypeOf(&easypost.Event{}), reflect.TypeOf(event)) + assert.Equal(reflect.TypeOf(&Event{}), reflect.TypeOf(event)) } } @@ -36,7 +34,7 @@ func (c *ClientTests) TestEventRetrieve() { assert, require := c.Assert(), c.Require() events, err := client.ListEvents( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -45,7 +43,7 @@ func (c *ClientTests) TestEventRetrieve() { event, err := client.GetEvent(events.Events[0].ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Event{}), reflect.TypeOf(event)) + assert.Equal(reflect.TypeOf(&Event{}), reflect.TypeOf(event)) assert.True(strings.HasPrefix(event.ID, "evt_")) } @@ -55,7 +53,7 @@ func (c *ClientTests) TestEventRetrieveAllPayloads() { // Create a webhook to receive the event webhook, webhookErr := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ URL: c.fixture.WebhookUrl(), }, ) @@ -75,7 +73,7 @@ func (c *ClientTests) TestEventRetrieveAllPayloads() { // Retrieve all events and extract the newest one events, err := client.ListEvents( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -98,7 +96,7 @@ func (c *ClientTests) TestEventRetrievePayload() { // Create a webhook to receive the event webhook, webhookErr := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ URL: c.fixture.WebhookUrl(), }, ) @@ -117,7 +115,7 @@ func (c *ClientTests) TestEventRetrievePayload() { } events, err := client.ListEvents( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -136,7 +134,7 @@ func (c *ClientTests) TestEventsGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListEvents( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -154,7 +152,7 @@ func (c *ClientTests) TestEventsGetNextPage() { } }() if err != nil { - assert.Equal(easypost.NoPagesLeftToRetrieve, err.Error()) + assert.Equal(NoPagesLeftToRetrieve, err.Error()) return } } diff --git a/tests/fixture_test.go b/fixture_test.go similarity index 56% rename from tests/fixture_test.go rename to fixture_test.go index f68534f..dde4d81 100644 --- a/tests/fixture_test.go +++ b/fixture_test.go @@ -1,4 +1,4 @@ -package easypost_test +package easypost import ( "bufio" @@ -8,39 +8,37 @@ import ( "os" "path/filepath" "time" - - "github.com/EasyPost/easypost-go/v5" ) type Fixture struct { - Addresses map[string]*easypost.Address `json:"addresses,omitempty" url:"addresses,omitempty"` - Billing billingFixture `json:"billing,omitempty" url:"billing,omitempty"` - CarrierAccounts map[string]*easypost.CarrierAccount `json:"carrier_accounts,omitempty" url:"carrier_accounts,omitempty"` - CarrierStrings map[string]string `json:"carrier_strings,omitempty" url:"carrier_strings,omitempty"` - Claims map[string]*easypost.CreateClaimParameters `json:"claims,omitempty" url:"claims,omitempty"` - CustomsInfos map[string]*easypost.CustomsInfo `json:"customs_infos,omitempty" url:"customs_infos,omitempty"` - CustomsItems map[string]*easypost.CustomsItem `json:"customs_items,omitempty" url:"customs_items,omitempty"` - CreditCards map[string]*easypost.CreditCardOptions `json:"credit_cards,omitempty" url:"credit_cards,omitempty"` - FormOptions map[string]map[string]interface{} `json:"form_options,omitempty" url:"form_options,omitempty"` - Insurances map[string]*easypost.Insurance `json:"insurances,omitempty" url:"insurances,omitempty"` - Luma map[string]interface{} `json:"luma,omitempty" url:"luma,omitempty"` - Orders map[string]*easypost.Order `json:"orders,omitempty" url:"orders,omitempty"` - PageSizes map[string]int `json:"page_sizes,omitempty" url:"page_sizes,omitempty"` - Parcels map[string]*easypost.Parcel `json:"parcels,omitempty" url:"parcels,omitempty"` - Pickups map[string]*easypost.Pickup `json:"pickups,omitempty" url:"pickups,omitempty"` - ReportTypes map[string]string `json:"report_types,omitempty" url:"report_types,omitempty"` - ServiceNames map[string]map[string]string `json:"service_names,omitempty" url:"service_names,omitempty"` - Shipments map[string]*easypost.Shipment `json:"shipments,omitempty" url:"shipments,omitempty"` - TaxIdentifiers map[string]*easypost.TaxIdentifier `json:"tax_identifiers,omitempty" url:"tax_identifiers,omitempty"` - Users map[string]*easypost.UserOptions `json:"users,omitempty" url:"users,omitempty"` - Webhooks map[string]interface{} `json:"webhooks,omitempty" url:"webhooks,omitempty"` + Addresses map[string]*Address `json:"addresses,omitempty" url:"addresses,omitempty"` + Billing billingFixture `json:"billing,omitempty" url:"billing,omitempty"` + CarrierAccounts map[string]*CarrierAccount `json:"carrier_accounts,omitempty" url:"carrier_accounts,omitempty"` + CarrierStrings map[string]string `json:"carrier_strings,omitempty" url:"carrier_strings,omitempty"` + Claims map[string]*CreateClaimParameters `json:"claims,omitempty" url:"claims,omitempty"` + CustomsInfos map[string]*CustomsInfo `json:"customs_infos,omitempty" url:"customs_infos,omitempty"` + CustomsItems map[string]*CustomsItem `json:"customs_items,omitempty" url:"customs_items,omitempty"` + CreditCards map[string]*CreditCardOptions `json:"credit_cards,omitempty" url:"credit_cards,omitempty"` + FormOptions map[string]map[string]interface{} `json:"form_options,omitempty" url:"form_options,omitempty"` + Insurances map[string]*Insurance `json:"insurances,omitempty" url:"insurances,omitempty"` + Luma map[string]interface{} `json:"luma,omitempty" url:"luma,omitempty"` + Orders map[string]*Order `json:"orders,omitempty" url:"orders,omitempty"` + PageSizes map[string]int `json:"page_sizes,omitempty" url:"page_sizes,omitempty"` + Parcels map[string]*Parcel `json:"parcels,omitempty" url:"parcels,omitempty"` + Pickups map[string]*Pickup `json:"pickups,omitempty" url:"pickups,omitempty"` + ReportTypes map[string]string `json:"report_types,omitempty" url:"report_types,omitempty"` + ServiceNames map[string]map[string]string `json:"service_names,omitempty" url:"service_names,omitempty"` + Shipments map[string]*Shipment `json:"shipments,omitempty" url:"shipments,omitempty"` + TaxIdentifiers map[string]*TaxIdentifier `json:"tax_identifiers,omitempty" url:"tax_identifiers,omitempty"` + Users map[string]*UserOptions `json:"users,omitempty" url:"users,omitempty"` + Webhooks map[string]interface{} `json:"webhooks,omitempty" url:"webhooks,omitempty"` } type billingFixture struct { - PaymentMethodID string `json:"payment_method_id,omitempty" url:"payment_method_id,omitempty"` - FinancialConnectionsID string `json:"financial_connections_id,omitempty" url:"financial_connections_id,omitempty"` - MandateData *easypost.MandateData `json:"mandate_data,omitempty" url:"mandate_data,omitempty"` - Priority string `json:"priority,omitempty" url:"priority,omitempty"` + PaymentMethodID string `json:"payment_method_id,omitempty" url:"payment_method_id,omitempty"` + FinancialConnectionsID string `json:"financial_connections_id,omitempty" url:"financial_connections_id,omitempty"` + MandateData *MandateData `json:"mandate_data,omitempty" url:"mandate_data,omitempty"` + Priority string `json:"priority,omitempty" url:"priority,omitempty"` } // Reads fixture data from the fixtures JSON file @@ -103,23 +101,23 @@ func (fixture *Fixture) ReportDate() string { return "2022-04-11" } -func (fixture *Fixture) CaAddress1() *easypost.Address { +func (fixture *Fixture) CaAddress1() *Address { return readFixtureData().Addresses["ca_address_1"] } -func (fixture *Fixture) CaAddress2() *easypost.Address { +func (fixture *Fixture) CaAddress2() *Address { return readFixtureData().Addresses["ca_address_2"] } -func (fixture *Fixture) IncorrectAddress() *easypost.Address { +func (fixture *Fixture) IncorrectAddress() *Address { return readFixtureData().Addresses["incorrect"] } -func (fixture *Fixture) BasicParcel() *easypost.Parcel { +func (fixture *Fixture) BasicParcel() *Parcel { return readFixtureData().Parcels["basic"] } -func (fixture *Fixture) BasicCustomsItem() *easypost.CustomsItem { +func (fixture *Fixture) BasicCustomsItem() *CustomsItem { customsItem := readFixtureData().CustomsItems["basic"] // Json unmarshalling doesn't handle float64 well, need to manually set the value @@ -128,7 +126,7 @@ func (fixture *Fixture) BasicCustomsItem() *easypost.CustomsItem { return customsItem } -func (fixture *Fixture) BasicCustomsInfo() *easypost.CustomsInfo { +func (fixture *Fixture) BasicCustomsInfo() *CustomsInfo { customsInfo := readFixtureData().CustomsInfos["basic"] // Json unmarshalling doesn't handle float64 well, need to manually set the value @@ -138,20 +136,20 @@ func (fixture *Fixture) BasicCustomsInfo() *easypost.CustomsInfo { return customsInfo } -func (fixture *Fixture) TaxIdentifier() *easypost.TaxIdentifier { +func (fixture *Fixture) TaxIdentifier() *TaxIdentifier { return readFixtureData().TaxIdentifiers["basic"] } -func (fixture *Fixture) BasicShipment() *easypost.Shipment { +func (fixture *Fixture) BasicShipment() *Shipment { return readFixtureData().Shipments["basic_domestic"] } -func (fixture *Fixture) FullShipment() *easypost.Shipment { +func (fixture *Fixture) FullShipment() *Shipment { return readFixtureData().Shipments["full"] } -func (fixture *Fixture) OneCallBuyShipment() *easypost.Shipment { - return &easypost.Shipment{ +func (fixture *Fixture) OneCallBuyShipment() *Shipment { + return &Shipment{ ToAddress: fixture.CaAddress1(), FromAddress: fixture.CaAddress2(), Parcel: fixture.BasicParcel(), @@ -164,8 +162,8 @@ func (fixture *Fixture) OneCallBuyShipment() *easypost.Shipment { // This fixture will require you to add a `shipment` key with a Shipment object from a test. // If you need to re-record cassettes, increment the date below and ensure it is one day in the future, // USPS only does "next-day" pickups including Saturday but not Sunday or Holidays. -func (fixture *Fixture) BasicPickup() *easypost.Pickup { - pickupDate := easypost.NewDateTime(2024, time.August, 14, 0, 0, 0, 0, time.UTC) +func (fixture *Fixture) BasicPickup() *Pickup { + pickupDate := NewDateTime(2024, time.August, 14, 0, 0, 0, 0, time.UTC) pickupData := readFixtureData().Pickups["basic"] pickupData.MinDatetime = &pickupDate @@ -174,21 +172,21 @@ func (fixture *Fixture) BasicPickup() *easypost.Pickup { return pickupData } -func (fixture *Fixture) BasicCarrierAccount() *easypost.CarrierAccount { +func (fixture *Fixture) BasicCarrierAccount() *CarrierAccount { return readFixtureData().CarrierAccounts["basic"] } // This fixture will require you to add a `tracking_code` key with a tracking code from a shipment -func (fixture *Fixture) BasicInsurance() *easypost.Insurance { +func (fixture *Fixture) BasicInsurance() *Insurance { return readFixtureData().Insurances["basic"] } // This fixture will require you to add a `tracking_code` key with a tracking code from a shipment and an `amount` key with a float value -func (fixture *Fixture) BasicClaim() *easypost.CreateClaimParameters { +func (fixture *Fixture) BasicClaim() *CreateClaimParameters { return readFixtureData().Claims["basic"] } -func (fixture *Fixture) BasicOrder() *easypost.Order { +func (fixture *Fixture) BasicOrder() *Order { return readFixtureData().Orders["basic"] } @@ -228,8 +226,8 @@ func (fixture *Fixture) WebhookUrl() string { return readFixtureData().Webhooks["url"].(string) } -func (fixture *Fixture) WebhookCustomHeaders() []easypost.WebhookCustomHeader { - var header easypost.WebhookCustomHeader +func (fixture *Fixture) WebhookCustomHeaders() []WebhookCustomHeader { + var header WebhookCustomHeader inputCustomHeaders := readFixtureData().Webhooks["custom_headers"] customHeaders := inputCustomHeaders.([]interface{}) @@ -237,7 +235,7 @@ func (fixture *Fixture) WebhookCustomHeaders() []easypost.WebhookCustomHeader { header.Name = headerMap["name"].(string) header.Value = headerMap["value"].(string) - webhookCustomHeaders := []easypost.WebhookCustomHeader{header} + webhookCustomHeaders := []WebhookCustomHeader{header} return webhookCustomHeaders } @@ -246,11 +244,11 @@ func (fixture *Fixture) RmaFormOptions() map[string]interface{} { return readFixtureData().FormOptions["rma"] } -func (fixture *Fixture) ReferralUser() *easypost.UserOptions { +func (fixture *Fixture) ReferralUser() *UserOptions { return readFixtureData().Users["referral"] } -func (fixture *Fixture) TestCreditCard() *easypost.CreditCardOptions { +func (fixture *Fixture) TestCreditCard() *CreditCardOptions { return readFixtureData().CreditCards["test"] } diff --git a/tests/insurance_test.go b/insurance_test.go similarity index 83% rename from tests/insurance_test.go rename to insurance_test.go index 95828d0..7f74a2a 100644 --- a/tests/insurance_test.go +++ b/insurance_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestInsuranceCreate() { @@ -21,7 +19,7 @@ func (c *ClientTests) TestInsuranceCreate() { insurance, err := client.CreateInsurance(insuranceData) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Insurance{}), reflect.TypeOf(insurance)) + assert.Equal(reflect.TypeOf(&Insurance{}), reflect.TypeOf(insurance)) assert.True(strings.HasPrefix(insurance.ID, "ins_")) assert.Equal("100.00000", insurance.Amount) } @@ -31,7 +29,7 @@ func (c *ClientTests) TestInsuranceRetrieve() { assert, require := c.Assert(), c.Require() insurances, err := client.ListInsurances( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -40,7 +38,7 @@ func (c *ClientTests) TestInsuranceRetrieve() { retrievedInsurance, err := client.GetInsurance(insurances.Insurances[0].ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Insurance{}), reflect.TypeOf(retrievedInsurance)) + assert.Equal(reflect.TypeOf(&Insurance{}), reflect.TypeOf(retrievedInsurance)) assert.Equal(insurances.Insurances[0], retrievedInsurance) } @@ -49,7 +47,7 @@ func (c *ClientTests) TestInsuranceAll() { assert, require := c.Assert(), c.Require() insurances, err := client.ListInsurances( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -60,7 +58,7 @@ func (c *ClientTests) TestInsuranceAll() { assert.LessOrEqual(len(insurancesList), c.fixture.pageSize()) assert.NotNil(insurances.HasMore) for _, insurance := range insurancesList { - assert.Equal(reflect.TypeOf(&easypost.Insurance{}), reflect.TypeOf(insurance)) + assert.Equal(reflect.TypeOf(&Insurance{}), reflect.TypeOf(insurance)) } } @@ -69,7 +67,7 @@ func (c *ClientTests) TestInsuranceGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListInsurances( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -87,7 +85,7 @@ func (c *ClientTests) TestInsuranceGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -107,7 +105,7 @@ func (c *ClientTests) TestInsuranceRefund() { refundInsurance, err := client.RefundInsurance(insurance.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Insurance{}), reflect.TypeOf(refundInsurance)) + assert.Equal(reflect.TypeOf(&Insurance{}), reflect.TypeOf(refundInsurance)) assert.True(strings.HasPrefix(refundInsurance.ID, "ins_")) assert.Equal("cancelled", refundInsurance.Status) assert.Equal("Insurance was cancelled by the user.", refundInsurance.Messages[0]) diff --git a/tests/luma_test.go b/luma_test.go similarity index 79% rename from tests/luma_test.go rename to luma_test.go index 1d4ecbd..5c0e8ed 100644 --- a/tests/luma_test.go +++ b/luma_test.go @@ -1,15 +1,11 @@ -package easypost_test - -import ( - "github.com/EasyPost/easypost-go/v5" -) +package easypost func (c *ClientTests) TestGetLumaPromise() { client := c.TestClient() assert, require := c.Assert(), c.Require() shipmentData := c.fixture.BasicShipment() - lumaRequest := easypost.LumaRequest{ + lumaRequest := LumaRequest{ Shipment: *shipmentData, RulesetName: c.fixture.LumaRulesetName(), PlannedShipDate: c.fixture.LumaPlannedShipDate(), diff --git a/tests/order_test.go b/order_test.go similarity index 86% rename from tests/order_test.go rename to order_test.go index 2693391..fa7414d 100644 --- a/tests/order_test.go +++ b/order_test.go @@ -1,10 +1,8 @@ -package easypost_test +package easypost import ( "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestOrderCreate() { @@ -14,7 +12,7 @@ func (c *ClientTests) TestOrderCreate() { order, err := client.CreateOrder(c.fixture.BasicOrder()) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Order{}), reflect.TypeOf(order)) + assert.Equal(reflect.TypeOf(&Order{}), reflect.TypeOf(order)) assert.True(strings.HasPrefix(order.ID, "order_")) assert.NotNil(order.Rates) } @@ -29,7 +27,7 @@ func (c *ClientTests) TestOrderRetrieve() { retrievedOrder, err := client.GetOrder(order.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Order{}), reflect.TypeOf(retrievedOrder)) + assert.Equal(reflect.TypeOf(&Order{}), reflect.TypeOf(retrievedOrder)) assert.Equal(order.ID, retrievedOrder.ID) } @@ -45,9 +43,9 @@ func (c *ClientTests) TestOrderGetRates() { ratesList := rates.Rates - assert.Equal(reflect.TypeOf([]*easypost.Rate{}), reflect.TypeOf(ratesList)) + assert.Equal(reflect.TypeOf([]*Rate{}), reflect.TypeOf(ratesList)) for _, rate := range ratesList { - assert.Equal(reflect.TypeOf(&easypost.Rate{}), reflect.TypeOf(rate)) + assert.Equal(reflect.TypeOf(&Rate{}), reflect.TypeOf(rate)) } } diff --git a/tests/paginated_collection_test.go b/paginated_collection_test.go similarity index 82% rename from tests/paginated_collection_test.go rename to paginated_collection_test.go index ba1b36e..99e32a8 100644 --- a/tests/paginated_collection_test.go +++ b/paginated_collection_test.go @@ -1,9 +1,7 @@ -package easypost_test +package easypost import ( "errors" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestGetNextPage() { @@ -11,7 +9,7 @@ func (c *ClientTests) TestGetNextPage() { assert, require := c.Assert(), c.Require() addresses, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -27,7 +25,7 @@ func (c *ClientTests) TestGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -41,7 +39,7 @@ func (c *ClientTests) TestGetNextPageWithPageSize() { assert, require := c.Assert(), c.Require() addresses, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -59,7 +57,7 @@ func (c *ClientTests) TestGetNextPageWithPageSize() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -69,13 +67,13 @@ func (c *ClientTests) TestGetNextPageWithPageSize() { } func (c *ClientTests) TestGetNextPageReachEnd() { - mockRequests := []easypost.MockRequest{ + mockRequests := []MockRequest{ { - MatchRule: easypost.MockRequestMatchRule{ + MatchRule: MockRequestMatchRule{ Method: "GET", UrlRegexPattern: "v2\\/addresses", }, - ResponseInfo: easypost.MockRequestResponseInfo{ + ResponseInfo: MockRequestResponseInfo{ StatusCode: 200, Body: `{"addresses": [], "has_more": false}`, }, @@ -86,7 +84,7 @@ func (c *ClientTests) TestGetNextPageReachEnd() { assert, require := c.Assert(), c.Require() addresses, err := client.ListAddresses( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -97,7 +95,7 @@ func (c *ClientTests) TestGetNextPageReachEnd() { for { addresses, err = client.GetNextAddressPage(addresses) if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { hitEnd = true } else { diff --git a/tests/parcel_test.go b/parcel_test.go similarity index 74% rename from tests/parcel_test.go rename to parcel_test.go index d96489c..e440af4 100644 --- a/tests/parcel_test.go +++ b/parcel_test.go @@ -1,10 +1,8 @@ -package easypost_test +package easypost import ( "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestParcelCreate() { @@ -14,7 +12,7 @@ func (c *ClientTests) TestParcelCreate() { parcel, err := client.CreateParcel(c.fixture.BasicParcel()) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Parcel{}), reflect.TypeOf(parcel)) + assert.Equal(reflect.TypeOf(&Parcel{}), reflect.TypeOf(parcel)) assert.True(strings.HasPrefix(parcel.ID, "prcl_")) assert.Equal(15.4, parcel.Weight) } @@ -29,6 +27,6 @@ func (c *ClientTests) TestParcelRetrieve() { retrievedParcel, err := client.GetParcel(parcel.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Parcel{}), reflect.TypeOf(retrievedParcel)) + assert.Equal(reflect.TypeOf(&Parcel{}), reflect.TypeOf(retrievedParcel)) assert.Equal(parcel, retrievedParcel) } diff --git a/tests/pickup_test.go b/pickup_test.go similarity index 87% rename from tests/pickup_test.go rename to pickup_test.go index 2e39a12..9960d45 100644 --- a/tests/pickup_test.go +++ b/pickup_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestPickupCreate() { @@ -21,7 +19,7 @@ func (c *ClientTests) TestPickupCreate() { pickup, err := client.CreatePickup(pickupData) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Pickup{}), reflect.TypeOf(pickup)) + assert.Equal(reflect.TypeOf(&Pickup{}), reflect.TypeOf(pickup)) assert.True(strings.HasPrefix(pickup.ID, "pickup_")) assert.NotNil(pickup.PickupRates) } @@ -42,7 +40,7 @@ func (c *ClientTests) TestPickupRetrieve() { retrievePickup, err := client.GetPickup(pickup.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Pickup{}), reflect.TypeOf(retrievePickup)) + assert.Equal(reflect.TypeOf(&Pickup{}), reflect.TypeOf(retrievePickup)) assert.Equal(pickup.ID, retrievePickup.ID) } @@ -61,14 +59,14 @@ func (c *ClientTests) TestPickupBuy() { boughtPickup, err := client.BuyPickup( pickup.ID, - &easypost.PickupRate{ + &PickupRate{ Carrier: c.fixture.USPS(), Service: c.fixture.PickupService(), }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Pickup{}), reflect.TypeOf(boughtPickup)) + assert.Equal(reflect.TypeOf(&Pickup{}), reflect.TypeOf(boughtPickup)) assert.True(strings.HasPrefix(boughtPickup.ID, "pickup_")) assert.NotNil(pickup.Confirmation) assert.Equal("scheduled", boughtPickup.Status) @@ -89,7 +87,7 @@ func (c *ClientTests) TestPickupCancel() { boughtPickup, err := client.BuyPickup( pickup.ID, - &easypost.PickupRate{ + &PickupRate{ Carrier: c.fixture.USPS(), Service: c.fixture.PickupService(), }, @@ -99,7 +97,7 @@ func (c *ClientTests) TestPickupCancel() { cancelledPickup, err := client.CancelPickup(boughtPickup.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Pickup{}), reflect.TypeOf(cancelledPickup)) + assert.Equal(reflect.TypeOf(&Pickup{}), reflect.TypeOf(cancelledPickup)) assert.True(strings.HasPrefix(cancelledPickup.ID, "pickup_")) assert.Equal("canceled", cancelledPickup.Status) } @@ -138,7 +136,7 @@ func (c *ClientTests) TestPickupAll() { assert, require := c.Assert(), c.Require() pickups, err := client.ListPickups( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -147,7 +145,7 @@ func (c *ClientTests) TestPickupAll() { assert.LessOrEqual(len(pickups.Pickups), c.fixture.pageSize()) assert.NotNil(pickups.HasMore) for _, pickup := range pickups.Pickups { - assert.Equal(reflect.TypeOf(&easypost.Pickup{}), reflect.TypeOf(pickup)) + assert.Equal(reflect.TypeOf(&Pickup{}), reflect.TypeOf(pickup)) } } @@ -156,7 +154,7 @@ func (c *ClientTests) TestPickupsGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListPickups( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -174,7 +172,7 @@ func (c *ClientTests) TestPickupsGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return diff --git a/tests/rate_test.go b/rate_test.go similarity index 82% rename from tests/rate_test.go rename to rate_test.go index 13a6807..8c12c87 100644 --- a/tests/rate_test.go +++ b/rate_test.go @@ -1,10 +1,8 @@ -package easypost_test +package easypost import ( "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestRateRetrieve() { @@ -17,7 +15,7 @@ func (c *ClientTests) TestRateRetrieve() { rate, err := client.GetRate(shipment.Rates[0].ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Rate{}), reflect.TypeOf(rate)) + assert.Equal(reflect.TypeOf(&Rate{}), reflect.TypeOf(rate)) assert.True(strings.HasPrefix(rate.ID, "rate_")) } @@ -28,7 +26,7 @@ func (c *ClientTests) TestBetaStatelessRateRetrieve() { rates, err := client.BetaGetStatelessRates(c.fixture.BasicShipment()) require.NoError(err) - assert.Equal(reflect.TypeOf([]*easypost.StatelessRate{}), reflect.TypeOf(rates)) + assert.Equal(reflect.TypeOf([]*StatelessRate{}), reflect.TypeOf(rates)) } func (c *ClientTests) TestBetaStatelessRateGetLowest() { @@ -41,7 +39,7 @@ func (c *ClientTests) TestBetaStatelessRateGetLowest() { lowestRate, err := client.LowestStatelessRate(rates) require.NoError(err) - assert.Equal(reflect.TypeOf(easypost.StatelessRate{}), reflect.TypeOf(lowestRate)) + assert.Equal(reflect.TypeOf(StatelessRate{}), reflect.TypeOf(lowestRate)) assert.Equal("GroundAdvantage", lowestRate.Service) } diff --git a/tests/referral_customer_test.go b/referral_customer_test.go similarity index 84% rename from tests/referral_customer_test.go rename to referral_customer_test.go index fbed772..7136b58 100644 --- a/tests/referral_customer_test.go +++ b/referral_customer_test.go @@ -1,21 +1,19 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestBetaReferralAddPaymentMethod() { client := c.ReferralClient() assert, require := c.Assert(), c.Require() - _, err := client.BetaAddPaymentMethod("cus_123", "ba_123", easypost.PrimaryPaymentMethodPriority) + _, err := client.BetaAddPaymentMethod("cus_123", "ba_123", PrimaryPaymentMethodPriority) require.Error(err) - var eperr *easypost.APIError + var eperr *APIError if errors.As(err, &eperr) { assert.Equal(422, eperr.StatusCode) assert.Equal("BILLING.INVALID_PAYMENT_GATEWAY_REFERENCE", eperr.Code) @@ -30,7 +28,7 @@ func (c *ClientTests) TestBetaReferralRefundByAmount() { _, err := client.BetaRefundByAmount(2000) require.Error(err) - var eperr *easypost.APIError + var eperr *APIError if errors.As(err, &eperr) { assert.Equal(422, eperr.StatusCode) assert.Equal("TRANSACTION.AMOUNT_INVALID", eperr.Code) @@ -45,7 +43,7 @@ func (c *ClientTests) TestBetaReferralRefundByPaymentLogId() { _, err := client.BetaRefundByPaymentLog("paylog_...") require.Error(err) - var eperr *easypost.APIError + var eperr *APIError if errors.As(err, &eperr) { assert.Equal(422, eperr.StatusCode) assert.Equal("TRANSACTION.DOES_NOT_EXIST", eperr.Code) @@ -62,7 +60,7 @@ func (c *ClientTests) TestReferralCustomerCreate() { ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.ReferralCustomer{}), reflect.TypeOf(user)) + assert.Equal(reflect.TypeOf(&ReferralCustomer{}), reflect.TypeOf(user)) assert.True(strings.HasPrefix(user.ID, "user_")) assert.Equal("Test Referral", user.Name) } @@ -72,7 +70,7 @@ func (c *ClientTests) TestReferralCustomerAll() { assert, require := c.Assert(), c.Require() referralCustomerCollection, err := client.ListReferralCustomers( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -81,13 +79,13 @@ func (c *ClientTests) TestReferralCustomerAll() { assert.LessOrEqual(len(referralCustomerCollection.ReferralCustomers), c.fixture.pageSize()) assert.NotNil(referralCustomerCollection.HasMore) for _, referralCustomer := range referralCustomerCollection.ReferralCustomers { - assert.Equal(reflect.TypeOf(&easypost.ReferralCustomer{}), reflect.TypeOf(referralCustomer)) + assert.Equal(reflect.TypeOf(&ReferralCustomer{}), reflect.TypeOf(referralCustomer)) } users, err := client.ListReferralCustomers(nil) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.ListReferralCustomersResult{}), reflect.TypeOf(users)) + assert.Equal(reflect.TypeOf(&ListReferralCustomersResult{}), reflect.TypeOf(users)) assert.True(len(users.ReferralCustomers) > 0) } @@ -111,10 +109,10 @@ func (c *ClientTests) TestReferralCustomerAddCreditCard() { referralAPIKey := c.ReferralAPIKey() - creditCard, err := client.AddReferralCustomerCreditCard(referralAPIKey, c.fixture.TestCreditCard(), easypost.PrimaryPaymentMethodPriority) + creditCard, err := client.AddReferralCustomerCreditCard(referralAPIKey, c.fixture.TestCreditCard(), PrimaryPaymentMethodPriority) require.NoError(err) - require.Equal(reflect.TypeOf(&easypost.PaymentMethodObject{}), reflect.TypeOf(creditCard)) + require.Equal(reflect.TypeOf(&PaymentMethodObject{}), reflect.TypeOf(creditCard)) assert.True(strings.HasSuffix(c.fixture.TestCreditCard().Number, creditCard.Last4)) } @@ -127,11 +125,11 @@ func (c *ClientTests) TestAddReferralCustomerCreditCardFromStripe() { _, err := client.AddReferralCustomerCreditCardFromStripe( referralAPIKey, c.fixture.BillingData().PaymentMethodID, - easypost.PrimaryPaymentMethodPriority, + PrimaryPaymentMethodPriority, ) require.Error(err) - var apiErr *easypost.APIError + var apiErr *APIError if errors.As(err, &apiErr) { assert.Equal("Stripe::PaymentMethod does not exist for the specified reference_id", apiErr.Message) } @@ -147,11 +145,11 @@ func (c *ClientTests) TestAddReferralCustomerBankAccountFromStripe() { referralAPIKey, c.fixture.BillingData().FinancialConnectionsID, c.fixture.BillingData().MandateData, - easypost.PrimaryPaymentMethodPriority, + PrimaryPaymentMethodPriority, ) require.Error(err) - var apiErr *easypost.APIError + var apiErr *APIError if errors.As(err, &apiErr) { assert.Equal("account_holder_name must be present when creating a Financial Connections payment method", apiErr.Message) } @@ -162,7 +160,7 @@ func (c *ClientTests) TestReferralCustomersGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListReferralCustomers( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -180,7 +178,7 @@ func (c *ClientTests) TestReferralCustomersGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return diff --git a/tests/refund_test.go b/refund_test.go similarity index 86% rename from tests/refund_test.go rename to refund_test.go index ad7ddfa..d425683 100644 --- a/tests/refund_test.go +++ b/refund_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestRefundCreate() { @@ -35,7 +33,7 @@ func (c *ClientTests) TestRefundAll() { assert, require := c.Assert(), c.Require() refunds, err := client.ListRefunds( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -46,7 +44,7 @@ func (c *ClientTests) TestRefundAll() { assert.LessOrEqual(len(refundsList), c.fixture.pageSize()) assert.NotNil(refunds.HasMore) for _, refund := range refundsList { - assert.Equal(reflect.TypeOf(&easypost.Refund{}), reflect.TypeOf(refund)) + assert.Equal(reflect.TypeOf(&Refund{}), reflect.TypeOf(refund)) } } @@ -55,7 +53,7 @@ func (c *ClientTests) TestRefundRetrieve() { assert, require := c.Assert(), c.Require() refunds, err := client.ListRefunds( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -64,7 +62,7 @@ func (c *ClientTests) TestRefundRetrieve() { retrievedRefund, err := client.GetRefund(refunds.Refunds[0].ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Refund{}), reflect.TypeOf(retrievedRefund)) + assert.Equal(reflect.TypeOf(&Refund{}), reflect.TypeOf(retrievedRefund)) assert.Equal(refunds.Refunds[0].ID, retrievedRefund.ID) } @@ -73,7 +71,7 @@ func (c *ClientTests) TestRefundsGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListRefunds( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -91,7 +89,7 @@ func (c *ClientTests) TestRefundsGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return diff --git a/tests/report_test.go b/report_test.go similarity index 85% rename from tests/report_test.go rename to report_test.go index bd5f540..0e5b452 100644 --- a/tests/report_test.go +++ b/report_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestReportCreate() { @@ -14,14 +12,14 @@ func (c *ClientTests) TestReportCreate() { report, err := client.CreateReport( c.fixture.ReportType(), - &easypost.Report{ + &Report{ StartDate: c.fixture.ReportDate(), EndDate: c.fixture.ReportDate(), }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Report{}), reflect.TypeOf(report)) + assert.Equal(reflect.TypeOf(&Report{}), reflect.TypeOf(report)) assert.True(strings.HasPrefix(report.ID, "shprep_")) } @@ -31,7 +29,7 @@ func (c *ClientTests) TestReportCustomColumnsCreate() { report, err := client.CreateReport( c.fixture.ReportType(), - &easypost.Report{ + &Report{ StartDate: c.fixture.ReportDate(), EndDate: c.fixture.ReportDate(), Columns: []string{"usps_zone"}, @@ -44,7 +42,7 @@ func (c *ClientTests) TestReportCustomColumnsCreate() { // There's unfortunately no way to check if the columns were included in the final report without parsing the CSV, // so we assume, if we haven't gotten an error by this point, we've made the API calls correctly // any failure at this point is a server-side issue - assert.Equal(reflect.TypeOf(&easypost.Report{}), reflect.TypeOf(report)) + assert.Equal(reflect.TypeOf(&Report{}), reflect.TypeOf(report)) } func (c *ClientTests) TestReportCustomAdditionalColumnsCreate() { @@ -53,7 +51,7 @@ func (c *ClientTests) TestReportCustomAdditionalColumnsCreate() { report, err := client.CreateReport( c.fixture.ReportType(), - &easypost.Report{ + &Report{ StartDate: c.fixture.ReportDate(), EndDate: c.fixture.ReportDate(), AdditionalColumns: []string{"from_name", "from_company"}, @@ -66,7 +64,7 @@ func (c *ClientTests) TestReportCustomAdditionalColumnsCreate() { // There's unfortunately no way to check if the columns were included in the final report without parsing the CSV, // so we assume, if we haven't gotten an error by this point, we've made the API calls correctly // any failure at this point is a server-side issue - assert.Equal(reflect.TypeOf(&easypost.Report{}), reflect.TypeOf(report)) + assert.Equal(reflect.TypeOf(&Report{}), reflect.TypeOf(report)) } func (c *ClientTests) TestReportRetrieve() { @@ -75,7 +73,7 @@ func (c *ClientTests) TestReportRetrieve() { report, err := client.CreateReport( c.fixture.ReportType(), - &easypost.Report{ + &Report{ StartDate: c.fixture.ReportDate(), EndDate: c.fixture.ReportDate(), }, @@ -85,7 +83,7 @@ func (c *ClientTests) TestReportRetrieve() { retrievedReport, err := client.GetReport(c.fixture.ReportType(), report.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Report{}), reflect.TypeOf(retrievedReport)) + assert.Equal(reflect.TypeOf(&Report{}), reflect.TypeOf(retrievedReport)) assert.Equal(report.StartDate, retrievedReport.StartDate) assert.Equal(report.EndDate, retrievedReport.EndDate) } @@ -96,7 +94,7 @@ func (c *ClientTests) TestReportAll() { reports, err := client.ListReports( c.fixture.ReportType(), - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -107,7 +105,7 @@ func (c *ClientTests) TestReportAll() { assert.LessOrEqual(len(reportsList), c.fixture.pageSize()) assert.NotNil(reports.HasMore) for _, report := range reportsList { - assert.Equal(reflect.TypeOf(&easypost.Report{}), reflect.TypeOf(report)) + assert.Equal(reflect.TypeOf(&Report{}), reflect.TypeOf(report)) } } @@ -117,7 +115,7 @@ func (c *ClientTests) TestReportsGetNextPage() { firstPage, err := client.ListReports( c.fixture.ReportType(), - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -135,7 +133,7 @@ func (c *ClientTests) TestReportsGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return diff --git a/tests/scan_form_test.go b/scan_form_test.go similarity index 82% rename from tests/scan_form_test.go rename to scan_form_test.go index c815cab..e3eb2a0 100644 --- a/tests/scan_form_test.go +++ b/scan_form_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestScanFormCreate() { @@ -18,7 +16,7 @@ func (c *ClientTests) TestScanFormCreate() { scanform, err := client.CreateScanForm(shipment.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.ScanForm{}), reflect.TypeOf(scanform)) + assert.Equal(reflect.TypeOf(&ScanForm{}), reflect.TypeOf(scanform)) assert.True(strings.HasPrefix(scanform.ID, "sf_")) } @@ -35,7 +33,7 @@ func (c *ClientTests) TestScanFormRetrieve() { retrievedScanform, err := client.GetScanForm(scanform.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.ScanForm{}), reflect.TypeOf(retrievedScanform)) + assert.Equal(reflect.TypeOf(&ScanForm{}), reflect.TypeOf(retrievedScanform)) assert.Equal(scanform, retrievedScanform) } @@ -44,7 +42,7 @@ func (c *ClientTests) TestScanFormAll() { assert, require := c.Assert(), c.Require() scanforms, err := client.ListScanForms( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -55,7 +53,7 @@ func (c *ClientTests) TestScanFormAll() { assert.LessOrEqual(len(scanformsList), c.fixture.pageSize()) assert.NotNil(scanforms.HasMore) for _, scanform := range scanformsList { - assert.Equal(reflect.TypeOf(&easypost.ScanForm{}), reflect.TypeOf(scanform)) + assert.Equal(reflect.TypeOf(&ScanForm{}), reflect.TypeOf(scanform)) } } @@ -64,7 +62,7 @@ func (c *ClientTests) TestScanFormsGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListScanForms( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -82,7 +80,7 @@ func (c *ClientTests) TestScanFormsGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return diff --git a/tests/shipment_test.go b/shipment_test.go similarity index 90% rename from tests/shipment_test.go rename to shipment_test.go index 1f01760..1220293 100644 --- a/tests/shipment_test.go +++ b/shipment_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestShipmentCreate() { @@ -15,7 +13,7 @@ func (c *ClientTests) TestShipmentCreate() { shipment, err := client.CreateShipment(c.fixture.FullShipment()) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Shipment{}), reflect.TypeOf(shipment)) + assert.Equal(reflect.TypeOf(&Shipment{}), reflect.TypeOf(shipment)) assert.True(strings.HasPrefix(shipment.ID, "shp_")) assert.NotNil(shipment.Rates) assert.Equal("PNG", shipment.Options.LabelFormat) @@ -33,7 +31,7 @@ func (c *ClientTests) TestShipmentRetrieve() { retrievedShipment, err := client.GetShipment(shipment.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Shipment{}), reflect.TypeOf(retrievedShipment)) + assert.Equal(reflect.TypeOf(&Shipment{}), reflect.TypeOf(retrievedShipment)) assert.Equal(shipment, retrievedShipment) } @@ -42,7 +40,7 @@ func (c *ClientTests) TestShipmentAll() { assert, require := c.Assert(), c.Require() shipments, err := client.ListShipments( - &easypost.ListShipmentsOptions{ + &ListShipmentsOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -53,7 +51,7 @@ func (c *ClientTests) TestShipmentAll() { assert.LessOrEqual(len(shipmentsList), c.fixture.pageSize()) assert.NotNil(shipments.HasMore) for _, shipment := range shipmentsList { - assert.Equal(reflect.TypeOf(&easypost.Shipment{}), reflect.TypeOf(shipment)) + assert.Equal(reflect.TypeOf(&Shipment{}), reflect.TypeOf(shipment)) } } @@ -83,9 +81,9 @@ func (c *ClientTests) TestShipmentRegenerateRates() { rates, err := client.RerateShipment(shipment.ID) require.NoError(err) - assert.Equal(reflect.TypeOf([]*easypost.Rate{}), reflect.TypeOf(rates)) + assert.Equal(reflect.TypeOf([]*Rate{}), reflect.TypeOf(rates)) for _, rate := range rates { - assert.Equal(reflect.TypeOf(&easypost.Rate{}), reflect.TypeOf(rate)) + assert.Equal(reflect.TypeOf(&Rate{}), reflect.TypeOf(rate)) } } @@ -167,13 +165,13 @@ func (c *ClientTests) TestShipmentCreateEmptyObjects() { shipmentData.Options = nil shipmentData.TaxIdentifiers = nil shipmentData.Reference = "" - shipmentData.CustomsInfo = &easypost.CustomsInfo{} - shipmentData.CustomsInfo.CustomsItems = []*easypost.CustomsItem{} + shipmentData.CustomsInfo = &CustomsInfo{} + shipmentData.CustomsInfo.CustomsItems = []*CustomsItem{} shipment, err := client.CreateShipment(shipmentData) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Shipment{}), reflect.TypeOf(shipment)) + assert.Equal(reflect.TypeOf(&Shipment{}), reflect.TypeOf(shipment)) assert.True(strings.HasPrefix(shipment.ID, "shp_")) assert.NotNil(shipment.Options) // The EasyPost API populates some default values here assert.Nil(shipment.CustomsInfo) @@ -186,12 +184,12 @@ func (c *ClientTests) TestShipmentCreateTaxIdentifier() { assert, require := c.Assert(), c.Require() shipmentData := c.fixture.BasicShipment() - shipmentData.TaxIdentifiers = []*easypost.TaxIdentifier{c.fixture.TaxIdentifier()} + shipmentData.TaxIdentifiers = []*TaxIdentifier{c.fixture.TaxIdentifier()} shipment, err := client.CreateShipment(shipmentData) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Shipment{}), reflect.TypeOf(shipment)) + assert.Equal(reflect.TypeOf(&Shipment{}), reflect.TypeOf(shipment)) assert.True(strings.HasPrefix(shipment.ID, "shp_")) assert.Equal("IOSS", shipment.TaxIdentifiers[0].TaxIdType) } @@ -208,15 +206,15 @@ func (c *ClientTests) TestShipmentCreateWithIds() { require.NoError(err) shipment, err := client.CreateShipment( - &easypost.Shipment{ - FromAddress: &easypost.Address{ID: fromAddress.ID}, - ToAddress: &easypost.Address{ID: toAddress.ID}, - Parcel: &easypost.Parcel{ID: parcel.ID}, + &Shipment{ + FromAddress: &Address{ID: fromAddress.ID}, + ToAddress: &Address{ID: toAddress.ID}, + Parcel: &Parcel{ID: parcel.ID}, }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Shipment{}), reflect.TypeOf(shipment)) + assert.Equal(reflect.TypeOf(&Shipment{}), reflect.TypeOf(shipment)) assert.True(strings.HasPrefix(shipment.ID, "shp_")) assert.True(strings.HasPrefix(shipment.FromAddress.ID, "adr_")) assert.True(strings.HasPrefix(shipment.ToAddress.ID, "adr_")) @@ -323,7 +321,7 @@ func (c *ClientTests) TestShipmentsGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListShipments( - &easypost.ListShipmentsOptions{ + &ListShipmentsOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -341,7 +339,7 @@ func (c *ClientTests) TestShipmentsGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -395,7 +393,7 @@ func (c *ClientTests) TestCreateAndBuyLumaShipment() { shipmentData := c.fixture.OneCallBuyShipment() shipmentData.Service = "" - lumaRequest := easypost.LumaRequest{ + lumaRequest := LumaRequest{ Shipment: *shipmentData, RulesetName: c.fixture.LumaRulesetName(), PlannedShipDate: c.fixture.LumaPlannedShipDate(), @@ -414,7 +412,7 @@ func (c *ClientTests) TestBuyLumaShipment() { shipment, err := client.CreateShipment(c.fixture.BasicShipment()) require.NoError(err) - lumaRequest := easypost.LumaRequest{ + lumaRequest := LumaRequest{ RulesetName: c.fixture.LumaRulesetName(), PlannedShipDate: c.fixture.LumaPlannedShipDate(), } diff --git a/tests/smart_rate_test.go b/smart_rate_test.go similarity index 90% rename from tests/smart_rate_test.go rename to smart_rate_test.go index c0997d8..a2ca336 100644 --- a/tests/smart_rate_test.go +++ b/smart_rate_test.go @@ -1,8 +1,4 @@ -package easypost_test - -import ( - "github.com/EasyPost/easypost-go/v5" -) +package easypost func (c *ClientTests) TestEstimateDeliveryDateForZipPair() { client := c.TestClient() @@ -10,7 +6,7 @@ func (c *ClientTests) TestEstimateDeliveryDateForZipPair() { carrier := c.fixture.USPS() - params := &easypost.EstimateDeliveryDateForZipPairParams{ + params := &EstimateDeliveryDateForZipPairParams{ FromZip: c.fixture.CaAddress1().Zip, ToZip: c.fixture.CaAddress2().Zip, Carriers: []string{carrier}, @@ -37,7 +33,7 @@ func (c *ClientTests) TestRecommendShipDateForZipPair() { carrier := c.fixture.USPS() - params := &easypost.RecommendShipDateForZipPairParams{ + params := &RecommendShipDateForZipPairParams{ FromZip: c.fixture.CaAddress1().Zip, ToZip: c.fixture.CaAddress2().Zip, Carriers: []string{carrier}, diff --git a/tests/tracker_test.go b/tracker_test.go similarity index 79% rename from tests/tracker_test.go rename to tracker_test.go index 0b4a75a..eae9347 100644 --- a/tests/tracker_test.go +++ b/tracker_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestTrackerCreate() { @@ -13,13 +11,13 @@ func (c *ClientTests) TestTrackerCreate() { assert, require := c.Assert(), c.Require() tracker, err := client.CreateTracker( - &easypost.CreateTrackerOptions{ + &CreateTrackerOptions{ TrackingCode: "EZ1000000001", }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Tracker{}), reflect.TypeOf(tracker)) + assert.Equal(reflect.TypeOf(&Tracker{}), reflect.TypeOf(tracker)) assert.True(strings.HasPrefix(tracker.ID, "trk_")) assert.Equal("pre_transit", tracker.Status) } @@ -29,7 +27,7 @@ func (c *ClientTests) TestTrackerRetrieve() { assert, require := c.Assert(), c.Require() tracker, err := client.CreateTracker( - &easypost.CreateTrackerOptions{ + &CreateTrackerOptions{ TrackingCode: "EZ1000000001", }, ) @@ -39,7 +37,7 @@ func (c *ClientTests) TestTrackerRetrieve() { retrievedTracker, err := client.GetTracker(tracker.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Tracker{}), reflect.TypeOf(retrievedTracker)) + assert.Equal(reflect.TypeOf(&Tracker{}), reflect.TypeOf(retrievedTracker)) assert.Equal(tracker.ID, retrievedTracker.ID) } @@ -48,7 +46,7 @@ func (c *ClientTests) TestTrackerAll() { assert, require := c.Assert(), c.Require() trackers, err := client.ListTrackers( - &easypost.ListTrackersOptions{ + &ListTrackersOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -59,7 +57,7 @@ func (c *ClientTests) TestTrackerAll() { assert.LessOrEqual(len(trackersList), c.fixture.pageSize()) assert.NotNil(trackers.HasMore) for _, tracker := range trackersList { - assert.Equal(reflect.TypeOf(&easypost.Tracker{}), reflect.TypeOf(tracker)) + assert.Equal(reflect.TypeOf(&Tracker{}), reflect.TypeOf(tracker)) } } @@ -68,7 +66,7 @@ func (c *ClientTests) TestTrackersGetNextPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListTrackers( - &easypost.ListTrackersOptions{ + &ListTrackersOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -86,7 +84,7 @@ func (c *ClientTests) TestTrackersGetNextPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -100,14 +98,14 @@ func (c *ClientTests) TestTrackerRetrieveBatch() { assert, require := c.Assert(), c.Require() tracker, err := client.CreateTracker( - &easypost.CreateTrackerOptions{ + &CreateTrackerOptions{ TrackingCode: "EZ1000000001", }, ) require.NoError(err) trackers, err := client.RetrieveTrackerBatch( - &easypost.ListTrackersOptions{ + &ListTrackersOptions{ TrackingCodes: []string{tracker.TrackingCode}, }, ) @@ -116,6 +114,6 @@ func (c *ClientTests) TestTrackerRetrieveBatch() { trackersList := trackers.Trackers for _, tracker := range trackersList { - assert.Equal(reflect.TypeOf(&easypost.Tracker{}), reflect.TypeOf(tracker)) + assert.Equal(reflect.TypeOf(&Tracker{}), reflect.TypeOf(tracker)) } } diff --git a/tests/user_test.go b/user_test.go similarity index 82% rename from tests/user_test.go rename to user_test.go index 0eaceee..710cf6e 100644 --- a/tests/user_test.go +++ b/user_test.go @@ -1,11 +1,9 @@ -package easypost_test +package easypost import ( "errors" "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestUserCreate() { @@ -15,13 +13,13 @@ func (c *ClientTests) TestUserCreate() { userName := "Test User" user, err := client.CreateUser( - &easypost.UserOptions{ + &UserOptions{ Name: &userName, }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.User{}), reflect.TypeOf(user)) + assert.Equal(reflect.TypeOf(&User{}), reflect.TypeOf(user)) assert.True(strings.HasPrefix(user.ID, "user_")) assert.Equal("Test User", user.Name) } @@ -36,7 +34,7 @@ func (c *ClientTests) TestUserRetrieve() { retrievedUser, err := client.GetUser(authenticatedUser.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.User{}), reflect.TypeOf(retrievedUser)) + assert.Equal(reflect.TypeOf(&User{}), reflect.TypeOf(retrievedUser)) assert.True(strings.HasPrefix(retrievedUser.ID, "user_")) } @@ -47,7 +45,7 @@ func (c *ClientTests) TestUserRetrieveMe() { user, err := client.RetrieveMe() require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.User{}), reflect.TypeOf(user)) + assert.Equal(reflect.TypeOf(&User{}), reflect.TypeOf(user)) assert.True(strings.HasPrefix(user.ID, "user_")) } @@ -56,7 +54,7 @@ func (c *ClientTests) TestUserAllChildUsers() { assert, require := c.Assert(), c.Require() childUsers, err := client.ListChildUsers( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -65,7 +63,7 @@ func (c *ClientTests) TestUserAllChildUsers() { assert.LessOrEqual(len(childUsers.Children), c.fixture.pageSize()) assert.NotNil(childUsers.HasMore) for _, user := range childUsers.Children { - assert.Equal(reflect.TypeOf(&easypost.User{}), reflect.TypeOf(user)) + assert.Equal(reflect.TypeOf(&User{}), reflect.TypeOf(user)) } } @@ -74,7 +72,7 @@ func (c *ClientTests) TestUserGetNextChildUserPage() { assert, require := c.Assert(), c.Require() firstPage, err := client.ListChildUsers( - &easypost.ListOptions{ + &ListOptions{ PageSize: c.fixture.pageSize(), }, ) @@ -92,7 +90,7 @@ func (c *ClientTests) TestUserGetNextChildUserPage() { } }() if err != nil { - var endOfPaginationErr *easypost.EndOfPaginationError + var endOfPaginationErr *EndOfPaginationError if errors.As(err, &endOfPaginationErr) { assert.Equal(err.Error(), endOfPaginationErr.Error()) return @@ -111,14 +109,14 @@ func (c *ClientTests) TestUserUpdate() { test_name := "Test User" updatedUser, err := client.UpdateUser( - &easypost.UserOptions{ + &UserOptions{ ID: user.ID, Name: &test_name, }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.User{}), reflect.TypeOf(updatedUser)) + assert.Equal(reflect.TypeOf(&User{}), reflect.TypeOf(updatedUser)) assert.True(strings.HasPrefix(updatedUser.ID, "user_")) assert.Equal(test_name, updatedUser.Name) } @@ -140,7 +138,7 @@ func (c *ClientTests) TestUserUpdateBrand() { ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Brand{}), reflect.TypeOf(brand)) + assert.Equal(reflect.TypeOf(&Brand{}), reflect.TypeOf(brand)) assert.True(strings.HasPrefix(brand.ID, "brd_")) assert.Equal(color, brand.Color) } @@ -152,7 +150,7 @@ func (c *ClientTests) TestUserDelete() { userName := "Test User" user, err := client.CreateUser( - &easypost.UserOptions{ + &UserOptions{ Name: &userName, }, ) diff --git a/tests/util_test.go b/util_test.go similarity index 56% rename from tests/util_test.go rename to util_test.go index d7c5c48..024cdb9 100644 --- a/tests/util_test.go +++ b/util_test.go @@ -1,19 +1,15 @@ -package easypost_test - -import ( - "github.com/EasyPost/easypost-go/v5" -) +package easypost func (c *ClientTests) TestStringPointer() { assert := c.Assert() - stringPointer := *easypost.StringPtr("test") + stringPointer := *StringPtr("test") assert.Equal(stringPointer, "test") } func (c *ClientTests) TestBoolPointer() { assert := c.Assert() - boolPointer := *easypost.BoolPtr(true) + boolPointer := *BoolPtr(true) assert.Equal(boolPointer, true) } diff --git a/tests/webhook_test.go b/webhook_test.go similarity index 80% rename from tests/webhook_test.go rename to webhook_test.go index 3efaab1..b745090 100644 --- a/tests/webhook_test.go +++ b/webhook_test.go @@ -1,10 +1,8 @@ -package easypost_test +package easypost import ( "reflect" "strings" - - "github.com/EasyPost/easypost-go/v5" ) func (c *ClientTests) TestWebhookCreate() { @@ -12,15 +10,15 @@ func (c *ClientTests) TestWebhookCreate() { assert, require := c.Assert(), c.Require() webhook, err := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ - URL: c.fixture.WebhookUrl(), + &CreateUpdateWebhookOptions{ + URL: c.fixture.WebhookUrl(), WebhookSecret: c.fixture.WebhookSecret(), CustomHeaders: c.fixture.WebhookCustomHeaders(), }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Webhook{}), reflect.TypeOf(webhook)) + assert.Equal(reflect.TypeOf(&Webhook{}), reflect.TypeOf(webhook)) assert.True(strings.HasPrefix(webhook.ID, "hook_")) assert.Equal(c.fixture.WebhookUrl(), webhook.URL) assert.Equal(c.fixture.WebhookCustomHeaders(), webhook.CustomHeaders) @@ -36,7 +34,7 @@ func (c *ClientTests) TestWebhookRetrieve() { assert, require := c.Assert(), c.Require() webhook, err := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ URL: c.fixture.WebhookUrl(), }, ) @@ -45,7 +43,7 @@ func (c *ClientTests) TestWebhookRetrieve() { retrievedWebhook, err := client.GetWebhook(webhook.ID) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Webhook{}), reflect.TypeOf(retrievedWebhook)) + assert.Equal(reflect.TypeOf(&Webhook{}), reflect.TypeOf(retrievedWebhook)) assert.Equal(webhook, retrievedWebhook) err = client.DeleteWebhook(retrievedWebhook.ID) // we are deleting the webhook here, so we don't keep sending events to a dead webhook. @@ -63,7 +61,7 @@ func (c *ClientTests) TestWebhookAll() { assert.LessOrEqual(len(webhooks), c.fixture.pageSize()) for _, webhook := range webhooks { - assert.Equal(reflect.TypeOf(&easypost.Webhook{}), reflect.TypeOf(webhook)) + assert.Equal(reflect.TypeOf(&Webhook{}), reflect.TypeOf(webhook)) } } @@ -72,13 +70,13 @@ func (c *ClientTests) TestWebhookDelete() { assert, require := c.Assert(), c.Require() webhook, err := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ URL: c.fixture.WebhookUrl(), }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Webhook{}), reflect.TypeOf(webhook)) + assert.Equal(reflect.TypeOf(&Webhook{}), reflect.TypeOf(webhook)) assert.True(strings.HasPrefix(webhook.ID, "hook_")) assert.Equal(c.fixture.WebhookUrl(), webhook.URL) @@ -94,7 +92,7 @@ func (c *ClientTests) TestWebhookUpdate() { assert, require := c.Assert(), c.Require() webhook, err := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ URL: c.fixture.WebhookUrl(), }, ) @@ -102,7 +100,7 @@ func (c *ClientTests) TestWebhookUpdate() { updatedWebhook, err := client.UpdateWebhook( webhook.ID, - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ WebhookSecret: c.fixture.WebhookSecret(), CustomHeaders: c.fixture.WebhookCustomHeaders(), }, @@ -110,7 +108,7 @@ func (c *ClientTests) TestWebhookUpdate() { require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Webhook{}), reflect.TypeOf(updatedWebhook)) + assert.Equal(reflect.TypeOf(&Webhook{}), reflect.TypeOf(updatedWebhook)) assert.Equal(c.fixture.WebhookCustomHeaders(), updatedWebhook.CustomHeaders) err = client.DeleteWebhook(updatedWebhook.ID) @@ -122,14 +120,14 @@ func (c *ClientTests) TestWebhookCreateWithSecret() { assert, require := c.Assert(), c.Require() webhook, err := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ URL: c.fixture.WebhookUrl(), WebhookSecret: c.fixture.WebhookSecret(), }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Webhook{}), reflect.TypeOf(webhook)) + assert.Equal(reflect.TypeOf(&Webhook{}), reflect.TypeOf(webhook)) assert.True(strings.HasPrefix(webhook.ID, "hook_")) assert.Equal(c.fixture.WebhookUrl(), webhook.URL) @@ -142,20 +140,20 @@ func (c *ClientTests) TestWebhookUpdateWithSecret() { assert, require := c.Assert(), c.Require() webhook, err := client.CreateWebhook( - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ URL: c.fixture.WebhookUrl(), }, ) require.NoError(err) updatedWebhook, err := client.UpdateWebhook(webhook.ID, - &easypost.CreateUpdateWebhookOptions{ + &CreateUpdateWebhookOptions{ WebhookSecret: c.fixture.WebhookSecret(), }, ) require.NoError(err) - assert.Equal(reflect.TypeOf(&easypost.Webhook{}), reflect.TypeOf(updatedWebhook)) + assert.Equal(reflect.TypeOf(&Webhook{}), reflect.TypeOf(updatedWebhook)) err = client.DeleteWebhook(updatedWebhook.ID) require.NoError(err) @@ -173,7 +171,7 @@ func (c *ClientTests) TestValidateWebhook() { require.NoError(err) assert.Equal(webhookBody.Description, "tracker.updated") - assert.Equal(webhookBody.Result.(*easypost.Tracker).Weight, 614.4) // Ensure we convert floats properly + assert.Equal(webhookBody.Result.(*Tracker).Weight, 614.4) // Ensure we convert floats properly } func (c *ClientTests) TestValidateWebhookInvalidSecret() { From c06931bd6c76860caeb86614e87618715b18f76f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:17:38 -0700 Subject: [PATCH 2/6] fix: gitignore --- .gitignore | 7 +- Makefile | 1 + coverage.out | 799 --------------------------------------------------- 3 files changed, 5 insertions(+), 802 deletions(-) delete mode 100644 coverage.out diff --git a/.gitignore b/.gitignore index 3f6ebf9..32c274f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -.env .DS_Store +.env .idea/ -vendor/ -covprofile +*.out /.golangci.yml +covprofile +vendor/ diff --git a/Makefile b/Makefile index 4d232d4..f29640e 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ coverage: echo "Tests passed but statement coverage failed with coverage: $$statement_cov"; \ exit 1; \ fi + go tool cover -html=covprofile ## init-examples-submodule - Initialize the examples submodule init-examples-submodule: diff --git a/coverage.out b/coverage.out deleted file mode 100644 index fe0b956..0000000 --- a/coverage.out +++ /dev/null @@ -1,799 +0,0 @@ -mode: set -github.com/EasyPost/easypost-go/v5/address.go:110.99,112.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:116.131,120.2 3 1 -github.com/EasyPost/easypost-go/v5/address.go:123.87,125.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:129.119,132.2 2 1 -github.com/EasyPost/easypost-go/v5/address.go:135.104,137.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:140.130,142.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:146.136,148.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:152.162,153.36 1 1 -github.com/EasyPost/easypost-go/v5/address.go:153.36,156.3 2 1 -github.com/EasyPost/easypost-go/v5/address.go:157.2,159.16 3 1 -github.com/EasyPost/easypost-go/v5/address.go:159.16,161.3 1 0 -github.com/EasyPost/easypost-go/v5/address.go:162.2,162.48 1 1 -github.com/EasyPost/easypost-go/v5/address.go:166.76,168.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:172.108,177.2 4 1 -github.com/EasyPost/easypost-go/v5/address.go:180.73,182.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:186.105,189.2 2 1 -github.com/EasyPost/easypost-go/v5/address.go:192.108,194.2 1 1 -github.com/EasyPost/easypost-go/v5/address.go:198.140,204.2 5 1 -github.com/EasyPost/easypost-go/v5/api_key.go:25.57,27.2 1 1 -github.com/EasyPost/easypost-go/v5/api_key.go:31.87,34.2 2 1 -github.com/EasyPost/easypost-go/v5/api_key.go:37.77,39.2 1 1 -github.com/EasyPost/easypost-go/v5/api_key.go:43.109,46.16 2 1 -github.com/EasyPost/easypost-go/v5/api_key.go:46.16,48.3 1 0 -github.com/EasyPost/easypost-go/v5/api_key.go:50.2,50.23 1 1 -github.com/EasyPost/easypost-go/v5/api_key.go:50.23,52.3 1 1 -github.com/EasyPost/easypost-go/v5/api_key.go:54.2,54.38 1 1 -github.com/EasyPost/easypost-go/v5/api_key.go:54.38,55.25 1 1 -github.com/EasyPost/easypost-go/v5/api_key.go:55.25,57.4 1 0 -github.com/EasyPost/easypost-go/v5/api_key.go:60.2,60.49 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:57.71,59.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:63.103,67.2 3 1 -github.com/EasyPost/easypost-go/v5/batch.go:70.85,72.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:76.117,79.2 2 1 -github.com/EasyPost/easypost-go/v5/batch.go:85.102,87.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:92.134,96.2 3 1 -github.com/EasyPost/easypost-go/v5/batch.go:100.107,102.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:107.139,111.2 3 1 -github.com/EasyPost/easypost-go/v5/batch.go:115.67,117.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:121.99,124.2 2 1 -github.com/EasyPost/easypost-go/v5/batch.go:127.67,129.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:133.99,136.2 2 1 -github.com/EasyPost/easypost-go/v5/batch.go:140.81,142.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:146.113,152.2 3 1 -github.com/EasyPost/easypost-go/v5/batch.go:155.87,157.2 1 1 -github.com/EasyPost/easypost-go/v5/batch.go:162.119,168.2 3 1 -github.com/EasyPost/easypost-go/v5/billing.go:9.82,11.2 1 1 -github.com/EasyPost/easypost-go/v5/billing.go:15.114,19.2 3 1 -github.com/EasyPost/easypost-go/v5/billing.go:22.88,24.2 1 1 -github.com/EasyPost/easypost-go/v5/billing.go:28.120,39.2 6 1 -github.com/EasyPost/easypost-go/v5/billing.go:42.75,44.2 1 1 -github.com/EasyPost/easypost-go/v5/billing.go:48.105,51.18 2 1 -github.com/EasyPost/easypost-go/v5/billing.go:51.18,53.3 1 0 -github.com/EasyPost/easypost-go/v5/billing.go:55.2,55.8 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:80.74,81.70 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:81.70,82.21 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:82.21,84.4 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:87.2,87.54 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:87.54,88.21 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:88.21,90.4 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:93.2,93.66 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:93.66,94.21 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:94.21,96.4 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:99.2,99.27 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:103.68,105.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:108.98,111.2 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:136.92,138.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:142.124,144.54 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:144.54,145.25 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:145.25,147.4 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:150.2,150.66 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:150.66,151.25 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:151.25,153.4 1 0 -github.com/EasyPost/easypost-go/v5/carrier.go:156.2,159.8 4 1 -github.com/EasyPost/easypost-go/v5/carrier.go:164.116,166.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:170.148,173.54 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:173.54,174.25 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:174.25,176.9 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:179.2,179.19 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:179.19,181.3 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:183.2,186.8 4 1 -github.com/EasyPost/easypost-go/v5/carrier.go:191.97,193.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:197.129,200.66 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:200.66,201.25 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:201.25,203.9 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:206.2,206.21 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:206.21,208.3 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:210.2,213.8 4 1 -github.com/EasyPost/easypost-go/v5/carrier.go:217.75,219.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:222.105,225.2 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:228.94,230.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:233.126,236.2 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:252.92,254.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:258.124,260.16 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:260.16,262.3 1 0 -github.com/EasyPost/easypost-go/v5/carrier.go:265.2,265.54 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:265.54,266.30 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:266.30,268.4 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:271.2,273.8 3 1 -github.com/EasyPost/easypost-go/v5/carrier.go:278.125,280.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:284.157,286.16 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:286.16,288.3 1 0 -github.com/EasyPost/easypost-go/v5/carrier.go:291.2,292.54 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:292.54,293.30 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:293.30,295.9 2 1 -github.com/EasyPost/easypost-go/v5/carrier.go:298.2,298.19 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:298.19,300.3 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:302.2,304.8 3 1 -github.com/EasyPost/easypost-go/v5/carrier.go:308.70,310.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier.go:313.102,315.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:58.75,60.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:63.104,65.2 1 0 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:68.98,70.2 1 0 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:73.128,75.2 1 1 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:78.140,85.21 3 1 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:85.21,87.3 1 1 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:88.2,88.18 1 1 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:88.18,90.3 1 1 -github.com/EasyPost/easypost-go/v5/carrier_metadata.go:92.2,97.8 3 1 -github.com/EasyPost/easypost-go/v5/claim.go:76.81,78.2 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:81.113,84.2 2 1 -github.com/EasyPost/easypost-go/v5/claim.go:87.92,89.2 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:92.124,97.2 3 1 -github.com/EasyPost/easypost-go/v5/claim.go:100.100,102.2 1 0 -github.com/EasyPost/easypost-go/v5/claim.go:105.126,107.2 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:110.132,112.2 1 0 -github.com/EasyPost/easypost-go/v5/claim.go:115.158,116.33 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:116.33,119.3 2 0 -github.com/EasyPost/easypost-go/v5/claim.go:120.2,122.16 3 1 -github.com/EasyPost/easypost-go/v5/claim.go:122.16,124.3 1 0 -github.com/EasyPost/easypost-go/v5/claim.go:125.2,127.18 3 1 -github.com/EasyPost/easypost-go/v5/claim.go:127.18,129.3 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:130.2,130.50 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:134.67,136.2 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:139.99,142.2 2 1 -github.com/EasyPost/easypost-go/v5/claim.go:145.70,147.2 1 1 -github.com/EasyPost/easypost-go/v5/claim.go:150.102,153.2 2 1 -github.com/EasyPost/easypost-go/v5/client.go:26.13,32.2 2 1 -github.com/EasyPost/easypost-go/v5/client.go:62.33,64.2 1 1 -github.com/EasyPost/easypost-go/v5/client.go:66.37,67.22 1 1 -github.com/EasyPost/easypost-go/v5/client.go:67.22,69.3 1 0 -github.com/EasyPost/easypost-go/v5/client.go:70.2,70.19 1 1 -github.com/EasyPost/easypost-go/v5/client.go:73.37,74.23 1 1 -github.com/EasyPost/easypost-go/v5/client.go:74.23,76.3 1 0 -github.com/EasyPost/easypost-go/v5/client.go:77.2,77.25 1 1 -github.com/EasyPost/easypost-go/v5/client.go:80.42,83.20 2 1 -github.com/EasyPost/easypost-go/v5/client.go:83.20,85.3 1 1 -github.com/EasyPost/easypost-go/v5/client.go:86.2,86.50 1 1 -github.com/EasyPost/easypost-go/v5/client.go:89.40,91.19 2 1 -github.com/EasyPost/easypost-go/v5/client.go:91.19,93.3 1 0 -github.com/EasyPost/easypost-go/v5/client.go:94.2,95.15 2 1 -github.com/EasyPost/easypost-go/v5/client.go:98.77,99.20 1 1 -github.com/EasyPost/easypost-go/v5/client.go:100.41,104.13 3 1 -github.com/EasyPost/easypost-go/v5/client.go:106.57,109.17 2 1 -github.com/EasyPost/easypost-go/v5/client.go:109.17,111.4 1 0 -github.com/EasyPost/easypost-go/v5/client.go:112.3,113.47 2 1 -github.com/EasyPost/easypost-go/v5/client.go:113.47,115.4 1 0 -github.com/EasyPost/easypost-go/v5/client.go:116.3,121.13 3 1 -github.com/EasyPost/easypost-go/v5/client.go:122.10,123.58 1 0 -github.com/EasyPost/easypost-go/v5/client.go:127.106,128.20 1 1 -github.com/EasyPost/easypost-go/v5/client.go:128.20,130.3 1 1 -github.com/EasyPost/easypost-go/v5/client.go:132.2,139.53 3 1 -github.com/EasyPost/easypost-go/v5/client.go:139.53,141.3 1 0 -github.com/EasyPost/easypost-go/v5/client.go:143.2,144.16 2 1 -github.com/EasyPost/easypost-go/v5/client.go:144.16,146.3 1 1 -github.com/EasyPost/easypost-go/v5/client.go:148.2,164.61 6 1 -github.com/EasyPost/easypost-go/v5/client.go:164.61,166.3 1 1 -github.com/EasyPost/easypost-go/v5/client.go:168.2,168.29 1 1 -github.com/EasyPost/easypost-go/v5/client.go:168.29,171.17 2 1 -github.com/EasyPost/easypost-go/v5/client.go:171.17,173.4 1 0 -github.com/EasyPost/easypost-go/v5/client.go:174.8,177.3 1 1 -github.com/EasyPost/easypost-go/v5/client.go:179.2,179.16 1 1 -github.com/EasyPost/easypost-go/v5/client.go:179.16,192.63 2 0 -github.com/EasyPost/easypost-go/v5/client.go:192.63,194.4 1 0 -github.com/EasyPost/easypost-go/v5/client.go:196.3,196.13 1 0 -github.com/EasyPost/easypost-go/v5/client.go:200.2,212.62 2 1 -github.com/EasyPost/easypost-go/v5/client.go:212.62,214.3 1 1 -github.com/EasyPost/easypost-go/v5/client.go:216.2,216.15 1 1 -github.com/EasyPost/easypost-go/v5/client.go:216.15,216.39 1 1 -github.com/EasyPost/easypost-go/v5/client.go:219.2,219.52 1 1 -github.com/EasyPost/easypost-go/v5/client.go:219.52,220.17 1 1 -github.com/EasyPost/easypost-go/v5/client.go:220.17,222.4 1 1 -github.com/EasyPost/easypost-go/v5/client.go:223.3,223.13 1 1 -github.com/EasyPost/easypost-go/v5/client.go:227.2,229.15 2 1 -github.com/EasyPost/easypost-go/v5/constants.go:3.59,5.2 1 1 -github.com/EasyPost/easypost-go/v5/constants.go:10.43,12.2 1 1 -github.com/EasyPost/easypost-go/v5/constants.go:14.55,16.2 1 1 -github.com/EasyPost/easypost-go/v5/customs.go:73.83,75.2 1 1 -github.com/EasyPost/easypost-go/v5/customs.go:80.115,84.2 3 1 -github.com/EasyPost/easypost-go/v5/customs.go:87.85,89.2 1 1 -github.com/EasyPost/easypost-go/v5/customs.go:93.117,96.2 2 1 -github.com/EasyPost/easypost-go/v5/customs.go:111.83,113.2 1 1 -github.com/EasyPost/easypost-go/v5/customs.go:118.115,122.2 3 1 -github.com/EasyPost/easypost-go/v5/customs.go:125.85,127.2 1 1 -github.com/EasyPost/easypost-go/v5/customs.go:131.117,134.2 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:10.57,12.25 1 1 -github.com/EasyPost/easypost-go/v5/datetime.go:12.25,14.3 1 0 -github.com/EasyPost/easypost-go/v5/datetime.go:16.2,20.16 3 1 -github.com/EasyPost/easypost-go/v5/datetime.go:20.16,23.3 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:26.2,27.16 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:27.16,29.3 1 0 -github.com/EasyPost/easypost-go/v5/datetime.go:30.2,31.12 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:34.51,36.2 1 1 -github.com/EasyPost/easypost-go/v5/datetime.go:38.37,40.2 1 1 -github.com/EasyPost/easypost-go/v5/datetime.go:43.72,46.2 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:48.40,50.2 1 1 -github.com/EasyPost/easypost-go/v5/datetime.go:70.106,73.2 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:76.45,78.2 1 1 -github.com/EasyPost/easypost-go/v5/datetime.go:80.60,86.16 3 1 -github.com/EasyPost/easypost-go/v5/datetime.go:86.16,89.3 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:93.2,94.16 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:94.16,97.3 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:101.2,102.16 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:102.16,105.3 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:109.2,110.16 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:110.16,113.3 2 1 -github.com/EasyPost/easypost-go/v5/datetime.go:117.2,118.16 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:118.16,121.3 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:125.2,126.16 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:126.16,129.3 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:133.2,134.16 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:134.16,137.3 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:141.2,142.16 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:142.16,145.3 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:149.2,150.16 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:150.16,153.3 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:157.2,158.16 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:158.16,161.3 2 0 -github.com/EasyPost/easypost-go/v5/datetime.go:163.2,163.8 1 0 -github.com/EasyPost/easypost-go/v5/endshipper.go:15.74,17.2 1 1 -github.com/EasyPost/easypost-go/v5/endshipper.go:21.106,27.2 3 1 -github.com/EasyPost/easypost-go/v5/endshipper.go:30.79,32.2 1 1 -github.com/EasyPost/easypost-go/v5/endshipper.go:36.111,39.2 2 1 -github.com/EasyPost/easypost-go/v5/endshipper.go:42.92,44.2 1 1 -github.com/EasyPost/easypost-go/v5/endshipper.go:48.124,51.2 2 1 -github.com/EasyPost/easypost-go/v5/endshipper.go:56.75,58.2 1 1 -github.com/EasyPost/easypost-go/v5/endshipper.go:62.107,69.2 3 1 -github.com/EasyPost/easypost-go/v5/error.go:18.39,20.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:22.57,30.56 3 0 -github.com/EasyPost/easypost-go/v5/error.go:30.56,32.3 1 0 -github.com/EasyPost/easypost-go/v5/error.go:35.2,38.12 3 0 -github.com/EasyPost/easypost-go/v5/error.go:42.68,43.29 1 1 -github.com/EasyPost/easypost-go/v5/error.go:44.21,45.30 1 1 -github.com/EasyPost/easypost-go/v5/error.go:45.30,47.4 1 1 -github.com/EasyPost/easypost-go/v5/error.go:48.30,49.30 1 1 -github.com/EasyPost/easypost-go/v5/error.go:49.30,51.4 1 1 -github.com/EasyPost/easypost-go/v5/error.go:52.10,53.48 1 1 -github.com/EasyPost/easypost-go/v5/error.go:56.2,56.17 1 1 -github.com/EasyPost/easypost-go/v5/error.go:67.37,69.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:77.47,79.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:82.54,84.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:92.41,94.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:97.56,99.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:107.45,109.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:112.64,114.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:122.47,124.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:127.69,130.2 2 1 -github.com/EasyPost/easypost-go/v5/error.go:138.55,140.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:143.70,145.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:153.56,155.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:158.72,160.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:168.43,170.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:173.60,175.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:183.47,185.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:188.68,190.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:210.35,212.33 2 1 -github.com/EasyPost/easypost-go/v5/error.go:213.14,214.16 1 1 -github.com/EasyPost/easypost-go/v5/error.go:215.45,217.41 2 1 -github.com/EasyPost/easypost-go/v5/error.go:218.10,219.28 1 0 -github.com/EasyPost/easypost-go/v5/error.go:222.2,222.19 1 1 -github.com/EasyPost/easypost-go/v5/error.go:222.19,223.19 1 1 -github.com/EasyPost/easypost-go/v5/error.go:223.19,225.4 1 1 -github.com/EasyPost/easypost-go/v5/error.go:226.3,226.17 1 0 -github.com/EasyPost/easypost-go/v5/error.go:228.2,228.18 1 0 -github.com/EasyPost/easypost-go/v5/error.go:228.18,230.3 1 0 -github.com/EasyPost/easypost-go/v5/error.go:231.2,231.51 1 0 -github.com/EasyPost/easypost-go/v5/error.go:234.35,236.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:256.42,258.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:266.42,268.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:276.46,278.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:286.46,288.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:296.46,298.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:306.48,308.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:316.40,318.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:326.39,328.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:336.37,338.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:346.41,348.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:356.40,358.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:366.37,368.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:376.50,378.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:386.35,388.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:396.39,398.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:406.44,408.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:416.41,418.2 1 1 -github.com/EasyPost/easypost-go/v5/error.go:426.43,428.2 1 0 -github.com/EasyPost/easypost-go/v5/error.go:432.60,448.43 4 1 -github.com/EasyPost/easypost-go/v5/error.go:448.43,450.28 1 1 -github.com/EasyPost/easypost-go/v5/error.go:450.28,453.36 3 1 -github.com/EasyPost/easypost-go/v5/error.go:453.36,454.51 1 1 -github.com/EasyPost/easypost-go/v5/error.go:455.24,457.33 2 1 -github.com/EasyPost/easypost-go/v5/error.go:457.33,458.32 1 1 -github.com/EasyPost/easypost-go/v5/error.go:459.35,461.50 2 1 -github.com/EasyPost/easypost-go/v5/error.go:461.50,463.9 1 1 -github.com/EasyPost/easypost-go/v5/error.go:464.8,464.54 1 1 -github.com/EasyPost/easypost-go/v5/error.go:464.54,466.9 1 1 -github.com/EasyPost/easypost-go/v5/error.go:467.8,467.60 1 1 -github.com/EasyPost/easypost-go/v5/error.go:467.60,469.9 1 0 -github.com/EasyPost/easypost-go/v5/error.go:470.8,470.49 1 1 -github.com/EasyPost/easypost-go/v5/error.go:471.15,472.54 1 1 -github.com/EasyPost/easypost-go/v5/error.go:475.6,475.33 1 1 -github.com/EasyPost/easypost-go/v5/error.go:476.13,477.30 1 0 -github.com/EasyPost/easypost-go/v5/error.go:481.8,483.28 1 1 -github.com/EasyPost/easypost-go/v5/error.go:483.28,485.4 1 1 -github.com/EasyPost/easypost-go/v5/error.go:486.3,488.36 3 1 -github.com/EasyPost/easypost-go/v5/error.go:492.2,492.29 1 1 -github.com/EasyPost/easypost-go/v5/error.go:493.9,494.47 1 1 -github.com/EasyPost/easypost-go/v5/error.go:495.26,496.42 1 1 -github.com/EasyPost/easypost-go/v5/error.go:497.51,498.45 1 1 -github.com/EasyPost/easypost-go/v5/error.go:499.11,500.47 1 1 -github.com/EasyPost/easypost-go/v5/error.go:501.11,502.49 1 1 -github.com/EasyPost/easypost-go/v5/error.go:503.11,504.44 1 1 -github.com/EasyPost/easypost-go/v5/error.go:505.11,506.46 1 1 -github.com/EasyPost/easypost-go/v5/error.go:507.11,508.45 1 1 -github.com/EasyPost/easypost-go/v5/error.go:509.11,510.53 1 1 -github.com/EasyPost/easypost-go/v5/error.go:511.11,512.42 1 1 -github.com/EasyPost/easypost-go/v5/error.go:513.11,514.44 1 1 -github.com/EasyPost/easypost-go/v5/error.go:515.11,516.51 1 1 -github.com/EasyPost/easypost-go/v5/error.go:517.11,518.46 1 1 -github.com/EasyPost/easypost-go/v5/error.go:519.11,520.51 1 1 -github.com/EasyPost/easypost-go/v5/error.go:521.11,522.55 1 1 -github.com/EasyPost/easypost-go/v5/error.go:523.16,524.51 1 1 -github.com/EasyPost/easypost-go/v5/error.go:525.10,526.48 1 1 -github.com/EasyPost/easypost-go/v5/event.go:65.56,70.68 4 1 -github.com/EasyPost/easypost-go/v5/event.go:70.68,72.3 1 0 -github.com/EasyPost/easypost-go/v5/event.go:74.2,74.62 1 1 -github.com/EasyPost/easypost-go/v5/event.go:74.62,76.3 1 1 -github.com/EasyPost/easypost-go/v5/event.go:78.2,78.12 1 1 -github.com/EasyPost/easypost-go/v5/event.go:83.63,88.70 4 0 -github.com/EasyPost/easypost-go/v5/event.go:88.70,90.3 1 0 -github.com/EasyPost/easypost-go/v5/event.go:93.2,93.64 1 0 -github.com/EasyPost/easypost-go/v5/event.go:93.64,95.3 1 0 -github.com/EasyPost/easypost-go/v5/event.go:99.2,99.75 1 0 -github.com/EasyPost/easypost-go/v5/event.go:99.75,101.3 1 0 -github.com/EasyPost/easypost-go/v5/event.go:103.2,104.12 2 0 -github.com/EasyPost/easypost-go/v5/event.go:108.83,110.2 1 1 -github.com/EasyPost/easypost-go/v5/event.go:114.115,117.2 2 1 -github.com/EasyPost/easypost-go/v5/event.go:120.100,122.2 1 0 -github.com/EasyPost/easypost-go/v5/event.go:125.126,127.2 1 1 -github.com/EasyPost/easypost-go/v5/event.go:131.132,133.2 1 0 -github.com/EasyPost/easypost-go/v5/event.go:137.158,138.33 1 1 -github.com/EasyPost/easypost-go/v5/event.go:138.33,141.3 2 0 -github.com/EasyPost/easypost-go/v5/event.go:142.2,144.16 3 1 -github.com/EasyPost/easypost-go/v5/event.go:144.16,146.3 1 0 -github.com/EasyPost/easypost-go/v5/event.go:147.2,147.45 1 1 -github.com/EasyPost/easypost-go/v5/event.go:151.67,153.2 1 1 -github.com/EasyPost/easypost-go/v5/event.go:157.99,160.2 2 1 -github.com/EasyPost/easypost-go/v5/event.go:163.85,165.2 1 1 -github.com/EasyPost/easypost-go/v5/event.go:169.117,172.2 2 1 -github.com/EasyPost/easypost-go/v5/event.go:175.92,177.2 1 1 -github.com/EasyPost/easypost-go/v5/event.go:181.124,184.2 2 1 -github.com/EasyPost/easypost-go/v5/hooks.go:42.90,44.16 2 1 -github.com/EasyPost/easypost-go/v5/hooks.go:44.16,46.3 1 0 -github.com/EasyPost/easypost-go/v5/hooks.go:72.92,74.16 2 1 -github.com/EasyPost/easypost-go/v5/hooks.go:74.16,76.3 1 0 -github.com/EasyPost/easypost-go/v5/hooks.go:86.82,88.2 1 1 -github.com/EasyPost/easypost-go/v5/hooks.go:91.84,93.2 1 1 -github.com/EasyPost/easypost-go/v5/hooks.go:96.85,97.54 1 1 -github.com/EasyPost/easypost-go/v5/hooks.go:97.54,98.30 1 1 -github.com/EasyPost/easypost-go/v5/hooks.go:98.30,101.4 2 1 -github.com/EasyPost/easypost-go/v5/hooks.go:106.87,107.55 1 0 -github.com/EasyPost/easypost-go/v5/hooks.go:107.55,108.30 1 0 -github.com/EasyPost/easypost-go/v5/hooks.go:108.30,111.4 2 0 -github.com/EasyPost/easypost-go/v5/insurance.go:57.77,59.2 1 1 -github.com/EasyPost/easypost-go/v5/insurance.go:63.109,67.2 3 1 -github.com/EasyPost/easypost-go/v5/insurance.go:70.91,72.2 1 1 -github.com/EasyPost/easypost-go/v5/insurance.go:76.123,79.2 2 1 -github.com/EasyPost/easypost-go/v5/insurance.go:82.112,84.2 1 0 -github.com/EasyPost/easypost-go/v5/insurance.go:87.138,89.2 1 1 -github.com/EasyPost/easypost-go/v5/insurance.go:93.144,95.2 1 0 -github.com/EasyPost/easypost-go/v5/insurance.go:99.170,100.37 1 1 -github.com/EasyPost/easypost-go/v5/insurance.go:100.37,103.3 2 0 -github.com/EasyPost/easypost-go/v5/insurance.go:104.2,106.16 3 1 -github.com/EasyPost/easypost-go/v5/insurance.go:106.16,108.3 1 0 -github.com/EasyPost/easypost-go/v5/insurance.go:109.2,109.49 1 1 -github.com/EasyPost/easypost-go/v5/insurance.go:113.79,115.2 1 1 -github.com/EasyPost/easypost-go/v5/insurance.go:119.111,122.2 2 1 -github.com/EasyPost/easypost-go/v5/insurance.go:125.82,127.2 1 1 -github.com/EasyPost/easypost-go/v5/insurance.go:131.114,134.2 2 1 -github.com/EasyPost/easypost-go/v5/list_options.go:14.98,15.14 1 1 -github.com/EasyPost/easypost-go/v5/list_options.go:15.14,18.3 2 1 -github.com/EasyPost/easypost-go/v5/list_options.go:19.2,22.18 2 1 -github.com/EasyPost/easypost-go/v5/list_options.go:22.18,24.3 1 1 -github.com/EasyPost/easypost-go/v5/list_options.go:25.2,25.8 1 1 -github.com/EasyPost/easypost-go/v5/list_options.go:30.107,31.14 1 1 -github.com/EasyPost/easypost-go/v5/list_options.go:31.14,34.3 2 0 -github.com/EasyPost/easypost-go/v5/list_options.go:35.2,38.18 2 1 -github.com/EasyPost/easypost-go/v5/list_options.go:38.18,40.3 1 1 -github.com/EasyPost/easypost-go/v5/list_options.go:41.2,41.8 1 1 -github.com/EasyPost/easypost-go/v5/luma.go:47.77,49.2 1 1 -github.com/EasyPost/easypost-go/v5/luma.go:53.109,61.2 5 1 -github.com/EasyPost/easypost-go/v5/mocking.go:20.60,22.2 1 1 -github.com/EasyPost/easypost-go/v5/mocking.go:29.63,38.2 1 1 -github.com/EasyPost/easypost-go/v5/mocking.go:40.76,41.41 1 1 -github.com/EasyPost/easypost-go/v5/mocking.go:41.41,45.30 4 1 -github.com/EasyPost/easypost-go/v5/mocking.go:45.30,47.4 1 1 -github.com/EasyPost/easypost-go/v5/mocking.go:49.2,49.12 1 0 -github.com/EasyPost/easypost-go/v5/object.go:14.60,15.20 1 1 -github.com/EasyPost/easypost-go/v5/object.go:15.20,17.3 1 1 -github.com/EasyPost/easypost-go/v5/object.go:19.2,23.51 2 1 -github.com/EasyPost/easypost-go/v5/object.go:23.51,25.3 1 0 -github.com/EasyPost/easypost-go/v5/object.go:27.2,28.20 2 1 -github.com/EasyPost/easypost-go/v5/object.go:29.17,30.24 1 0 -github.com/EasyPost/easypost-go/v5/object.go:31.16,32.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:33.15,34.22 1 0 -github.com/EasyPost/easypost-go/v5/object.go:35.24,36.31 1 0 -github.com/EasyPost/easypost-go/v5/object.go:37.23,38.38 1 0 -github.com/EasyPost/easypost-go/v5/object.go:39.21,40.28 1 0 -github.com/EasyPost/easypost-go/v5/object.go:41.21,42.28 1 0 -github.com/EasyPost/easypost-go/v5/object.go:43.21,44.28 1 0 -github.com/EasyPost/easypost-go/v5/object.go:45.15,46.22 1 0 -github.com/EasyPost/easypost-go/v5/object.go:47.14,48.21 1 0 -github.com/EasyPost/easypost-go/v5/object.go:49.19,50.26 1 0 -github.com/EasyPost/easypost-go/v5/object.go:51.15,52.22 1 0 -github.com/EasyPost/easypost-go/v5/object.go:53.16,54.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:55.17,56.29 1 0 -github.com/EasyPost/easypost-go/v5/object.go:57.20,58.27 1 0 -github.com/EasyPost/easypost-go/v5/object.go:59.26,60.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:61.16,62.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:63.22,64.29 1 0 -github.com/EasyPost/easypost-go/v5/object.go:65.14,66.21 1 0 -github.com/EasyPost/easypost-go/v5/object.go:67.16,68.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:69.22,70.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:71.18,72.25 1 0 -github.com/EasyPost/easypost-go/v5/object.go:73.18,74.25 1 0 -github.com/EasyPost/easypost-go/v5/object.go:75.31,76.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:77.24,78.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:79.17,80.24 1 1 -github.com/EasyPost/easypost-go/v5/object.go:81.23,82.23 1 0 -github.com/EasyPost/easypost-go/v5/object.go:83.24,84.31 1 0 -github.com/EasyPost/easypost-go/v5/object.go:85.26,86.33 1 0 -github.com/EasyPost/easypost-go/v5/object.go:87.14,88.21 1 0 -github.com/EasyPost/easypost-go/v5/object.go:89.17,90.24 1 0 -github.com/EasyPost/easypost-go/v5/object.go:96.2,96.54 1 1 -github.com/EasyPost/easypost-go/v5/object.go:96.54,98.3 1 0 -github.com/EasyPost/easypost-go/v5/object.go:100.2,100.20 1 1 -github.com/EasyPost/easypost-go/v5/order.go:63.94,65.2 1 1 -github.com/EasyPost/easypost-go/v5/order.go:69.126,74.2 4 1 -github.com/EasyPost/easypost-go/v5/order.go:77.67,79.2 1 1 -github.com/EasyPost/easypost-go/v5/order.go:83.99,86.2 2 1 -github.com/EasyPost/easypost-go/v5/order.go:89.72,91.2 1 1 -github.com/EasyPost/easypost-go/v5/order.go:95.104,98.2 2 1 -github.com/EasyPost/easypost-go/v5/order.go:105.85,107.2 1 1 -github.com/EasyPost/easypost-go/v5/order.go:111.117,118.2 3 1 -github.com/EasyPost/easypost-go/v5/order.go:121.70,123.2 1 1 -github.com/EasyPost/easypost-go/v5/order.go:127.100,129.2 1 1 -github.com/EasyPost/easypost-go/v5/order.go:133.129,135.2 1 1 -github.com/EasyPost/easypost-go/v5/parcel.go:37.68,39.2 1 1 -github.com/EasyPost/easypost-go/v5/parcel.go:43.100,46.2 2 1 -github.com/EasyPost/easypost-go/v5/parcel.go:49.70,51.2 1 1 -github.com/EasyPost/easypost-go/v5/parcel.go:55.102,58.2 2 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:40.109,41.35 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:41.35,43.3 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:43.8,43.43 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:43.43,45.3 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:45.8,47.3 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:48.2,48.8 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:52.96,54.27 2 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:55.29,56.23 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:57.30,58.24 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:59.10,60.61 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:62.2,62.8 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:66.115,68.16 2 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:68.16,70.3 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:72.2,72.18 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:73.36,74.44 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:75.38,76.46 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:79.2,79.16 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:79.16,81.3 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:83.2,83.17 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:87.112,88.28 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:89.36,90.18 1 1 -github.com/EasyPost/easypost-go/v5/payment_method.go:91.38,92.20 1 0 -github.com/EasyPost/easypost-go/v5/payment_method.go:95.2,95.8 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:70.68,72.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:76.100,79.2 2 1 -github.com/EasyPost/easypost-go/v5/pickup.go:82.70,84.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:88.102,91.2 2 1 -github.com/EasyPost/easypost-go/v5/pickup.go:98.88,100.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:104.120,111.2 3 1 -github.com/EasyPost/easypost-go/v5/pickup.go:114.73,116.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:120.105,123.2 2 1 -github.com/EasyPost/easypost-go/v5/pickup.go:126.79,128.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:132.109,134.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:138.138,140.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:143.84,145.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:149.116,152.2 2 1 -github.com/EasyPost/easypost-go/v5/pickup.go:155.101,157.2 1 0 -github.com/EasyPost/easypost-go/v5/pickup.go:160.127,162.2 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:166.133,168.2 1 0 -github.com/EasyPost/easypost-go/v5/pickup.go:172.159,173.34 1 1 -github.com/EasyPost/easypost-go/v5/pickup.go:173.34,176.3 2 0 -github.com/EasyPost/easypost-go/v5/pickup.go:177.2,179.16 3 1 -github.com/EasyPost/easypost-go/v5/pickup.go:179.16,181.3 1 0 -github.com/EasyPost/easypost-go/v5/pickup.go:182.2,182.46 1 1 -github.com/EasyPost/easypost-go/v5/rate.go:94.64,96.2 1 1 -github.com/EasyPost/easypost-go/v5/rate.go:100.96,103.2 2 1 -github.com/EasyPost/easypost-go/v5/rate.go:106.88,108.2 1 1 -github.com/EasyPost/easypost-go/v5/rate.go:112.120,117.2 4 1 -github.com/EasyPost/easypost-go/v5/rate.go:120.93,122.2 1 1 -github.com/EasyPost/easypost-go/v5/rate.go:126.123,128.2 1 1 -github.com/EasyPost/easypost-go/v5/rate.go:132.152,134.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:72.93,74.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:78.125,81.2 2 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:84.105,86.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:90.137,93.2 2 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:96.133,98.2 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:101.159,103.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:107.165,109.2 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:113.191,114.44 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:114.44,117.3 2 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:118.2,120.16 3 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:120.16,122.3 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:123.2,123.56 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:127.110,129.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:133.142,141.2 3 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:144.187,146.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:150.219,152.87 2 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:152.87,159.3 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:161.2,162.78 2 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:162.78,164.3 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:166.2,166.98 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:170.183,172.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:176.215,191.2 4 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:194.210,196.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:200.249,214.2 4 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:216.107,219.2 2 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:221.154,229.16 7 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:229.16,231.3 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:233.2,237.16 4 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:237.16,239.3 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:241.2,241.33 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:241.33,243.3 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:245.2,246.16 2 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:246.16,248.3 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:250.2,251.16 2 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:251.16,253.3 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:255.2,255.8 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:258.185,275.2 5 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:278.165,280.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:284.197,295.2 3 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:298.91,300.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:304.123,311.2 3 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:314.98,316.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:320.130,327.2 3 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:330.92,332.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:336.122,340.2 3 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:343.93,345.2 1 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:349.123,353.2 3 1 -github.com/EasyPost/easypost-go/v5/referral_customer.go:356.122,358.2 1 0 -github.com/EasyPost/easypost-go/v5/referral_customer.go:362.154,369.2 4 0 -github.com/EasyPost/easypost-go/v5/refund.go:26.85,28.2 1 1 -github.com/EasyPost/easypost-go/v5/refund.go:32.117,36.2 3 1 -github.com/EasyPost/easypost-go/v5/refund.go:39.84,41.2 1 1 -github.com/EasyPost/easypost-go/v5/refund.go:45.116,48.2 2 1 -github.com/EasyPost/easypost-go/v5/refund.go:51.101,53.2 1 0 -github.com/EasyPost/easypost-go/v5/refund.go:56.127,58.2 1 1 -github.com/EasyPost/easypost-go/v5/refund.go:62.133,64.2 1 0 -github.com/EasyPost/easypost-go/v5/refund.go:68.159,69.34 1 1 -github.com/EasyPost/easypost-go/v5/refund.go:69.34,72.3 2 0 -github.com/EasyPost/easypost-go/v5/refund.go:73.2,75.16 3 1 -github.com/EasyPost/easypost-go/v5/refund.go:75.16,77.3 1 1 -github.com/EasyPost/easypost-go/v5/refund.go:78.2,78.46 1 0 -github.com/EasyPost/easypost-go/v5/refund.go:82.70,84.2 1 1 -github.com/EasyPost/easypost-go/v5/refund.go:88.102,91.2 2 1 -github.com/EasyPost/easypost-go/v5/report.go:43.80,45.2 1 1 -github.com/EasyPost/easypost-go/v5/report.go:49.112,52.2 2 1 -github.com/EasyPost/easypost-go/v5/report.go:55.97,57.2 1 1 -github.com/EasyPost/easypost-go/v5/report.go:61.129,66.2 3 1 -github.com/EasyPost/easypost-go/v5/report.go:69.103,71.2 1 0 -github.com/EasyPost/easypost-go/v5/report.go:74.129,76.2 1 1 -github.com/EasyPost/easypost-go/v5/report.go:80.135,82.2 1 0 -github.com/EasyPost/easypost-go/v5/report.go:86.161,87.34 1 1 -github.com/EasyPost/easypost-go/v5/report.go:87.34,90.3 2 0 -github.com/EasyPost/easypost-go/v5/report.go:91.2,93.16 3 1 -github.com/EasyPost/easypost-go/v5/report.go:93.16,95.3 1 0 -github.com/EasyPost/easypost-go/v5/report.go:96.2,99.18 2 1 -github.com/EasyPost/easypost-go/v5/report.go:99.18,101.3 1 1 -github.com/EasyPost/easypost-go/v5/report.go:102.2,102.69 1 1 -github.com/EasyPost/easypost-go/v5/report.go:106.75,108.2 1 1 -github.com/EasyPost/easypost-go/v5/report.go:112.107,115.2 2 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:34.65,38.30 3 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:38.30,40.3 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:41.2,41.12 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:48.83,50.2 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:54.115,57.2 2 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:60.89,62.2 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:66.121,69.2 2 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:72.109,74.2 1 0 -github.com/EasyPost/easypost-go/v5/scan_form.go:77.135,79.2 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:83.141,85.2 1 0 -github.com/EasyPost/easypost-go/v5/scan_form.go:89.167,90.36 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:90.36,93.3 2 0 -github.com/EasyPost/easypost-go/v5/scan_form.go:94.2,96.16 3 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:96.16,98.3 1 0 -github.com/EasyPost/easypost-go/v5/scan_form.go:99.2,99.48 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:103.76,105.2 1 1 -github.com/EasyPost/easypost-go/v5/scan_form.go:109.108,112.2 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:163.74,165.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:169.106,173.2 3 1 -github.com/EasyPost/easypost-go/v5/shipment.go:176.98,178.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:182.130,188.2 4 1 -github.com/EasyPost/easypost-go/v5/shipment.go:191.109,193.2 1 0 -github.com/EasyPost/easypost-go/v5/shipment.go:196.135,198.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:202.141,204.2 1 0 -github.com/EasyPost/easypost-go/v5/shipment.go:208.167,209.36 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:209.36,212.3 2 0 -github.com/EasyPost/easypost-go/v5/shipment.go:213.2,215.16 3 1 -github.com/EasyPost/easypost-go/v5/shipment.go:215.16,217.3 1 0 -github.com/EasyPost/easypost-go/v5/shipment.go:218.2,223.18 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:223.18,225.3 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:226.2,226.56 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:230.76,232.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:236.108,239.2 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:241.121,244.2 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:251.106,253.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:257.138,260.2 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:263.141,265.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:269.173,272.2 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:277.89,279.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:283.121,290.2 4 1 -github.com/EasyPost/easypost-go/v5/shipment.go:293.89,295.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:299.121,305.2 3 1 -github.com/EasyPost/easypost-go/v5/shipment.go:311.87,313.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:317.119,323.2 3 1 -github.com/EasyPost/easypost-go/v5/shipment.go:326.79,328.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:332.111,335.2 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:338.77,340.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:344.109,348.2 3 1 -github.com/EasyPost/easypost-go/v5/shipment.go:351.79,353.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:357.109,359.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:363.138,365.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:368.124,371.2 2 1 -github.com/EasyPost/easypost-go/v5/shipment.go:374.102,376.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:380.134,382.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:385.149,387.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:391.181,396.2 4 1 -github.com/EasyPost/easypost-go/v5/shipment.go:399.136,401.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:404.168,413.2 4 1 -github.com/EasyPost/easypost-go/v5/shipment.go:416.149,418.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:421.181,432.2 4 1 -github.com/EasyPost/easypost-go/v5/shipment.go:435.87,437.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:440.119,444.2 3 1 -github.com/EasyPost/easypost-go/v5/shipment.go:447.97,449.2 1 1 -github.com/EasyPost/easypost-go/v5/shipment.go:452.129,455.2 2 1 -github.com/EasyPost/easypost-go/v5/smart_rate.go:77.150,79.2 1 1 -github.com/EasyPost/easypost-go/v5/smart_rate.go:82.182,85.2 2 1 -github.com/EasyPost/easypost-go/v5/smart_rate.go:88.141,90.2 1 1 -github.com/EasyPost/easypost-go/v5/smart_rate.go:93.173,96.2 2 1 -github.com/EasyPost/easypost-go/v5/tracker.go:113.63,115.26 2 1 -github.com/EasyPost/easypost-go/v5/tracker.go:115.26,117.3 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:118.2,118.21 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:118.21,120.3 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:121.2,121.20 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:121.20,123.3 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:124.2,125.28 2 1 -github.com/EasyPost/easypost-go/v5/tracker.go:125.28,127.3 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:128.2,128.16 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:128.16,130.3 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:131.2,132.29 2 1 -github.com/EasyPost/easypost-go/v5/tracker.go:132.29,134.3 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:135.2,135.29 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:135.29,137.3 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:138.2,138.17 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:138.17,140.3 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:141.2,141.10 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:147.86,149.2 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:153.118,156.2 2 1 -github.com/EasyPost/easypost-go/v5/tracker.go:159.95,161.2 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:165.127,171.2 4 1 -github.com/EasyPost/easypost-go/v5/tracker.go:174.106,176.2 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:179.132,181.2 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:185.138,187.2 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:191.164,192.35 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:192.35,195.3 2 0 -github.com/EasyPost/easypost-go/v5/tracker.go:196.2,198.16 3 1 -github.com/EasyPost/easypost-go/v5/tracker.go:198.16,200.3 1 0 -github.com/EasyPost/easypost-go/v5/tracker.go:201.2,206.18 2 1 -github.com/EasyPost/easypost-go/v5/tracker.go:206.18,208.3 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:209.2,209.54 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:213.73,215.2 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:219.105,222.2 2 1 -github.com/EasyPost/easypost-go/v5/tracker.go:225.103,227.2 1 1 -github.com/EasyPost/easypost-go/v5/tracker.go:231.135,234.2 2 1 -github.com/EasyPost/easypost-go/v5/user.go:55.69,57.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:61.101,64.2 2 1 -github.com/EasyPost/easypost-go/v5/user.go:67.64,69.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:73.96,76.2 2 1 -github.com/EasyPost/easypost-go/v5/user.go:81.69,83.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:87.101,90.17 3 1 -github.com/EasyPost/easypost-go/v5/user.go:90.17,92.3 1 1 -github.com/EasyPost/easypost-go/v5/user.go:93.2,94.8 2 1 -github.com/EasyPost/easypost-go/v5/user.go:98.50,100.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:104.82,106.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:109.54,111.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:115.84,118.2 2 1 -github.com/EasyPost/easypost-go/v5/user.go:121.91,123.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:127.123,130.2 2 1 -github.com/EasyPost/easypost-go/v5/user.go:133.112,135.2 1 0 -github.com/EasyPost/easypost-go/v5/user.go:138.138,140.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:144.144,146.2 1 0 -github.com/EasyPost/easypost-go/v5/user.go:150.170,151.35 1 1 -github.com/EasyPost/easypost-go/v5/user.go:151.35,154.3 2 0 -github.com/EasyPost/easypost-go/v5/user.go:155.2,157.16 3 1 -github.com/EasyPost/easypost-go/v5/user.go:157.16,159.3 1 0 -github.com/EasyPost/easypost-go/v5/user.go:160.2,160.49 1 1 -github.com/EasyPost/easypost-go/v5/user.go:164.100,166.2 1 1 -github.com/EasyPost/easypost-go/v5/user.go:170.132,175.2 4 1 -github.com/EasyPost/easypost-go/v5/util.go:17.34,19.2 1 1 -github.com/EasyPost/easypost-go/v5/util.go:22.28,24.2 1 1 -github.com/EasyPost/easypost-go/v5/util.go:27.69,28.34 1 1 -github.com/EasyPost/easypost-go/v5/util.go:28.34,29.30 1 1 -github.com/EasyPost/easypost-go/v5/util.go:29.30,31.4 1 1 -github.com/EasyPost/easypost-go/v5/util.go:33.2,33.14 1 1 -github.com/EasyPost/easypost-go/v5/util.go:37.124,42.85 2 1 -github.com/EasyPost/easypost-go/v5/util.go:42.85,44.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:46.2,46.29 1 1 -github.com/EasyPost/easypost-go/v5/util.go:46.29,49.44 2 1 -github.com/EasyPost/easypost-go/v5/util.go:50.24,51.58 1 0 -github.com/EasyPost/easypost-go/v5/util.go:52.24,53.58 1 0 -github.com/EasyPost/easypost-go/v5/util.go:54.24,55.58 1 0 -github.com/EasyPost/easypost-go/v5/util.go:56.24,57.58 1 1 -github.com/EasyPost/easypost-go/v5/util.go:58.24,59.58 1 0 -github.com/EasyPost/easypost-go/v5/util.go:60.24,61.58 1 0 -github.com/EasyPost/easypost-go/v5/util.go:62.24,63.58 1 0 -github.com/EasyPost/easypost-go/v5/util.go:64.11,65.12 1 0 -github.com/EasyPost/easypost-go/v5/util.go:69.3,69.42 1 1 -github.com/EasyPost/easypost-go/v5/util.go:69.42,70.12 1 1 -github.com/EasyPost/easypost-go/v5/util.go:74.3,74.27 1 1 -github.com/EasyPost/easypost-go/v5/util.go:74.27,76.12 2 1 -github.com/EasyPost/easypost-go/v5/util.go:80.3,80.44 1 1 -github.com/EasyPost/easypost-go/v5/util.go:80.44,82.4 1 0 -github.com/EasyPost/easypost-go/v5/util.go:86.2,86.26 1 1 -github.com/EasyPost/easypost-go/v5/util.go:86.26,88.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:90.2,90.8 1 1 -github.com/EasyPost/easypost-go/v5/util.go:94.120,97.35 2 1 -github.com/EasyPost/easypost-go/v5/util.go:97.35,99.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:101.2,101.35 1 1 -github.com/EasyPost/easypost-go/v5/util.go:101.35,103.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:105.2,105.29 1 1 -github.com/EasyPost/easypost-go/v5/util.go:105.29,108.72 1 1 -github.com/EasyPost/easypost-go/v5/util.go:108.72,109.12 1 1 -github.com/EasyPost/easypost-go/v5/util.go:112.3,116.30 3 1 -github.com/EasyPost/easypost-go/v5/util.go:116.30,118.12 2 1 -github.com/EasyPost/easypost-go/v5/util.go:122.3,122.43 1 1 -github.com/EasyPost/easypost-go/v5/util.go:122.43,124.4 1 1 -github.com/EasyPost/easypost-go/v5/util.go:128.2,128.29 1 1 -github.com/EasyPost/easypost-go/v5/util.go:128.29,130.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:132.2,132.8 1 1 -github.com/EasyPost/easypost-go/v5/util.go:136.110,138.29 2 1 -github.com/EasyPost/easypost-go/v5/util.go:138.29,145.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:147.2,148.16 2 1 -github.com/EasyPost/easypost-go/v5/util.go:148.16,149.30 1 1 -github.com/EasyPost/easypost-go/v5/util.go:149.30,150.32 1 1 -github.com/EasyPost/easypost-go/v5/util.go:150.32,152.5 1 1 -github.com/EasyPost/easypost-go/v5/util.go:155.2,155.8 1 1 -github.com/EasyPost/easypost-go/v5/util.go:159.131,161.29 2 1 -github.com/EasyPost/easypost-go/v5/util.go:161.29,168.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:170.2,171.16 2 1 -github.com/EasyPost/easypost-go/v5/util.go:171.16,172.30 1 1 -github.com/EasyPost/easypost-go/v5/util.go:172.30,174.80 1 1 -github.com/EasyPost/easypost-go/v5/util.go:174.80,176.5 1 1 -github.com/EasyPost/easypost-go/v5/util.go:179.2,179.8 1 1 -github.com/EasyPost/easypost-go/v5/util.go:183.122,185.29 2 1 -github.com/EasyPost/easypost-go/v5/util.go:185.29,192.3 1 1 -github.com/EasyPost/easypost-go/v5/util.go:194.2,195.16 2 1 -github.com/EasyPost/easypost-go/v5/util.go:195.16,196.30 1 1 -github.com/EasyPost/easypost-go/v5/util.go:196.30,197.32 1 1 -github.com/EasyPost/easypost-go/v5/util.go:197.32,199.5 1 1 -github.com/EasyPost/easypost-go/v5/util.go:202.2,202.8 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:54.102,62.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:64.102,69.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:72.92,74.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:79.62,83.2 3 1 -github.com/EasyPost/easypost-go/v5/webhook.go:86.61,88.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:93.91,96.2 2 1 -github.com/EasyPost/easypost-go/v5/webhook.go:99.73,101.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:105.105,108.2 2 1 -github.com/EasyPost/easypost-go/v5/webhook.go:111.110,113.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:118.80,122.2 3 1 -github.com/EasyPost/easypost-go/v5/webhook.go:125.56,127.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:131.88,133.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:138.130,140.2 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:144.162,147.22 2 1 -github.com/EasyPost/easypost-go/v5/webhook.go:147.22,156.64 6 1 -github.com/EasyPost/easypost-go/v5/webhook.go:156.64,158.65 2 1 -github.com/EasyPost/easypost-go/v5/webhook.go:158.65,160.5 1 0 -github.com/EasyPost/easypost-go/v5/webhook.go:160.10,162.5 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:163.9,165.4 1 1 -github.com/EasyPost/easypost-go/v5/webhook.go:166.8,168.3 1 1 From c1219d9e41fba09570bbeb45001c939deffefd9e Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:27:05 -0700 Subject: [PATCH 3/6] fix: test command --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f29640e..d288870 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ scan: ## test - Test the project test: - go clean -testcache && go test ./tests -v + go clean -testcache && go test ./... -v ## tidy - Tidies up the vendor directory tidy: From 69483b72e812c5d13432da744adc83af70f34f09 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:36:42 -0700 Subject: [PATCH 4/6] fix: fixtures path --- fixture_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fixture_test.go b/fixture_test.go index dde4d81..0832b8b 100644 --- a/fixture_test.go +++ b/fixture_test.go @@ -43,9 +43,7 @@ type billingFixture struct { // Reads fixture data from the fixtures JSON file func readFixtureData() Fixture { - currentDir, _ := os.Getwd() - parentDir := filepath.Dir(currentDir) - filePath := fmt.Sprintf("%s%s", parentDir, "/examples/official/fixtures/client-library-fixtures.json") + filePath := "examples/official/fixtures/client-library-fixtures.json" /* #nosec */ data, err := os.Open(filePath) From a6c2790cd776fd7eb504baa4e65a164cc33f5a1e Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:37:44 -0700 Subject: [PATCH 5/6] fix: event fixture path --- fixture_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fixture_test.go b/fixture_test.go index 0832b8b..1d67acf 100644 --- a/fixture_test.go +++ b/fixture_test.go @@ -6,7 +6,6 @@ import ( "fmt" "io" "os" - "path/filepath" "time" ) @@ -189,9 +188,7 @@ func (fixture *Fixture) BasicOrder() *Order { } func (fixture *Fixture) EventBody() []byte { - currentDir, _ := os.Getwd() - parentDir := filepath.Dir(currentDir) - filePath := fmt.Sprintf("%s%s", parentDir, "/examples/official/fixtures/event-body.json") + filePath := "examples/official/fixtures/event-body.json" /* #nosec */ data, err := os.Open(filePath) From ac0f30f161675823275776c7a6991b68c760dcd1 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:41:38 -0700 Subject: [PATCH 6/6] fix: commented broken test --- client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_test.go b/client_test.go index 8501e62..174dae5 100644 --- a/client_test.go +++ b/client_test.go @@ -33,7 +33,7 @@ func (c *ClientTests) TestHooks() { RequestHookEventSubscriber{ Callback: func(ctx context.Context, event RequestHookEvent) error { assert.Equal("GET", event.Method) - // assert.Regexp("https://api.easypost.com/v2/addresses?page_size=5", event.Url.String()) + assert.Equal("https://api.easypost.com/v2/addresses?page_size=5", event.Url.String()) pairId = event.Id requestHookCalled = true return nil