Class: FriendlyShipping::Label
- Inherits:
-
Object
- Object
- FriendlyShipping::Label
- Defined in:
- lib/friendly_shipping/label.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cost ⇒ Object
readonly
Returns the value of attribute cost.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label_data ⇒ Object
readonly
Returns the value of attribute label_data.
-
#label_format ⇒ Object
readonly
Returns the value of attribute label_format.
-
#label_href ⇒ Object
readonly
Returns the value of attribute label_href.
-
#service_code ⇒ Object
readonly
Returns the value of attribute service_code.
-
#shipment_cost ⇒ Object
readonly
Returns the value of attribute shipment_cost.
-
#shipment_id ⇒ Object
readonly
Returns the value of attribute shipment_id.
-
#tracking_number ⇒ Object
readonly
Returns the value of attribute tracking_number.
Instance Method Summary collapse
-
#initialize(id: nil, shipment_id: nil, tracking_number: nil, service_code: nil, label_href: nil, label_format: nil, label_data: nil, cost: nil, shipment_cost: nil, data: {}) ⇒ Label
constructor
A new instance of Label.
Constructor Details
#initialize(id: nil, shipment_id: nil, tracking_number: nil, service_code: nil, label_href: nil, label_format: nil, label_data: nil, cost: nil, shipment_cost: nil, data: {}) ⇒ Label
Returns a new instance of Label.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/friendly_shipping/label.rb', line 27 def initialize( id: nil, shipment_id: nil, tracking_number: nil, service_code: nil, label_href: nil, label_format: nil, label_data: nil, cost: nil, shipment_cost: nil, data: {} ) @id = id @shipment_id = shipment_id @tracking_number = tracking_number @service_code = service_code @label_href = label_href @label_format = label_format @cost = FriendlyShipping::Types::Money.optional[cost] @shipment_cost = FriendlyShipping::Types::Money.optional[shipment_cost] @label_data = label_data @data = data end |
Instance Attribute Details
#cost ⇒ Object (readonly)
Returns the value of attribute cost.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def cost @cost end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def data @data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def id @id end |
#label_data ⇒ Object (readonly)
Returns the value of attribute label_data.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def label_data @label_data end |
#label_format ⇒ Object (readonly)
Returns the value of attribute label_format.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def label_format @label_format end |
#label_href ⇒ Object (readonly)
Returns the value of attribute label_href.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def label_href @label_href end |
#service_code ⇒ Object (readonly)
Returns the value of attribute service_code.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def service_code @service_code end |
#shipment_cost ⇒ Object (readonly)
Returns the value of attribute shipment_cost.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def shipment_cost @shipment_cost end |
#shipment_id ⇒ Object (readonly)
Returns the value of attribute shipment_id.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def shipment_id @shipment_id end |
#tracking_number ⇒ Object (readonly)
Returns the value of attribute tracking_number.
7 8 9 |
# File 'lib/friendly_shipping/label.rb', line 7 def tracking_number @tracking_number end |