diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fbfef6..2e5ea9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: '1.20' @@ -30,7 +30,7 @@ jobs: go-version: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21'] steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: use golang ${{ matrix.go-version }} uses: actions/setup-go@v4 with: @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: '1.19' # TODO: There is a bug in 1.20 that isn't calculating coverage correctly @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: '1.19' # TODO: There is a bug in 1.20 that isn't calculating coverage correctly diff --git a/README.md b/README.md index 5420d7a..358aa2f 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,13 @@ EasyPost, the simple shipping solution. You can sign up for an account at . -Library documentation can be found on the web at [GoDoc](https://pkg.go.dev/github.com/EasyPost/easypost-go/v3). +Library documentation can be found on the web at [GoDoc](https://pkg.go.dev/github.com/EasyPost/easypost-go/v4). Upgrading major versions of this project? Refer to the [Upgrade Guide](UPGRADE_GUIDE.md). @@ -232,7 +232,7 @@ make a request that does not match any of the configured mock requests, the requ To use the mock client: ```golang -import "github.com/EasyPost/easypost-go/v3" +import "github.com/EasyPost/easypost-go/v4" // create a list of mock request-response pairs mockRequests := []easypost.MockRequest{ diff --git a/go.mod b/go.mod index 0b8d315..80abb46 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/EasyPost/easypost-go/v3 +module github.com/EasyPost/easypost-go/v4 go 1.16 diff --git a/tests/address_test.go b/tests/address_test.go index 2b171d8..6979f53 100644 --- a/tests/address_test.go +++ b/tests/address_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" "reflect" "strings" ) diff --git a/tests/api_key_test.go b/tests/api_key_test.go index 9e0f632..04c6f6e 100644 --- a/tests/api_key_test.go +++ b/tests/api_key_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" "reflect" ) diff --git a/tests/batch_test.go b/tests/batch_test.go index c28cf10..f2a9e7d 100644 --- a/tests/batch_test.go +++ b/tests/batch_test.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestBatchCreate() { diff --git a/tests/billing_test.go b/tests/billing_test.go index 11d06a0..8abf1a7 100644 --- a/tests/billing_test.go +++ b/tests/billing_test.go @@ -1,6 +1,6 @@ package easypost_test -import "github.com/EasyPost/easypost-go/v3" +import "github.com/EasyPost/easypost-go/v4" func GetBillingMockRequests() []easypost.MockRequest { return []easypost.MockRequest{ diff --git a/tests/bootstrap_test.go b/tests/bootstrap_test.go index 168f5e4..590d12e 100644 --- a/tests/bootstrap_test.go +++ b/tests/bootstrap_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" "github.com/dnaeon/go-vcr/cassette" "github.com/dnaeon/go-vcr/recorder" "github.com/stretchr/testify/suite" diff --git a/tests/carrier_account_test.go b/tests/carrier_account_test.go index 3716d73..ea51fd1 100644 --- a/tests/carrier_account_test.go +++ b/tests/carrier_account_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) GenerateCarrierAccount() (*easypost.CarrierAccount, error) { diff --git a/tests/cassettes/TestShipmentRegenerateRates.yaml b/tests/cassettes/TestShipmentRegenerateRates.yaml index 39ff197..3703e38 100644 --- a/tests/cassettes/TestShipmentRegenerateRates.yaml +++ b/tests/cassettes/TestShipmentRegenerateRates.yaml @@ -21,21 +21,21 @@ interactions: method: POST response: body: '{"batch_id":null,"batch_message":null,"batch_status":null,"buyer_address":{"carrier_facility":null,"city":"Redondo - Beach","company":null,"country":"US","created_at":"2023-11-30T20:12:03+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_ba5453d68fbc11ee9412ac1f6bc539aa","mode":"test","name":"Elizabeth + Beach","company":null,"country":"US","created_at":"2023-12-06T18:18:29+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_db05228b946311eeaca0ac1f6bc53342","mode":"test","name":"Elizabeth Swan","object":"Address","phone":"REDACTED","residential":null,"state":"CA","state_tax_id":null,"street1":"179 - N Harbor Dr","street2":null,"updated_at":"2023-11-30T20:12:03+00:00","verifications":{},"zip":"90277"},"created_at":"2023-11-30T20:12:03Z","customs_info":{"contents_explanation":null,"contents_type":"merchandise","created_at":"2023-11-30T20:12:03Z","customs_certify":true,"customs_items":[{"code":null,"created_at":"2023-11-30T20:12:03Z","currency":null,"description":"Sweet - shirts","eccn":null,"hs_tariff_number":"654321","id":"cstitem_c49dccd7506d46ffb91e7517e9de6806","manufacturer":null,"mode":"test","object":"CustomsItem","origin_country":"US","printed_commodity_identifier":null,"quantity":2,"updated_at":"2023-11-30T20:12:03Z","value":null,"weight":11}],"customs_signer":"Steve - Brule","declaration":null,"eel_pfc":"NOEEI 30.37(a)","id":"cstinfo_2723882b61e743eba5d0c1fee56a48a9","mode":"test","non_delivery_option":"return","object":"CustomsInfo","restriction_comments":null,"restriction_type":"none","updated_at":"2023-11-30T20:12:03Z"},"fees":[],"forms":[],"from_address":{"carrier_facility":null,"city":"San - Francisco","company":null,"country":"US","created_at":"2023-11-30T20:12:03+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_ba56d95d8fbc11ee90b4ac1f6bc539ae","mode":"test","name":"Jack + N Harbor Dr","street2":null,"updated_at":"2023-12-06T18:18:29+00:00","verifications":{},"zip":"90277"},"created_at":"2023-12-06T18:18:29Z","customs_info":{"contents_explanation":null,"contents_type":"merchandise","created_at":"2023-12-06T18:18:29Z","customs_certify":true,"customs_items":[{"code":null,"created_at":"2023-12-06T18:18:29Z","currency":null,"description":"Sweet + shirts","eccn":null,"hs_tariff_number":"654321","id":"cstitem_851f74fd820240f6a708d542f7cd1569","manufacturer":null,"mode":"test","object":"CustomsItem","origin_country":"US","printed_commodity_identifier":null,"quantity":2,"updated_at":"2023-12-06T18:18:29Z","value":null,"weight":11}],"customs_signer":"Steve + Brule","declaration":null,"eel_pfc":"NOEEI 30.37(a)","id":"cstinfo_08bcd669784b45f4bf2e55720a15f8d3","mode":"test","non_delivery_option":"return","object":"CustomsInfo","restriction_comments":null,"restriction_type":"none","updated_at":"2023-12-06T18:18:29Z"},"fees":[],"forms":[],"from_address":{"carrier_facility":null,"city":"San + Francisco","company":null,"country":"US","created_at":"2023-12-06T18:18:29+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_db07ccfa946311ee838eac1f6bc539aa","mode":"test","name":"Jack Sparrow","object":"Address","phone":"REDACTED","residential":null,"state":"CA","state_tax_id":null,"street1":"388 - Townsend St","street2":"Apt 20","updated_at":"2023-11-30T20:12:03+00:00","verifications":{},"zip":"94107"},"id":"shp_ed7ea0dd185842bfab0d3301fb794863","insurance":null,"is_return":false,"messages":[{"carrier":"DhlEcs","carrier_account_id":"ca_1fefcb0d0a9f4e5db5e5a1c360958484","message":"shipment.customs_info.customs_items.0.value: - field required and shipment.customs_info.customs_items.0.code: field required","type":"rate_error"}],"mode":"test","object":"Shipment","options":{"currency":"USD","date_advance":0,"invoice_number":"123","label_format":"PNG","payment":{"type":"SENDER"}},"order_id":null,"parcel":{"created_at":"2023-11-30T20:12:03Z","height":4,"id":"prcl_e38b2d76acbe4c87ab1a7a516fe9d06e","length":10,"mode":"test","object":"Parcel","predefined_package":null,"updated_at":"2023-11-30T20:12:03Z","weight":15.4,"width":8},"postage_label":null,"rates":[{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:03Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":2,"est_delivery_days":2,"id":"rate_cfd91de286834d89bb5b1c81bd4cab30","list_currency":"USD","list_rate":"8.24","mode":"test","object":"Rate","rate":"6.95","retail_currency":"USD","retail_rate":"10.20","service":"Priority","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:03Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:03Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_79a11eee50e04b0ea184f91812173f9b","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"GroundAdvantage","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:03Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_4b78061d3aad40728a85855a9ab14170","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"First","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_97f9c41e6f5f45039a87936fd9dba35b","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"ParcelSelect","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":null,"est_delivery_days":null,"id":"rate_4bb8618b6837470e9f4406b6b83eff63","list_currency":"USD","list_rate":"31.25","mode":"test","object":"Rate","rate":"31.25","retail_currency":"USD","retail_rate":"35.80","service":"Express","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"}],"reference":"123","refund_status":null,"return_address":{"carrier_facility":null,"city":"San - Francisco","company":null,"country":"US","created_at":"2023-11-30T20:12:03+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_ba56d95d8fbc11ee90b4ac1f6bc539ae","mode":"test","name":"Jack + Townsend St","street2":"Apt 20","updated_at":"2023-12-06T18:18:29+00:00","verifications":{},"zip":"94107"},"id":"shp_dd88eaf601414b3881dc1858a5510c1f","insurance":null,"is_return":false,"messages":[{"carrier":"DhlEcs","carrier_account_id":"ca_1fefcb0d0a9f4e5db5e5a1c360958484","message":"shipment.customs_info.customs_items.0.value: + field required and shipment.customs_info.customs_items.0.code: field required","type":"rate_error"}],"mode":"test","object":"Shipment","options":{"currency":"USD","date_advance":0,"invoice_number":"123","label_format":"PNG","payment":{"type":"SENDER"}},"order_id":null,"parcel":{"created_at":"2023-12-06T18:18:29Z","height":4,"id":"prcl_eaa1d40b117e4f129fb09ad3ab6d7295","length":10,"mode":"test","object":"Parcel","predefined_package":null,"updated_at":"2023-12-06T18:18:29Z","weight":15.4,"width":8},"postage_label":null,"rates":[{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":2,"est_delivery_days":2,"id":"rate_9c98c998e5eb4e148084f304e523c46f","list_currency":"USD","list_rate":"8.24","mode":"test","object":"Rate","rate":"6.95","retail_currency":"USD","retail_rate":"10.20","service":"Priority","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_2509e51de7ba4f10bd9f27ec65a54cd4","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"GroundAdvantage","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_3e96a053483149b3896e46caf848f925","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"First","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_98dcf566dac84de193bcd59247b0f4e8","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"ParcelSelect","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":null,"est_delivery_days":null,"id":"rate_05de5cde48da4806b6b5326fe3480824","list_currency":"USD","list_rate":"31.25","mode":"test","object":"Rate","rate":"31.25","retail_currency":"USD","retail_rate":"35.80","service":"Express","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"}],"reference":"123","refund_status":null,"return_address":{"carrier_facility":null,"city":"San + Francisco","company":null,"country":"US","created_at":"2023-12-06T18:18:29+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_db07ccfa946311ee838eac1f6bc539aa","mode":"test","name":"Jack Sparrow","object":"Address","phone":"REDACTED","residential":null,"state":"CA","state_tax_id":null,"street1":"388 - Townsend St","street2":"Apt 20","updated_at":"2023-11-30T20:12:03+00:00","verifications":{},"zip":"94107"},"scan_form":null,"selected_rate":null,"status":"unknown","to_address":{"carrier_facility":null,"city":"Redondo - Beach","company":null,"country":"US","created_at":"2023-11-30T20:12:03+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_ba5453d68fbc11ee9412ac1f6bc539aa","mode":"test","name":"Elizabeth + Townsend St","street2":"Apt 20","updated_at":"2023-12-06T18:18:29+00:00","verifications":{},"zip":"94107"},"scan_form":null,"selected_rate":null,"status":"unknown","to_address":{"carrier_facility":null,"city":"Redondo + Beach","company":null,"country":"US","created_at":"2023-12-06T18:18:29+00:00","email":"REDACTED","federal_tax_id":null,"id":"adr_db05228b946311eeaca0ac1f6bc53342","mode":"test","name":"Elizabeth Swan","object":"Address","phone":"REDACTED","residential":null,"state":"CA","state_tax_id":null,"street1":"179 - N Harbor Dr","street2":null,"updated_at":"2023-11-30T20:12:03+00:00","verifications":{},"zip":"90277"},"tracker":null,"tracking_code":null,"updated_at":"2023-11-30T20:12:04Z","usps_zone":4}' + N Harbor Dr","street2":null,"updated_at":"2023-12-06T18:18:29+00:00","verifications":{},"zip":"90277"},"tracker":null,"tracking_code":null,"updated_at":"2023-12-06T18:18:29Z","usps_zone":4}' headers: Cache-Control: - private, no-cache, no-store @@ -44,7 +44,7 @@ interactions: Expires: - "0" Location: - - /api/v2/shipments/shp_ed7ea0dd185842bfab0d3301fb794863 + - /api/v2/shipments/shp_dd88eaf601414b3881dc1858a5510c1f Pragma: - no-cache Referrer-Policy: @@ -53,44 +53,44 @@ interactions: - max-age=31536000; includeSubDomains; preload X-Backend: - easypost - X-Canary: - - direct X-Content-Type-Options: - nosniff X-Download-Options: - noopen X-Ep-Request-Uuid: - - 32e015fa6568ec93e7896122001b9600 + - 5639f0936570baf5e2b8558e0057f772 X-Frame-Options: - SAMEORIGIN X-Node: - - bigweb32nuq + - bigweb36nuq X-Permitted-Cross-Domain-Policies: - none X-Proxied: - - intlb1nuq b3de2c47ef - - extlb1nuq 003ad9bca0 + - intlb2nuq b3de2c47ef + - extlb2nuq 003ad9bca0 X-Runtime: - - "0.320444" + - "0.303300" X-Version-Label: - - easypost-202311301748-2efb918c5f-master + - easypost-202312060139-bb94309111-master X-Xss-Protection: - 1; mode=block status: 201 Created code: 201 duration: "" - request: - body: "" + body: '{}' form: {} headers: Authorization: - REDACTED + Content-Type: + - application/json User-Agent: - REDACTED - url: https://api.easypost.com/v2/shipments/shp_ed7ea0dd185842bfab0d3301fb794863/rerate + url: https://api.easypost.com/v2/shipments/shp_dd88eaf601414b3881dc1858a5510c1f/rerate method: POST response: - body: '{"rates":[{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":null,"est_delivery_days":null,"id":"rate_b30bb9bb48e5473a96df5c62de3a7477","list_currency":"USD","list_rate":"31.25","mode":"test","object":"Rate","rate":"31.25","retail_currency":"USD","retail_rate":"35.80","service":"Express","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":2,"est_delivery_days":2,"id":"rate_5e096347e45747648e3accbb26d2056f","list_currency":"USD","list_rate":"8.24","mode":"test","object":"Rate","rate":"6.95","retail_currency":"USD","retail_rate":"10.20","service":"Priority","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_e38ad148b2c74f198cb5500b4c85794b","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"GroundAdvantage","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_8e446fd6fef54eefabcb54702b544551","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"First","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-11-30T20:12:04Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_91bdbe0b1aae47f3bd7349ab9295609b","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"ParcelSelect","shipment_id":"shp_ed7ea0dd185842bfab0d3301fb794863","updated_at":"2023-11-30T20:12:04Z"}]}' + body: '{"rates":[{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":2,"est_delivery_days":2,"id":"rate_9a8aac5f5d0345aea71aeb259fab26fc","list_currency":"USD","list_rate":"8.24","mode":"test","object":"Rate","rate":"6.95","retail_currency":"USD","retail_rate":"10.20","service":"Priority","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_f72b0ede589a484f98ec7bbbeb5706c6","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"GroundAdvantage","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_ed91b1e8911042d6a2c1bd5ebc0e846f","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"First","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":3,"est_delivery_days":3,"id":"rate_60bf654e1c19440691762902c0deef80","list_currency":"USD","list_rate":"6.07","mode":"test","object":"Rate","rate":"5.93","retail_currency":"USD","retail_rate":"8.00","service":"ParcelSelect","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"},{"billing_type":"easypost","carrier":"USPS","carrier_account_id":"ca_e606176ddb314afe896733636dba2f3b","created_at":"2023-12-06T18:18:29Z","currency":"USD","delivery_date":null,"delivery_date_guaranteed":false,"delivery_days":null,"est_delivery_days":null,"id":"rate_6bfe62262c7d4b30981ec502d04ad352","list_currency":"USD","list_rate":"31.25","mode":"test","object":"Rate","rate":"31.25","retail_currency":"USD","retail_rate":"35.80","service":"Express","shipment_id":"shp_dd88eaf601414b3881dc1858a5510c1f","updated_at":"2023-12-06T18:18:29Z"}]}' headers: Cache-Control: - private, no-cache, no-store @@ -106,27 +106,25 @@ interactions: - max-age=31536000; includeSubDomains; preload X-Backend: - easypost - X-Canary: - - direct X-Content-Type-Options: - nosniff X-Download-Options: - noopen X-Ep-Request-Uuid: - - 32e015fa6568ec94e7896122001b9680 + - 5639f0936570baf5e2b8558e0057f7dc X-Frame-Options: - SAMEORIGIN X-Node: - - bigweb32nuq + - bigweb35nuq X-Permitted-Cross-Domain-Policies: - none X-Proxied: - - intlb2nuq b3de2c47ef - - extlb1nuq 003ad9bca0 + - intlb1nuq b3de2c47ef + - extlb2nuq 003ad9bca0 X-Runtime: - - "0.239688" + - "0.274015" X-Version-Label: - - easypost-202311301748-2efb918c5f-master + - easypost-202312060139-bb94309111-master X-Xss-Protection: - 1; mode=block status: 200 OK diff --git a/tests/client_test.go b/tests/client_test.go index 9136f10..a22857d 100644 --- a/tests/client_test.go +++ b/tests/client_test.go @@ -2,7 +2,7 @@ package easypost_test import ( "context" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" "github.com/google/uuid" ) diff --git a/tests/customs_info_test.go b/tests/customs_info_test.go index 2ded41c..68fbe15 100644 --- a/tests/customs_info_test.go +++ b/tests/customs_info_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestCustomsInfoCreate() { diff --git a/tests/customs_item_test.go b/tests/customs_item_test.go index ce54cf5..9406ae9 100644 --- a/tests/customs_item_test.go +++ b/tests/customs_item_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestCustomsItemCreate() { diff --git a/tests/datetime_test.go b/tests/datetime_test.go index 8cc9605..5a6ad84 100644 --- a/tests/datetime_test.go +++ b/tests/datetime_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" "reflect" "time" ) diff --git a/tests/easypost_test.go b/tests/easypost_test.go index c051123..766508d 100644 --- a/tests/easypost_test.go +++ b/tests/easypost_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestClientTimeout() { diff --git a/tests/endshipper_test.go b/tests/endshipper_test.go index 94c3437..b0d8fda 100644 --- a/tests/endshipper_test.go +++ b/tests/endshipper_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestEndShipperCreate() { diff --git a/tests/error_test.go b/tests/error_test.go index 86faa1d..46e2c1d 100644 --- a/tests/error_test.go +++ b/tests/error_test.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) // TestApiError tests that a bad API request returns an InvalidRequestError (a subclass of APIError), and that the diff --git a/tests/event_test.go b/tests/event_test.go index 02a2205..c072b9c 100644 --- a/tests/event_test.go +++ b/tests/event_test.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestEventAll() { diff --git a/tests/fixture_test.go b/tests/fixture_test.go index 1acebe7..6da9405 100644 --- a/tests/fixture_test.go +++ b/tests/fixture_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) type Fixture struct { diff --git a/tests/insurance_test.go b/tests/insurance_test.go index c7e4781..6678a34 100644 --- a/tests/insurance_test.go +++ b/tests/insurance_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestInsuranceCreate() { diff --git a/tests/order_test.go b/tests/order_test.go index 207f2bd..8539e4b 100644 --- a/tests/order_test.go +++ b/tests/order_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestOrderCreate() { diff --git a/tests/paginated_collection_test.go b/tests/paginated_collection_test.go index 30b3fbb..3215599 100644 --- a/tests/paginated_collection_test.go +++ b/tests/paginated_collection_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestGetNextPage() { diff --git a/tests/parcel_test.go b/tests/parcel_test.go index be26f63..1f1b2af 100644 --- a/tests/parcel_test.go +++ b/tests/parcel_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestParcelCreate() { diff --git a/tests/pickup_test.go b/tests/pickup_test.go index f74d89b..0670ca7 100644 --- a/tests/pickup_test.go +++ b/tests/pickup_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestPickupCreate() { diff --git a/tests/rate_test.go b/tests/rate_test.go index 9c37e10..7024bec 100644 --- a/tests/rate_test.go +++ b/tests/rate_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestRateRetrieve() { diff --git a/tests/referral_customer_test.go b/tests/referral_customer_test.go index 5ce671c..227be2a 100644 --- a/tests/referral_customer_test.go +++ b/tests/referral_customer_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestBetaReferralAddPaymentMethod() { diff --git a/tests/refund_test.go b/tests/refund_test.go index dd98a37..c66f5d5 100644 --- a/tests/refund_test.go +++ b/tests/refund_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestRefundCreate() { diff --git a/tests/report_test.go b/tests/report_test.go index 3bfcb20..a7a388f 100644 --- a/tests/report_test.go +++ b/tests/report_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestReportCreate() { diff --git a/tests/scan_form_test.go b/tests/scan_form_test.go index 2bf6947..aaa9e6d 100644 --- a/tests/scan_form_test.go +++ b/tests/scan_form_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestScanFormCreate() { diff --git a/tests/shipment_test.go b/tests/shipment_test.go index 032a2dc..6a5d84f 100644 --- a/tests/shipment_test.go +++ b/tests/shipment_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestShipmentCreate() { diff --git a/tests/tracker_test.go b/tests/tracker_test.go index 6cecf53..7dbfd03 100644 --- a/tests/tracker_test.go +++ b/tests/tracker_test.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestTrackerCreate() { diff --git a/tests/user_test.go b/tests/user_test.go index 83b90b2..aeeac44 100644 --- a/tests/user_test.go +++ b/tests/user_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestUserCreate() { diff --git a/tests/util_test.go b/tests/util_test.go index 0e61299..f3b8ae2 100644 --- a/tests/util_test.go +++ b/tests/util_test.go @@ -1,7 +1,7 @@ package easypost_test import ( - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestStringPointer() { diff --git a/tests/webhook_test.go b/tests/webhook_test.go index 0440557..af620b7 100644 --- a/tests/webhook_test.go +++ b/tests/webhook_test.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "github.com/EasyPost/easypost-go/v3" + "github.com/EasyPost/easypost-go/v4" ) func (c *ClientTests) TestWebhookCreate() {