Class: ImpactCampaignModel
- Inherits:
-
Object
- Object
- ImpactCampaignModel
- Defined in:
- lib/wingify/models/campaign/impact_campaign_model.rb
Overview
Copyright 2024-2026 Wingify Software Pvt. Ltd.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Instance Attribute Summary collapse
-
#campaign_id ⇒ Object
readonly
Returns the value of attribute campaign_id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #get_campaign_id ⇒ Object
- #get_type ⇒ Object
-
#initialize ⇒ ImpactCampaignModel
constructor
A new instance of ImpactCampaignModel.
-
#model_from_dictionary(impact_campaign) ⇒ Object
Creates a model instance from a hash (dictionary).
Constructor Details
#initialize ⇒ ImpactCampaignModel
Returns a new instance of ImpactCampaignModel.
18 19 20 21 |
# File 'lib/wingify/models/campaign/impact_campaign_model.rb', line 18 def initialize @campaign_id = nil @type = '' end |
Instance Attribute Details
#campaign_id ⇒ Object (readonly)
Returns the value of attribute campaign_id.
16 17 18 |
# File 'lib/wingify/models/campaign/impact_campaign_model.rb', line 16 def campaign_id @campaign_id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
16 17 18 |
# File 'lib/wingify/models/campaign/impact_campaign_model.rb', line 16 def type @type end |
Instance Method Details
#get_campaign_id ⇒ Object
30 31 32 |
# File 'lib/wingify/models/campaign/impact_campaign_model.rb', line 30 def get_campaign_id @campaign_id end |
#get_type ⇒ Object
34 35 36 |
# File 'lib/wingify/models/campaign/impact_campaign_model.rb', line 34 def get_type @type end |
#model_from_dictionary(impact_campaign) ⇒ Object
Creates a model instance from a hash (dictionary)
24 25 26 27 28 |
# File 'lib/wingify/models/campaign/impact_campaign_model.rb', line 24 def model_from_dictionary(impact_campaign) @type = impact_campaign["type"] @campaign_id = impact_campaign["campaignId"] self end |