Skip to content

Releases: AfterShip/tracking-sdk-ruby

13.0.0

21 Oct 10:10
764958f

Choose a tag to compare

Breaking Changes - AfterShip Tracking Ruby SDK New Version

1. Complete Response Structure Refactor

Old Version - Direct Property Access

# Old version - Direct property access
response = api.create_tracking(body: request)
id = response.id
tracking_number = response.tracking_number
slug = response.slug

New Version - Must Access Through data

# New version - Access through data
response = api.create_tracking(body: request)
data = response.data
id = data.id
tracking_number = data.tracking_number
slug = data.slug
# Can also access response headers
response_header = response.response_header

Impact: All API response handling code needs to be rewritten to access actual data through the data method

2. Model Name Changes - Prefix Naming Convention

Model classes changed from suffix naming to prefix naming

# Old version - Suffix naming
require 'aftership-tracking-sdk'

# Using old models
courier_edd = AftershipAPI::Model::CourierEstimatedDeliveryDateTracking
shipment_weight = AftershipAPI::Model::ShipmentWeightTracking
aftership_edd = AftershipAPI::Model::AftershipEstimatedDeliveryDateTracking
carbon_emissions = AftershipAPI::Model::CarbonEmissionsTracking
custom_edd = AftershipAPI::Model::CustomEstimatedDeliveryDateTracking
first_estimated = AftershipAPI::Model::FirstEstimatedDeliveryTracking
first_mile = AftershipAPI::Model::FirstMileTracking
last_mile = AftershipAPI::Model::LastMileTracking
customers = AftershipAPI::Model::CustomersTracking

# New version - Prefix naming
require 'aftership-tracking-sdk'

# Using new models
courier_edd = AftershipAPI::Model::TrackingCourierEstimatedDeliveryDate
shipment_weight = AftershipAPI::Model::TrackingShipmentWeight
aftership_edd = AftershipAPI::Model::TrackingAftershipEstimatedDeliveryDate
carbon_emissions = AftershipAPI::Model::TrackingCarbonEmissions
custom_edd = AftershipAPI::Model::TrackingCustomEstimatedDeliveryDate
first_estimated = AftershipAPI::Model::TrackingFirstEstimatedDelivery
first_mile = AftershipAPI::Model::TrackingFirstMile
last_mile = AftershipAPI::Model::TrackingLastMile
customers = AftershipAPI::Model::TrackingCustomers

Impact: All nested Tracking model class names need to be updated from XxxTracking to TrackingXxx

3. Enum Member Name Changes

Tag enum member names changed to underscore-separated

Old Version New Version
Tag::INFORECEIVED Tag::INFO_RECEIVED
Tag::INTRANSIT Tag::IN_TRANSIT
Tag::OUTFORDELIVERY Tag::OUT_FOR_DELIVERY
Tag::ATTEMPTFAIL Tag::ATTEMPT_FAIL
Tag::AVAILABLEFORPICKUP Tag::AVAILABLE_FOR_PICKUP

Impact: Code using these enum members needs name updates

4. String to Enum Changes

Several string fields changed to enum types (following API documentation)

# 1. CreateTrackingRequest.delivery_type
# Old version
request = AftershipAPI::Model::CreateTrackingRequest.new
request.delivery_type = "pickup_at_store"

# New version
request = AftershipAPI::Model::CreateTrackingRequest.new
request.delivery_type = AftershipAPI::Model::CreateTrackingRequestDeliveryType::PICKUP_AT_STORE

# 2. UpdateTrackingByIdRequest.delivery_type
# Old version
update_request.delivery_type = "door_to_door"

# New version
update_request.delivery_type = AftershipAPI::Model::UpdateTrackingByIdRequestDeliveryType::DOOR_TO_DOOR

# 3. MarkTrackingCompletedByIdRequest.reason
# Old version
mark_request.reason = "DELIVERED"

# New version
mark_request.reason = AftershipAPI::Model::MarkTrackingCompletedByIdRequestReason::DELIVERED

Impact: Code using string values needs to be changed to use corresponding enum types

12.0.0

22 Jul 08:10
dd71cbb

Choose a tag to compare

What's Changed

Full Changelog: 11.0.0...12.0.0

11.0.0

23 Apr 06:13
89a64ec

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 10.0.0...11.0.0

10.0.0

20 Jan 06:11
b72e913

Choose a tag to compare

  • supporting 2025-01 version.

9.0.0

25 Oct 06:49
12794d3

Choose a tag to compare

  • supporting 2024-10 version.

API and SDK Version

Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.

SDK Version Supported API Version Branch
9.x.x 2024-10 https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-10
8.x.x 2024-07 https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-07
7.x.x 2024-04 https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-04
<=6.x.x Legacy API https://github.com/AfterShip/aftership-sdk-ruby

8.0.0

01 Aug 01:48
b4691c3

Choose a tag to compare

  • supporting 2024-07 version.

API and SDK Version

Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.

SDK Version Supported API Version Branch
8.x.x 2024-07 https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-07
7.x.x 2024-04 https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-04
<=6.x.x Legacy API https://github.com/AfterShip/aftership-sdk-ruby

7.0.0

01 Jul 02:59
12ac277

Choose a tag to compare

  • supporting Tracking API 2024-04 version.

API and SDK Version

Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.

SDK Version Supported API Version Branch
7.x.x 2024-04 https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-04
<=6.x.x Legacy API https://github.com/AfterShip/aftership-sdk-ruby