Class: Pingram::TenDlcCampaignUpdateRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Pingram::TenDlcCampaignUpdateRequest
- Defined in:
- lib/pingram/models/ten_dlc_campaign_update_request.rb
Overview
Request body for PATCH /registrations/us/10dlc/campaign (admin only)
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#campaign_age_gated ⇒ Object
Returns the value of attribute campaign_age_gated.
-
#campaign_description ⇒ Object
Returns the value of attribute campaign_description.
-
#campaign_direct_lending ⇒ Object
Returns the value of attribute campaign_direct_lending.
-
#campaign_embedded_link ⇒ Object
Returns the value of attribute campaign_embedded_link.
-
#campaign_embedded_link_url ⇒ Object
Returns the value of attribute campaign_embedded_link_url.
-
#campaign_embedded_phone ⇒ Object
Returns the value of attribute campaign_embedded_phone.
-
#campaign_help_keywords ⇒ Object
Returns the value of attribute campaign_help_keywords.
-
#campaign_help_message ⇒ Object
Returns the value of attribute campaign_help_message.
-
#campaign_message_flow ⇒ Object
Returns the value of attribute campaign_message_flow.
-
#campaign_optin_keywords ⇒ Object
Returns the value of attribute campaign_optin_keywords.
-
#campaign_optin_message ⇒ Object
Returns the value of attribute campaign_optin_message.
-
#campaign_optout_keywords ⇒ Object
Returns the value of attribute campaign_optout_keywords.
-
#campaign_optout_message ⇒ Object
Returns the value of attribute campaign_optout_message.
-
#campaign_privacy_policy_link ⇒ Object
Returns the value of attribute campaign_privacy_policy_link.
-
#campaign_sample1 ⇒ Object
Returns the value of attribute campaign_sample1.
-
#campaign_sample2 ⇒ Object
Returns the value of attribute campaign_sample2.
-
#campaign_sample3 ⇒ Object
Returns the value of attribute campaign_sample3.
-
#campaign_sample4 ⇒ Object
Returns the value of attribute campaign_sample4.
-
#campaign_status ⇒ Object
Pingram-side brand registration workflow status.
-
#campaign_terms_and_conditions_link ⇒ Object
Returns the value of attribute campaign_terms_and_conditions_link.
-
#campaign_usecase ⇒ Object
Returns the value of attribute campaign_usecase.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TenDlcCampaignUpdateRequest
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ TenDlcCampaignUpdateRequest
Initializes the object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 156 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TenDlcCampaignUpdateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TenDlcCampaignUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'campaign_description') self.campaign_description = attributes[:'campaign_description'] end if attributes.key?(:'campaign_sample1') self.campaign_sample1 = attributes[:'campaign_sample1'] end if attributes.key?(:'campaign_sample2') self.campaign_sample2 = attributes[:'campaign_sample2'] end if attributes.key?(:'campaign_sample3') self.campaign_sample3 = attributes[:'campaign_sample3'] end if attributes.key?(:'campaign_sample4') self.campaign_sample4 = attributes[:'campaign_sample4'] end if attributes.key?(:'campaign_message_flow') self. = attributes[:'campaign_message_flow'] end if attributes.key?(:'campaign_optin_keywords') self.campaign_optin_keywords = attributes[:'campaign_optin_keywords'] end if attributes.key?(:'campaign_optin_message') self. = attributes[:'campaign_optin_message'] end if attributes.key?(:'campaign_optout_keywords') self.campaign_optout_keywords = attributes[:'campaign_optout_keywords'] end if attributes.key?(:'campaign_optout_message') self. = attributes[:'campaign_optout_message'] end if attributes.key?(:'campaign_help_keywords') self.campaign_help_keywords = attributes[:'campaign_help_keywords'] end if attributes.key?(:'campaign_help_message') self. = attributes[:'campaign_help_message'] end if attributes.key?(:'campaign_embedded_link') self. = attributes[:'campaign_embedded_link'] end if attributes.key?(:'campaign_embedded_link_url') self. = attributes[:'campaign_embedded_link_url'] end if attributes.key?(:'campaign_embedded_phone') self. = attributes[:'campaign_embedded_phone'] end if attributes.key?(:'campaign_age_gated') self.campaign_age_gated = attributes[:'campaign_age_gated'] end if attributes.key?(:'campaign_direct_lending') self.campaign_direct_lending = attributes[:'campaign_direct_lending'] end if attributes.key?(:'campaign_privacy_policy_link') self.campaign_privacy_policy_link = attributes[:'campaign_privacy_policy_link'] end if attributes.key?(:'campaign_terms_and_conditions_link') self.campaign_terms_and_conditions_link = attributes[:'campaign_terms_and_conditions_link'] end if attributes.key?(:'campaign_usecase') self.campaign_usecase = attributes[:'campaign_usecase'] end if attributes.key?(:'campaign_status') self.campaign_status = attributes[:'campaign_status'] end end |
Instance Attribute Details
#campaign_age_gated ⇒ Object
Returns the value of attribute campaign_age_gated.
49 50 51 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 49 def campaign_age_gated @campaign_age_gated end |
#campaign_description ⇒ Object
Returns the value of attribute campaign_description.
19 20 21 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 19 def campaign_description @campaign_description end |
#campaign_direct_lending ⇒ Object
Returns the value of attribute campaign_direct_lending.
51 52 53 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 51 def campaign_direct_lending @campaign_direct_lending end |
#campaign_embedded_link ⇒ Object
Returns the value of attribute campaign_embedded_link.
43 44 45 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 43 def @campaign_embedded_link end |
#campaign_embedded_link_url ⇒ Object
Returns the value of attribute campaign_embedded_link_url.
45 46 47 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 45 def @campaign_embedded_link_url end |
#campaign_embedded_phone ⇒ Object
Returns the value of attribute campaign_embedded_phone.
47 48 49 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 47 def @campaign_embedded_phone end |
#campaign_help_keywords ⇒ Object
Returns the value of attribute campaign_help_keywords.
39 40 41 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 39 def campaign_help_keywords @campaign_help_keywords end |
#campaign_help_message ⇒ Object
Returns the value of attribute campaign_help_message.
41 42 43 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 41 def @campaign_help_message end |
#campaign_message_flow ⇒ Object
Returns the value of attribute campaign_message_flow.
29 30 31 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 29 def @campaign_message_flow end |
#campaign_optin_keywords ⇒ Object
Returns the value of attribute campaign_optin_keywords.
31 32 33 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 31 def campaign_optin_keywords @campaign_optin_keywords end |
#campaign_optin_message ⇒ Object
Returns the value of attribute campaign_optin_message.
33 34 35 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 33 def @campaign_optin_message end |
#campaign_optout_keywords ⇒ Object
Returns the value of attribute campaign_optout_keywords.
35 36 37 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 35 def campaign_optout_keywords @campaign_optout_keywords end |
#campaign_optout_message ⇒ Object
Returns the value of attribute campaign_optout_message.
37 38 39 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 37 def @campaign_optout_message end |
#campaign_privacy_policy_link ⇒ Object
Returns the value of attribute campaign_privacy_policy_link.
53 54 55 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 53 def campaign_privacy_policy_link @campaign_privacy_policy_link end |
#campaign_sample1 ⇒ Object
Returns the value of attribute campaign_sample1.
21 22 23 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 21 def campaign_sample1 @campaign_sample1 end |
#campaign_sample2 ⇒ Object
Returns the value of attribute campaign_sample2.
23 24 25 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 23 def campaign_sample2 @campaign_sample2 end |
#campaign_sample3 ⇒ Object
Returns the value of attribute campaign_sample3.
25 26 27 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 25 def campaign_sample3 @campaign_sample3 end |
#campaign_sample4 ⇒ Object
Returns the value of attribute campaign_sample4.
27 28 29 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 27 def campaign_sample4 @campaign_sample4 end |
#campaign_status ⇒ Object
Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
60 61 62 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 60 def campaign_status @campaign_status end |
#campaign_terms_and_conditions_link ⇒ Object
Returns the value of attribute campaign_terms_and_conditions_link.
55 56 57 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 55 def campaign_terms_and_conditions_link @campaign_terms_and_conditions_link end |
#campaign_usecase ⇒ Object
Returns the value of attribute campaign_usecase.
57 58 59 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 57 def campaign_usecase @campaign_usecase end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
112 113 114 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 112 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
117 118 119 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 117 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 85 def self.attribute_map { :'campaign_description' => :'campaignDescription', :'campaign_sample1' => :'campaignSample1', :'campaign_sample2' => :'campaignSample2', :'campaign_sample3' => :'campaignSample3', :'campaign_sample4' => :'campaignSample4', :'campaign_message_flow' => :'campaignMessageFlow', :'campaign_optin_keywords' => :'campaignOptinKeywords', :'campaign_optin_message' => :'campaignOptinMessage', :'campaign_optout_keywords' => :'campaignOptoutKeywords', :'campaign_optout_message' => :'campaignOptoutMessage', :'campaign_help_keywords' => :'campaignHelpKeywords', :'campaign_help_message' => :'campaignHelpMessage', :'campaign_embedded_link' => :'campaignEmbeddedLink', :'campaign_embedded_link_url' => :'campaignEmbeddedLinkUrl', :'campaign_embedded_phone' => :'campaignEmbeddedPhone', :'campaign_age_gated' => :'campaignAgeGated', :'campaign_direct_lending' => :'campaignDirectLending', :'campaign_privacy_policy_link' => :'campaignPrivacyPolicyLink', :'campaign_terms_and_conditions_link' => :'campaignTermsAndConditionsLink', :'campaign_usecase' => :'campaignUsecase', :'campaign_status' => :'campaignStatus' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 325 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
149 150 151 152 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 149 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 122 def self.openapi_types { :'campaign_description' => :'String', :'campaign_sample1' => :'String', :'campaign_sample2' => :'String', :'campaign_sample3' => :'String', :'campaign_sample4' => :'String', :'campaign_message_flow' => :'String', :'campaign_optin_keywords' => :'String', :'campaign_optin_message' => :'String', :'campaign_optout_keywords' => :'String', :'campaign_optout_message' => :'String', :'campaign_help_keywords' => :'String', :'campaign_help_message' => :'String', :'campaign_embedded_link' => :'Boolean', :'campaign_embedded_link_url' => :'String', :'campaign_embedded_phone' => :'Boolean', :'campaign_age_gated' => :'Boolean', :'campaign_direct_lending' => :'Boolean', :'campaign_privacy_policy_link' => :'String', :'campaign_terms_and_conditions_link' => :'String', :'campaign_usecase' => :'String', :'campaign_status' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 284 def ==(o) return true if self.equal?(o) self.class == o.class && campaign_description == o.campaign_description && campaign_sample1 == o.campaign_sample1 && campaign_sample2 == o.campaign_sample2 && campaign_sample3 == o.campaign_sample3 && campaign_sample4 == o.campaign_sample4 && == o. && campaign_optin_keywords == o.campaign_optin_keywords && == o. && campaign_optout_keywords == o.campaign_optout_keywords && == o. && campaign_help_keywords == o.campaign_help_keywords && == o. && == o. && == o. && == o. && campaign_age_gated == o.campaign_age_gated && campaign_direct_lending == o.campaign_direct_lending && campaign_privacy_policy_link == o.campaign_privacy_policy_link && campaign_terms_and_conditions_link == o.campaign_terms_and_conditions_link && campaign_usecase == o.campaign_usecase && campaign_status == o.campaign_status end |
#eql?(o) ⇒ Boolean
312 313 314 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 312 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
318 319 320 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 318 def hash [campaign_description, campaign_sample1, campaign_sample2, campaign_sample3, campaign_sample4, , campaign_optin_keywords, , campaign_optout_keywords, , campaign_help_keywords, , , , , campaign_age_gated, campaign_direct_lending, campaign_privacy_policy_link, campaign_terms_and_conditions_link, campaign_usecase, campaign_status].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
257 258 259 260 261 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 257 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 347 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
265 266 267 268 269 270 |
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 265 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' campaign_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"]) return false unless campaign_status_validator.valid?(@campaign_status) true end |