Class: PagSeguro::Item
- Inherits:
-
Object
- Object
- PagSeguro::Item
- Extended by:
- ConvertFieldToDigit
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/pag_seguro/item.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
-
#weight ⇒ Object
Returns the value of attribute weight.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Item
constructor
A new instance of Item.
Methods included from ConvertFieldToDigit
Constructor Details
#initialize(attributes = {}) ⇒ Item
Returns a new instance of Item.
16 17 18 19 20 21 22 23 |
# File 'lib/pag_seguro/item.rb', line 16 def initialize(attributes = {}) @id = attributes[:id] @description = attributes[:description] @amount = attributes[:amount] @quantity = attributes[:quantity] @shipping_cost = attributes[:shipping_cost] @weight = attributes[:weight] end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
6 7 8 |
# File 'lib/pag_seguro/item.rb', line 6 def amount @amount end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/pag_seguro/item.rb', line 6 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/pag_seguro/item.rb', line 6 def id @id end |
#quantity ⇒ Object
Returns the value of attribute quantity.
6 7 8 |
# File 'lib/pag_seguro/item.rb', line 6 def quantity @quantity end |
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
6 7 8 |
# File 'lib/pag_seguro/item.rb', line 6 def shipping_cost @shipping_cost end |
#weight ⇒ Object
Returns the value of attribute weight.
6 7 8 |
# File 'lib/pag_seguro/item.rb', line 6 def weight @weight end |