Class: MoveToGo::DealStatusSetting
- Inherits:
-
Object
- Object
- MoveToGo::DealStatusSetting
- Includes:
- SerializeHelper
- Defined in:
- lib/move-to-go/model/deal_status_setting.rb
Instance Attribute Summary collapse
-
#assessment ⇒ Object
Returns the value of attribute assessment.
-
#id ⇒ Object
Returns the value of attribute id.
-
#integration_id ⇒ Object
Returns the value of attribute integration_id.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(opt = nil) ⇒ DealStatusSetting
constructor
A new instance of DealStatusSetting.
- #same_as?(other) ⇒ Boolean
- #serialize_name ⇒ Object
- #serialize_variables ⇒ Object
- #to_reference ⇒ Object
Methods included from SerializeHelper
#get_import_rows, #serialize, #serialize_to_file
Constructor Details
#initialize(opt = nil) ⇒ DealStatusSetting
Returns a new instance of DealStatusSetting.
8 9 10 11 12 13 14 15 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 8 def initialize(opt = nil) if opt != nil serialize_variables.each do |myattr| val = opt[myattr[:id]] instance_variable_set("@" + myattr[:id].to_s, val) if val != nil end end end |
Instance Attribute Details
#assessment ⇒ Object
Returns the value of attribute assessment.
6 7 8 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 6 def assessment @assessment end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 6 def id @id end |
#integration_id ⇒ Object
Returns the value of attribute integration_id.
6 7 8 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 6 def integration_id @integration_id end |
#label ⇒ Object
Returns the value of attribute label.
6 7 8 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 6 def label @label end |
Instance Method Details
#same_as?(other) ⇒ Boolean
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 33 def same_as?(other) if @integration_id != nil && @integration_id == other.integration_id return true end if @id != nil && @id == other.id return true end if @label != nil && @label == other.label return true end return false end |
#serialize_name ⇒ Object
21 22 23 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 21 def serialize_name "DealStatus" end |
#serialize_variables ⇒ Object
17 18 19 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 17 def serialize_variables [ :id, :integration_id, :label, :assessment ].map{ |p| { :id => p, :type => :string } } end |
#to_reference ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/move-to-go/model/deal_status_setting.rb', line 25 def to_reference() reference = DealStatusReference.new reference.label = @label reference.integration_id = @integration_id return reference end |