Class: BigDoor::NamedGood
- Inherits:
-
ResourceWithParent
- Object
- OpenStruct
- Resource
- ResourceWithParent
- BigDoor::NamedGood
- Defined in:
- lib/big_door/named_good.rb
Overview
This module provides NamedGood Resource object corresponding to /named_good BigDoor API end point
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ NamedGood
constructor
Initialize new NamedGood object with optional Hash.
Methods inherited from ResourceWithParent
#end_point, #parent_end_point, #parent_id_attr
Methods inherited from Resource
all, #delete, #end_point, end_point, end_point_from_classname, #get_id, #instance_to_payload, #load, #response_to_instance, #save
Constructor Details
#initialize(hash = {}) ⇒ NamedGood
Initialize new NamedGood object with optional Hash
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/big_door/named_good.rb', line 13 def initialize( hash = {} ) $log.debug( "NamedGood init with hash = #{hash.inspect}") default_values = { 'named_good_collection_id' => nil, 'relative_weight' => 0, } default_values.merge!( hash ) $log.debug( "NamedGood default_values = #{default_values.inspect}") super( default_values ) end |