Class: FriendlyShipping::Carrier
- Inherits:
-
Object
- Object
- FriendlyShipping::Carrier
- Defined in:
- lib/friendly_shipping/carrier.rb
Instance Attribute Summary collapse
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#shipping_methods ⇒ Object
readonly
Returns the value of attribute shipping_methods.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id: nil, name: nil, code: nil, shipping_methods: [], balance: nil, data: {}) ⇒ Carrier
constructor
A new instance of Carrier.
Constructor Details
#initialize(id: nil, name: nil, code: nil, shipping_methods: [], balance: nil, data: {}) ⇒ Carrier
Returns a new instance of Carrier.
13 14 15 16 17 18 19 20 |
# File 'lib/friendly_shipping/carrier.rb', line 13 def initialize(id: nil, name: nil, code: nil, shipping_methods: [], balance: nil, data: {}) @id = id @name = name @code = code @shipping_methods = shipping_methods @balance = balance @data = data end |
Instance Attribute Details
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
5 6 7 |
# File 'lib/friendly_shipping/carrier.rb', line 5 def balance @balance end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/friendly_shipping/carrier.rb', line 5 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/friendly_shipping/carrier.rb', line 5 def data @data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/friendly_shipping/carrier.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/friendly_shipping/carrier.rb', line 5 def name @name end |
#shipping_methods ⇒ Object (readonly)
Returns the value of attribute shipping_methods.
5 6 7 |
# File 'lib/friendly_shipping/carrier.rb', line 5 def shipping_methods @shipping_methods end |
Instance Method Details
#==(other) ⇒ Object
22 23 24 |
# File 'lib/friendly_shipping/carrier.rb', line 22 def ==(other) id == other.id end |