Class: CorreiosSigep::Models::Product
- Inherits:
-
Object
- Object
- CorreiosSigep::Models::Product
- Defined in:
- lib/correios_sigep/models/product.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Product
constructor
A new instance of Product.
Constructor Details
#initialize(options = {}) ⇒ Product
12 13 14 15 16 |
# File 'lib/correios_sigep/models/product.rb', line 12 def initialize(={}) @code = [:code] @type = [:type] @quantity = [:quantity] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/correios_sigep/models/product.rb', line 4 def code @code end |
#quantity ⇒ Object
Returns the value of attribute quantity.
4 5 6 |
# File 'lib/correios_sigep/models/product.rb', line 4 def quantity @quantity end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/correios_sigep/models/product.rb', line 4 def type @type end |
Class Method Details
.build(&block) ⇒ Object
6 7 8 9 10 |
# File 'lib/correios_sigep/models/product.rb', line 6 def self.build(&block) builder = Builders::Product.new builder.instance_eval(&block) builder.build end |