From 35c1efaa12f25cafcfbc2cec7d80215b310764fd Mon Sep 17 00:00:00 2001 From: panxl6 Date: Fri, 31 May 2024 16:19:45 +0800 Subject: [PATCH 1/3] feat: add proof_of_delivery field --- CHANGELOG.md | 3 +++ trackings.go | 7 +++++++ version.go | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2acf5e1..9eaec3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.1] - 2024-05-31 +- Added `proof_of_delivery` field to Tracking Model. + ## [3.1.0] - 2024-01-03 - All SDK errors will be wrapped with "APIError". diff --git a/trackings.go b/trackings.go index 4a9141d..e08e138 100644 --- a/trackings.go +++ b/trackings.go @@ -498,6 +498,13 @@ type Tracking struct { * If a shipment has multiple carriers, you can use the next_couriers field to tell AfterShip who the second carrier is. */ NextCouriers []NextCourier `json:"next_couriers"` + + Poof []PoofOfDelivery `json:"proof_of_delivery"` +} + +type PoofOfDelivery struct { + Type string `json:"type"` + Url string `json:"url"` } type NextCourier struct { diff --git a/version.go b/version.go index 76a0ac0..3acf17c 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package aftership // VERSION is the version number of this package -const VERSION string = "3.1.0" +const VERSION string = "3.1.1" From c772dee6f7a0a1139c34615414293125115c0866 Mon Sep 17 00:00:00 2001 From: panxl6 Date: Fri, 31 May 2024 16:21:52 +0800 Subject: [PATCH 2/3] feat: add proof_of_delivery field --- trackings.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trackings.go b/trackings.go index e08e138..cf9a461 100644 --- a/trackings.go +++ b/trackings.go @@ -499,10 +499,10 @@ type Tracking struct { */ NextCouriers []NextCourier `json:"next_couriers"` - Poof []PoofOfDelivery `json:"proof_of_delivery"` + Proof []ProofOfDelivery `json:"proof_of_delivery"` } -type PoofOfDelivery struct { +type ProofOfDelivery struct { Type string `json:"type"` Url string `json:"url"` } From 23776fd6d67cd04d6f63652ae7030095890d71e1 Mon Sep 17 00:00:00 2001 From: panxl6 Date: Fri, 31 May 2024 16:24:53 +0800 Subject: [PATCH 3/3] feat: add proof_of_delivery field --- trackings.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackings.go b/trackings.go index cf9a461..23f0fc6 100644 --- a/trackings.go +++ b/trackings.go @@ -499,7 +499,7 @@ type Tracking struct { */ NextCouriers []NextCourier `json:"next_couriers"` - Proof []ProofOfDelivery `json:"proof_of_delivery"` + ProofOfDelivery []ProofOfDelivery `json:"proof_of_delivery"` } type ProofOfDelivery struct {