Class: Freeclimb::SMSTenDLCCampaign
- Inherits:
-
Object
- Object
- Freeclimb::SMSTenDLCCampaign
- Defined in:
- lib/freeclimb/models/sms_ten_dlc_campaign.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_id ⇒ Object
ID of the account that created this Queue.
-
#affiliate_marketing ⇒ Object
Does message content controlled by affiliate marketing other than the brand?.
-
#age_gated ⇒ Object
Age gated content in campaign.
-
#auto_renewal ⇒ Object
Campaign subscription auto-renewal status.
-
#billed_date ⇒ Object
Campaign recent billed date.
-
#brand_id ⇒ Object
Alphanumeric identifier of the brand associated with this campaign.
-
#campaign_id ⇒ Object
Alphanumeric identifier assigned by the registry for a campaign.
-
#create_date ⇒ Object
Unix timestamp when campaign was created.
-
#csp_id ⇒ Object
Alphanumeric identifier of the CSP associated with this campaign.
-
#description ⇒ Object
Summary description of this campaign.
-
#direct_lending ⇒ Object
Returns the value of attribute direct_lending.
-
#embedded_link ⇒ Object
Does message generated by the campaign include URL link in SMS?.
-
#embedded_phone ⇒ Object
Does message generated by the campaign include phone number in SMS?.
-
#help_keywords ⇒ Object
Subscriber help keywords.
-
#help_message ⇒ Object
Help message of the campaign.
-
#message_flow ⇒ Object
Message flow description.
-
#mock ⇒ Object
Campaign created from mock brand.
-
#next_renewal_or_expiration_date ⇒ Object
When the campaign would be due for its next renew/bill date.
-
#number_pool ⇒ Object
Does campaign utilize pool of phone nubers?.
-
#optin_keywords ⇒ Object
Subscriber opt-in keywords.
-
#optin_message ⇒ Object
Subscriber opt-in message.
-
#optout_keywords ⇒ Object
Subscriber opt-out keywords.
-
#optout_message ⇒ Object
Subscriber opt-out message.
-
#reference_id ⇒ Object
Caller supplied campaign reference ID.
-
#reseller_id ⇒ Object
Alphanumeric identifier of the reseller that you want to associate with this campaign.
-
#sample1 ⇒ Object
Message sample.
-
#sample2 ⇒ Object
Message sample.
-
#sample3 ⇒ Object
Message sample.
-
#sample4 ⇒ Object
Message sample.
-
#sample5 ⇒ Object
Message sample.
-
#status ⇒ Object
Current campaign status.
-
#sub_usecases ⇒ Object
Campaign sub-usecases.
-
#subscriber_help ⇒ Object
Does campaign responds to help keyword(s)?.
-
#subscriber_optin ⇒ Object
Does campaign require subscriber to opt-in before SMS is sent to subscriber?.
-
#subscriber_optout ⇒ Object
Does campaign support subscriber opt-out keyword(s)?.
-
#usecase ⇒ Object
Campaign usecase.
Class Method Summary collapse
-
.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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SMSTenDLCCampaign
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ SMSTenDLCCampaign
Initializes the object
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 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 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 255 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCCampaign` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCCampaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end if attributes.key?(:'campaign_id') self.campaign_id = attributes[:'campaign_id'] end if attributes.key?(:'csp_id') self.csp_id = attributes[:'csp_id'] end if attributes.key?(:'reseller_id') self.reseller_id = attributes[:'reseller_id'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'create_date') self.create_date = attributes[:'create_date'] end if attributes.key?(:'auto_renewal') self.auto_renewal = attributes[:'auto_renewal'] end if attributes.key?(:'billed_date') self.billed_date = attributes[:'billed_date'] end if attributes.key?(:'brand_id') self.brand_id = attributes[:'brand_id'] end if attributes.key?(:'usecase') self.usecase = attributes[:'usecase'] end if attributes.key?(:'sub_usecases') if (value = attributes[:'sub_usecases']).is_a?(Array) self.sub_usecases = value end end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'embedded_link') self. = attributes[:'embedded_link'] else self. = false end if attributes.key?(:'embedded_phone') self. = attributes[:'embedded_phone'] else self. = false end if attributes.key?(:'affiliate_marketing') self.affiliate_marketing = attributes[:'affiliate_marketing'] end if attributes.key?(:'number_pool') self.number_pool = attributes[:'number_pool'] else self.number_pool = false end if attributes.key?(:'age_gated') self.age_gated = attributes[:'age_gated'] end if attributes.key?(:'direct_lending') self.direct_lending = attributes[:'direct_lending'] end if attributes.key?(:'subscriber_optin') self.subscriber_optin = attributes[:'subscriber_optin'] else self.subscriber_optin = false end if attributes.key?(:'subscriber_optout') self.subscriber_optout = attributes[:'subscriber_optout'] else self.subscriber_optout = false end if attributes.key?(:'subscriber_help') self.subscriber_help = attributes[:'subscriber_help'] else self.subscriber_help = false end if attributes.key?(:'sample1') self.sample1 = attributes[:'sample1'] end if attributes.key?(:'sample2') self.sample2 = attributes[:'sample2'] end if attributes.key?(:'sample3') self.sample3 = attributes[:'sample3'] end if attributes.key?(:'sample4') self.sample4 = attributes[:'sample4'] end if attributes.key?(:'sample5') self.sample5 = attributes[:'sample5'] end if attributes.key?(:'message_flow') self. = attributes[:'message_flow'] end if attributes.key?(:'help_message') self. = attributes[:'help_message'] end if attributes.key?(:'optin_keywords') self.optin_keywords = attributes[:'optin_keywords'] end if attributes.key?(:'optout_keywords') self.optout_keywords = attributes[:'optout_keywords'] end if attributes.key?(:'help_keywords') self.help_keywords = attributes[:'help_keywords'] end if attributes.key?(:'optin_message') self. = attributes[:'optin_message'] end if attributes.key?(:'optout_message') self. = attributes[:'optout_message'] end if attributes.key?(:'reference_id') self.reference_id = attributes[:'reference_id'] end if attributes.key?(:'mock') self.mock = attributes[:'mock'] end if attributes.key?(:'next_renewal_or_expiration_date') self.next_renewal_or_expiration_date = attributes[:'next_renewal_or_expiration_date'] end end |
Instance Attribute Details
#account_id ⇒ Object
ID of the account that created this Queue.
19 20 21 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 19 def account_id @account_id end |
#affiliate_marketing ⇒ Object
Does message content controlled by affiliate marketing other than the brand?
61 62 63 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 61 def affiliate_marketing @affiliate_marketing end |
#age_gated ⇒ Object
Age gated content in campaign.
67 68 69 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 67 def age_gated @age_gated end |
#auto_renewal ⇒ Object
Campaign subscription auto-renewal status.
37 38 39 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 37 def auto_renewal @auto_renewal end |
#billed_date ⇒ Object
Campaign recent billed date.
40 41 42 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 40 def billed_date @billed_date end |
#brand_id ⇒ Object
Alphanumeric identifier of the brand associated with this campaign.
43 44 45 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 43 def brand_id @brand_id end |
#campaign_id ⇒ Object
Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC.
22 23 24 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 22 def campaign_id @campaign_id end |
#create_date ⇒ Object
Unix timestamp when campaign was created.
34 35 36 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 34 def create_date @create_date end |
#csp_id ⇒ Object
Alphanumeric identifier of the CSP associated with this campaign.
25 26 27 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 25 def csp_id @csp_id end |
#description ⇒ Object
Summary description of this campaign.
52 53 54 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 52 def description @description end |
#direct_lending ⇒ Object
Returns the value of attribute direct_lending.
69 70 71 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 69 def direct_lending @direct_lending end |
#embedded_link ⇒ Object
Does message generated by the campaign include URL link in SMS?
55 56 57 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 55 def @embedded_link end |
#embedded_phone ⇒ Object
Does message generated by the campaign include phone number in SMS?
58 59 60 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 58 def @embedded_phone end |
#help_keywords ⇒ Object
Subscriber help keywords. Multiple keywords are comma separated without space.
108 109 110 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 108 def help_keywords @help_keywords end |
#help_message ⇒ Object
Help message of the campaign.
99 100 101 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 99 def @help_message end |
#message_flow ⇒ Object
Message flow description.
96 97 98 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 96 def @message_flow end |
#mock ⇒ Object
Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP.
120 121 122 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 120 def mock @mock end |
#next_renewal_or_expiration_date ⇒ Object
When the campaign would be due for its next renew/bill date.
123 124 125 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 123 def next_renewal_or_expiration_date @next_renewal_or_expiration_date end |
#number_pool ⇒ Object
Does campaign utilize pool of phone nubers?
64 65 66 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 64 def number_pool @number_pool end |
#optin_keywords ⇒ Object
Subscriber opt-in keywords. Multiple keywords are comma separated without space.
102 103 104 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 102 def optin_keywords @optin_keywords end |
#optin_message ⇒ Object
Subscriber opt-in message.
111 112 113 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 111 def @optin_message end |
#optout_keywords ⇒ Object
Subscriber opt-out keywords. Multiple keywords are comma separated without space.
105 106 107 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 105 def optout_keywords @optout_keywords end |
#optout_message ⇒ Object
Subscriber opt-out message.
114 115 116 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 114 def @optout_message end |
#reference_id ⇒ Object
Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations.
117 118 119 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 117 def reference_id @reference_id end |
#reseller_id ⇒ Object
Alphanumeric identifier of the reseller that you want to associate with this campaign.
28 29 30 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 28 def reseller_id @reseller_id end |
#sample1 ⇒ Object
Message sample. Some campaign tiers require 1 or more message samples.
81 82 83 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 81 def sample1 @sample1 end |
#sample2 ⇒ Object
Message sample. Some campaign tiers require 2 or more message samples.
84 85 86 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 84 def sample2 @sample2 end |
#sample3 ⇒ Object
Message sample. Some campaign tiers require 3 or more message samples.
87 88 89 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 87 def sample3 @sample3 end |
#sample4 ⇒ Object
Message sample. Some campaign tiers require 4 or more message samples.
90 91 92 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 90 def sample4 @sample4 end |
#sample5 ⇒ Object
Message sample. Some campaign tiers require 5 or more message samples.
93 94 95 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 93 def sample5 @sample5 end |
#status ⇒ Object
Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status.
31 32 33 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 31 def status @status end |
#sub_usecases ⇒ Object
Campaign sub-usecases. Must be of defined valid sub-usecase types. Use ‘/registry/enum/usecase` operation to retrieve list of valid sub-usecases
49 50 51 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 49 def sub_usecases @sub_usecases end |
#subscriber_help ⇒ Object
Does campaign responds to help keyword(s)?
78 79 80 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 78 def subscriber_help @subscriber_help end |
#subscriber_optin ⇒ Object
Does campaign require subscriber to opt-in before SMS is sent to subscriber?
72 73 74 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 72 def subscriber_optin @subscriber_optin end |
#subscriber_optout ⇒ Object
Does campaign support subscriber opt-out keyword(s)?
75 76 77 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 75 def subscriber_optout @subscriber_optout end |
#usecase ⇒ Object
Campaign usecase. Must be of defined valid types. Use ‘/registry/enum/usecase` operation to retrieve usecases available for given brand.
46 47 48 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 46 def usecase @usecase end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
190 191 192 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 190 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
148 149 150 151 152 153 154 155 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 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 148 def self.attribute_map { :'account_id' => :'accountId', :'campaign_id' => :'campaignId', :'csp_id' => :'cspId', :'reseller_id' => :'resellerId', :'status' => :'status', :'create_date' => :'createDate', :'auto_renewal' => :'autoRenewal', :'billed_date' => :'billedDate', :'brand_id' => :'brandId', :'usecase' => :'usecase', :'sub_usecases' => :'subUsecases', :'description' => :'description', :'embedded_link' => :'embeddedLink', :'embedded_phone' => :'embeddedPhone', :'affiliate_marketing' => :'affiliateMarketing', :'number_pool' => :'numberPool', :'age_gated' => :'ageGated', :'direct_lending' => :'directLending', :'subscriber_optin' => :'subscriberOptin', :'subscriber_optout' => :'subscriberOptout', :'subscriber_help' => :'subscriberHelp', :'sample1' => :'sample1', :'sample2' => :'sample2', :'sample3' => :'sample3', :'sample4' => :'sample4', :'sample5' => :'sample5', :'message_flow' => :'messageFlow', :'help_message' => :'helpMessage', :'optin_keywords' => :'optinKeywords', :'optout_keywords' => :'optoutKeywords', :'help_keywords' => :'helpKeywords', :'optin_message' => :'optinMessage', :'optout_message' => :'optoutMessage', :'reference_id' => :'referenceId', :'mock' => :'mock', :'next_renewal_or_expiration_date' => :'nextRenewalOrExpirationDate' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
801 802 803 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 801 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 237 def self.openapi_nullable Set.new([ :'account_id', :'reseller_id', :'billed_date', :'sample2', :'sample3', :'sample4', :'sample5', :'message_flow', :'help_message', :'reference_id', :'next_renewal_or_expiration_date' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 195 def self.openapi_types { :'account_id' => :'String', :'campaign_id' => :'String', :'csp_id' => :'String', :'reseller_id' => :'String', :'status' => :'String', :'create_date' => :'Time', :'auto_renewal' => :'Boolean', :'billed_date' => :'Time', :'brand_id' => :'String', :'usecase' => :'String', :'sub_usecases' => :'Array<String>', :'description' => :'String', :'embedded_link' => :'Boolean', :'embedded_phone' => :'Boolean', :'affiliate_marketing' => :'Boolean', :'number_pool' => :'Boolean', :'age_gated' => :'Boolean', :'direct_lending' => :'Boolean', :'subscriber_optin' => :'Boolean', :'subscriber_optout' => :'Boolean', :'subscriber_help' => :'Boolean', :'sample1' => :'String', :'sample2' => :'String', :'sample3' => :'String', :'sample4' => :'String', :'sample5' => :'String', :'message_flow' => :'String', :'help_message' => :'String', :'optin_keywords' => :'String', :'optout_keywords' => :'String', :'help_keywords' => :'String', :'optin_message' => :'String', :'optout_message' => :'String', :'reference_id' => :'String', :'mock' => :'Boolean', :'next_renewal_or_expiration_date' => :'Date' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 745 def ==(o) return true if self.equal?(o) self.class == o.class && account_id == o.account_id && campaign_id == o.campaign_id && csp_id == o.csp_id && reseller_id == o.reseller_id && status == o.status && create_date == o.create_date && auto_renewal == o.auto_renewal && billed_date == o.billed_date && brand_id == o.brand_id && usecase == o.usecase && sub_usecases == o.sub_usecases && description == o.description && == o. && == o. && affiliate_marketing == o.affiliate_marketing && number_pool == o.number_pool && age_gated == o.age_gated && direct_lending == o.direct_lending && subscriber_optin == o.subscriber_optin && subscriber_optout == o.subscriber_optout && subscriber_help == o.subscriber_help && sample1 == o.sample1 && sample2 == o.sample2 && sample3 == o.sample3 && sample4 == o.sample4 && sample5 == o.sample5 && == o. && == o. && optin_keywords == o.optin_keywords && optout_keywords == o.optout_keywords && help_keywords == o.help_keywords && == o. && == o. && reference_id == o.reference_id && mock == o.mock && next_renewal_or_expiration_date == o.next_renewal_or_expiration_date end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 831 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Freeclimb.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 902 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 808 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
788 789 790 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 788 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
794 795 796 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 794 def hash [account_id, campaign_id, csp_id, reseller_id, status, create_date, auto_renewal, billed_date, brand_id, usecase, sub_usecases, description, , , affiliate_marketing, number_pool, age_gated, direct_lending, subscriber_optin, subscriber_optout, subscriber_help, sample1, sample2, sample3, sample4, sample5, , , optin_keywords, optout_keywords, help_keywords, , , reference_id, mock, next_renewal_or_expiration_date].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 429 def list_invalid_properties invalid_properties = Array.new if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end if @csp_id.nil? invalid_properties.push('invalid value for "csp_id", csp_id cannot be nil.') end if !@reseller_id.nil? && @reseller_id.to_s.length > 8 invalid_properties.push('invalid value for "reseller_id", the character length must be smaller than or equal to 8.') end if @brand_id.nil? invalid_properties.push('invalid value for "brand_id", brand_id cannot be nil.') end if @brand_id.to_s.length > 8 invalid_properties.push('invalid value for "brand_id", the character length must be smaller than or equal to 8.') end if @usecase.nil? invalid_properties.push('invalid value for "usecase", usecase cannot be nil.') end if @usecase.to_s.length > 20 invalid_properties.push('invalid value for "usecase", the character length must be smaller than or equal to 20.') end if @sub_usecases.nil? invalid_properties.push('invalid value for "sub_usecases", sub_usecases cannot be nil.') end if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end if @description.to_s.length > 4096 invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 4096.') end if !@sample1.nil? && @sample1.to_s.length > 1024 invalid_properties.push('invalid value for "sample1", the character length must be smaller than or equal to 1024.') end if !@sample2.nil? && @sample2.to_s.length > 1024 invalid_properties.push('invalid value for "sample2", the character length must be smaller than or equal to 1024.') end if !@sample3.nil? && @sample3.to_s.length > 1024 invalid_properties.push('invalid value for "sample3", the character length must be smaller than or equal to 1024.') end if !@sample4.nil? && @sample4.to_s.length > 1024 invalid_properties.push('invalid value for "sample4", the character length must be smaller than or equal to 1024.') end if !@sample5.nil? && @sample5.to_s.length > 1024 invalid_properties.push('invalid value for "sample5", the character length must be smaller than or equal to 1024.') end if !@message_flow.nil? && @message_flow.to_s.length > 2048 invalid_properties.push('invalid value for "message_flow", the character length must be smaller than or equal to 2048.') end if !@help_message.nil? && @help_message.to_s.length > 255 invalid_properties.push('invalid value for "help_message", the character length must be smaller than or equal to 255.') end if !@optin_keywords.nil? && @optin_keywords.to_s.length > 255 invalid_properties.push('invalid value for "optin_keywords", the character length must be smaller than or equal to 255.') end if !@optout_keywords.nil? && @optout_keywords.to_s.length > 255 invalid_properties.push('invalid value for "optout_keywords", the character length must be smaller than or equal to 255.') end if !@help_keywords.nil? && @help_keywords.to_s.length > 255 invalid_properties.push('invalid value for "help_keywords", the character length must be smaller than or equal to 255.') end if !@optin_message.nil? && @optin_message.to_s.length > 255 invalid_properties.push('invalid value for "optin_message", the character length must be smaller than or equal to 255.') end if !@optout_message.nil? && @optout_message.to_s.length > 255 invalid_properties.push('invalid value for "optout_message", the character length must be smaller than or equal to 255.') end if !@reference_id.nil? && @reference_id.to_s.length > 50 invalid_properties.push('invalid value for "reference_id", the character length must be smaller than or equal to 50.') end if @mock.nil? invalid_properties.push('invalid value for "mock", mock cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
878 879 880 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 878 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
884 885 886 887 888 889 890 891 892 893 894 895 896 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 884 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 |
#to_s ⇒ String
Returns the string representation of the object
872 873 874 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 872 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
532 533 534 535 536 537 538 539 |
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 532 def valid? if @account_id.nil? false else list_invalid_properties.length() == 0 end end |