Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

Commit cbe6e2c

Browse files
authored
Add attribute reader for QR code url (#76)
When generating a QR code return the URL is returned by the API, but the `Shipment` class missed an attribute reader for `label_voucher_url` making it inaccessible
1 parent 9e78923 commit cbe6e2c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
### Added
33
- Add attr_accessor for `service` to class `Shipcloud::Shipment` to be able to access the service attribute at the shipment object.
44
- Add attr_accessor for `additional_services` to class `Shipcloud::Shipment` to be able to access the additional_services attribute at the shipment object.
5+
- Add attr_reader for `label_voucher_url` to class `Shipcloud::Shipment` to be able to read the label_voucher_url (QR Code url) attribute at the shipment object.
56

67
### Changed
78
- Set required ruby version to >= 2.6

lib/shipcloud/shipment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Shipment < Base
77
attr_accessor :from, :to, :carrier, :service, :package, :reference_number, :metadata,
88
:additional_services
99
attr_reader :id, :created_at, :carrier_tracking_no, :tracking_url, :label_url,
10-
:packages, :price, :customs_declaration, :pickup
10+
:packages, :price, :customs_declaration, :pickup, :label_voucher_url
1111

1212
def self.index_response_root
1313
"#{class_name.downcase}s"

0 commit comments

Comments
 (0)