-
Notifications
You must be signed in to change notification settings - Fork 8
Add attribute reader for carrier tracking url #133
base: master
Are you sure you want to change the base?
Conversation
The carrier tracking url is generated but is inaccessible on the Shipment Object. This commit provides a fix.
Fix for line too long error
Code Climate has analyzed commit c779213 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 99.2% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @leobossmann, thank you for your contribution!
I've added two necessary changes below, once those are fixed we can get this PR merged and released so you can use the new attribute in your application.
Let me know if you need any help or if there are any questions.
@@ -18,6 +18,7 @@ | |||
- Add attr_accessor for `additional_services` to class `Shipcloud::Shipment` to be able to access the additional_services attribute at the shipment object. | |||
- 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. | |||
- Added missing `frozen_string_literal: true` magic comments to files | |||
- Add attr_reader for `carrier_tracking_url` to class `Shipcloud::Shipment` to be able to read the carrier_tracking_url attribute at the shipment object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to the Unreleased
header, we'll move it to a new version header (probably 0.13.0) before the change is released.
@@ -9,7 +9,8 @@ class Shipment < Base | |||
attr_accessor :from, :to, :carrier, :service, :package, :reference_number, :metadata, | |||
:additional_services | |||
attr_reader :id, :created_at, :carrier_tracking_no, :tracking_url, :label_url, | |||
:packages, :price, :customs_declaration, :pickup, :label_voucher_url | |||
:packages, :price, :customs_declaration, :pickup, | |||
:label_voucher_url, :carrier_tracking_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a corresponding spec file at spec/shipcloud/shipment_spec.rb
, could you add a spec for this new attribute?
The carrier tracking url is generated but is inaccessible on the Shipment Object. This commit provides a fix.