Class: SwaggerClient::Site
- Inherits:
-
Object
- Object
- SwaggerClient::Site
- Defined in:
- lib/swagger_client/models/site.rb
Instance Attribute Summary collapse
-
#accepts_american_express ⇒ Object
When ‘true`, indicates that this site accepts American Express cards.<br /> When `false`, indicates that this site does not accept American Express credit cards.
-
#accepts_discover ⇒ Object
When ‘true`, indicates that this site accepts Discover cards.<br /> When `false`, indicates that this site does not accept Discover credit cards.
-
#accepts_master_card ⇒ Object
When ‘true`, indicates that this site accepts MasterCard cards.<br /> When `false`, indicates that this site does not accept MasterCard credit cards.
-
#accepts_visa ⇒ Object
When ‘true`, indicates that this site accepts Visa cards.<br /> When `false`, indicates that this site does not accept Visa credit cards.
-
#allows_dashboard_access ⇒ Object
When ‘true`, indicates that this site allows access to its dashboard.<br /> When `false`, indicates that this site does not allow access to its dashboard.
-
#contact_email ⇒ Object
The site’s email address.
-
#country_code ⇒ Object
The country code for the site.
-
#currency_iso_code ⇒ Object
The currency ISO code for the site.
-
#description ⇒ Object
A description of the site.
-
#id ⇒ Object
The site ID.
-
#logo_url ⇒ Object
The URL to the site’s logo.
-
#name ⇒ Object
The name of the site.
-
#page_color1 ⇒ Object
A hex code for a color the business owner uses in marketing.
-
#page_color2 ⇒ Object
The hex code for a second color, to be used in the same manner as ‘pageColor1`.
-
#page_color3 ⇒ Object
The hex code for a third color, to be used in the same manner as ‘pageColor1`.
-
#page_color4 ⇒ Object
The hex code for a fourth color, to be used in the same manner as ‘pageColor1`.
-
#pricing_level ⇒ Object
The MINDBODY pricing level for the business.
-
#sms_package_enabled ⇒ Object
When ‘true`, indicates that the business uses SMS text messages to communicate with its clients.<br /> When `false`, indicates that the business does not use SMS text messages to communicate with its clients.
-
#tax_inclusive_prices ⇒ Object
When ‘true`, indicates that the total includes tax.<br /> When `false`, indicates that the total does not include tax.
-
#time_zone ⇒ Object
The time zone the site is located in.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_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 ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Site
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 = {}) ⇒ Site
Initializes the object
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 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 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 |
# File 'lib/swagger_client/models/site.rb', line 131 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'AcceptsAmericanExpress') self.accepts_american_express = attributes[:'AcceptsAmericanExpress'] end if attributes.has_key?(:'AcceptsDiscover') self.accepts_discover = attributes[:'AcceptsDiscover'] end if attributes.has_key?(:'AcceptsMasterCard') self.accepts_master_card = attributes[:'AcceptsMasterCard'] end if attributes.has_key?(:'AcceptsVisa') self.accepts_visa = attributes[:'AcceptsVisa'] end if attributes.has_key?(:'AllowsDashboardAccess') self.allows_dashboard_access = attributes[:'AllowsDashboardAccess'] end if attributes.has_key?(:'ContactEmail') self.contact_email = attributes[:'ContactEmail'] end if attributes.has_key?(:'Description') self.description = attributes[:'Description'] end if attributes.has_key?(:'Id') self.id = attributes[:'Id'] end if attributes.has_key?(:'LogoUrl') self.logo_url = attributes[:'LogoUrl'] end if attributes.has_key?(:'Name') self.name = attributes[:'Name'] end if attributes.has_key?(:'PageColor1') self.page_color1 = attributes[:'PageColor1'] end if attributes.has_key?(:'PageColor2') self.page_color2 = attributes[:'PageColor2'] end if attributes.has_key?(:'PageColor3') self.page_color3 = attributes[:'PageColor3'] end if attributes.has_key?(:'PageColor4') self.page_color4 = attributes[:'PageColor4'] end if attributes.has_key?(:'PricingLevel') self.pricing_level = attributes[:'PricingLevel'] end if attributes.has_key?(:'SmsPackageEnabled') self.sms_package_enabled = attributes[:'SmsPackageEnabled'] end if attributes.has_key?(:'TaxInclusivePrices') self.tax_inclusive_prices = attributes[:'TaxInclusivePrices'] end if attributes.has_key?(:'CurrencyIsoCode') self.currency_iso_code = attributes[:'CurrencyIsoCode'] end if attributes.has_key?(:'CountryCode') self.country_code = attributes[:'CountryCode'] end if attributes.has_key?(:'TimeZone') self.time_zone = attributes[:'TimeZone'] end end |
Instance Attribute Details
#accepts_american_express ⇒ Object
When ‘true`, indicates that this site accepts American Express cards.<br /> When `false`, indicates that this site does not accept American Express credit cards.
18 19 20 |
# File 'lib/swagger_client/models/site.rb', line 18 def accepts_american_express @accepts_american_express end |
#accepts_discover ⇒ Object
When ‘true`, indicates that this site accepts Discover cards.<br /> When `false`, indicates that this site does not accept Discover credit cards.
21 22 23 |
# File 'lib/swagger_client/models/site.rb', line 21 def accepts_discover @accepts_discover end |
#accepts_master_card ⇒ Object
When ‘true`, indicates that this site accepts MasterCard cards.<br /> When `false`, indicates that this site does not accept MasterCard credit cards.
24 25 26 |
# File 'lib/swagger_client/models/site.rb', line 24 def accepts_master_card @accepts_master_card end |
#accepts_visa ⇒ Object
When ‘true`, indicates that this site accepts Visa cards.<br /> When `false`, indicates that this site does not accept Visa credit cards.
27 28 29 |
# File 'lib/swagger_client/models/site.rb', line 27 def accepts_visa @accepts_visa end |
#allows_dashboard_access ⇒ Object
When ‘true`, indicates that this site allows access to its dashboard.<br /> When `false`, indicates that this site does not allow access to its dashboard.
30 31 32 |
# File 'lib/swagger_client/models/site.rb', line 30 def allows_dashboard_access @allows_dashboard_access end |
#contact_email ⇒ Object
The site’s email address.
33 34 35 |
# File 'lib/swagger_client/models/site.rb', line 33 def contact_email @contact_email end |
#country_code ⇒ Object
The country code for the site.
72 73 74 |
# File 'lib/swagger_client/models/site.rb', line 72 def country_code @country_code end |
#currency_iso_code ⇒ Object
The currency ISO code for the site.
69 70 71 |
# File 'lib/swagger_client/models/site.rb', line 69 def currency_iso_code @currency_iso_code end |
#description ⇒ Object
A description of the site.
36 37 38 |
# File 'lib/swagger_client/models/site.rb', line 36 def description @description end |
#id ⇒ Object
The site ID.
39 40 41 |
# File 'lib/swagger_client/models/site.rb', line 39 def id @id end |
#logo_url ⇒ Object
The URL to the site’s logo.
42 43 44 |
# File 'lib/swagger_client/models/site.rb', line 42 def logo_url @logo_url end |
#name ⇒ Object
The name of the site.
45 46 47 |
# File 'lib/swagger_client/models/site.rb', line 45 def name @name end |
#page_color1 ⇒ Object
A hex code for a color the business owner uses in marketing. This color can be used to set a theme for an integration so that it matches the configured color-scheme for the business.
48 49 50 |
# File 'lib/swagger_client/models/site.rb', line 48 def page_color1 @page_color1 end |
#page_color2 ⇒ Object
The hex code for a second color, to be used in the same manner as ‘pageColor1`.
51 52 53 |
# File 'lib/swagger_client/models/site.rb', line 51 def page_color2 @page_color2 end |
#page_color3 ⇒ Object
The hex code for a third color, to be used in the same manner as ‘pageColor1`.
54 55 56 |
# File 'lib/swagger_client/models/site.rb', line 54 def page_color3 @page_color3 end |
#page_color4 ⇒ Object
The hex code for a fourth color, to be used in the same manner as ‘pageColor1`.
57 58 59 |
# File 'lib/swagger_client/models/site.rb', line 57 def page_color4 @page_color4 end |
#pricing_level ⇒ Object
The MINDBODY pricing level for the business. Possible values are: Accelerate - The business is on MINDBODY’s Accelerate pricing tier. Grow - The business is on MINDBODY’s Essential pricing tier. Legacy - The business is on an older MINDBODY pricing tier that is no longer offered. Listing - The business is on an older MINDBODY pricing tier that is no longer offered. Pro - The business is on an older MINDBODY pricing tier that is no longer offered. Solo - The business is on an older MINDBODY pricing tier that is no longer offered. Ultimate - The business is on MINDBODY’s Ultimate pricing tier.
60 61 62 |
# File 'lib/swagger_client/models/site.rb', line 60 def pricing_level @pricing_level end |
#sms_package_enabled ⇒ Object
When ‘true`, indicates that the business uses SMS text messages to communicate with its clients.<br /> When `false`, indicates that the business does not use SMS text messages to communicate with its clients.
63 64 65 |
# File 'lib/swagger_client/models/site.rb', line 63 def sms_package_enabled @sms_package_enabled end |
#tax_inclusive_prices ⇒ Object
When ‘true`, indicates that the total includes tax.<br /> When `false`, indicates that the total does not include tax.
66 67 68 |
# File 'lib/swagger_client/models/site.rb', line 66 def tax_inclusive_prices @tax_inclusive_prices end |
#time_zone ⇒ Object
The time zone the site is located in.
75 76 77 |
# File 'lib/swagger_client/models/site.rb', line 75 def time_zone @time_zone end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/swagger_client/models/site.rb', line 78 def self.attribute_map { :'accepts_american_express' => :'AcceptsAmericanExpress', :'accepts_discover' => :'AcceptsDiscover', :'accepts_master_card' => :'AcceptsMasterCard', :'accepts_visa' => :'AcceptsVisa', :'allows_dashboard_access' => :'AllowsDashboardAccess', :'contact_email' => :'ContactEmail', :'description' => :'Description', :'id' => :'Id', :'logo_url' => :'LogoUrl', :'name' => :'Name', :'page_color1' => :'PageColor1', :'page_color2' => :'PageColor2', :'page_color3' => :'PageColor3', :'page_color4' => :'PageColor4', :'pricing_level' => :'PricingLevel', :'sms_package_enabled' => :'SmsPackageEnabled', :'tax_inclusive_prices' => :'TaxInclusivePrices', :'currency_iso_code' => :'CurrencyIsoCode', :'country_code' => :'CountryCode', :'time_zone' => :'TimeZone' } end |
.swagger_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/swagger_client/models/site.rb', line 104 def self.swagger_types { :'accepts_american_express' => :'BOOLEAN', :'accepts_discover' => :'BOOLEAN', :'accepts_master_card' => :'BOOLEAN', :'accepts_visa' => :'BOOLEAN', :'allows_dashboard_access' => :'BOOLEAN', :'contact_email' => :'String', :'description' => :'String', :'id' => :'Integer', :'logo_url' => :'String', :'name' => :'String', :'page_color1' => :'String', :'page_color2' => :'String', :'page_color3' => :'String', :'page_color4' => :'String', :'pricing_level' => :'String', :'sms_package_enabled' => :'BOOLEAN', :'tax_inclusive_prices' => :'BOOLEAN', :'currency_iso_code' => :'String', :'country_code' => :'String', :'time_zone' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/swagger_client/models/site.rb', line 233 def ==(o) return true if self.equal?(o) self.class == o.class && accepts_american_express == o.accepts_american_express && accepts_discover == o.accepts_discover && accepts_master_card == o.accepts_master_card && accepts_visa == o.accepts_visa && allows_dashboard_access == o.allows_dashboard_access && contact_email == o.contact_email && description == o.description && id == o.id && logo_url == o.logo_url && name == o.name && page_color1 == o.page_color1 && page_color2 == o.page_color2 && page_color3 == o.page_color3 && page_color4 == o.page_color4 && pricing_level == o.pricing_level && sms_package_enabled == o.sms_package_enabled && tax_inclusive_prices == o.tax_inclusive_prices && currency_iso_code == o.currency_iso_code && country_code == o.country_code && time_zone == o.time_zone end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/swagger_client/models/site.rb', line 294 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.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 temp_model = SwaggerClient.const_get(type).new temp_model.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
360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/swagger_client/models/site.rb', line 360 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
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/swagger_client/models/site.rb', line 273 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the 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 # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
260 261 262 |
# File 'lib/swagger_client/models/site.rb', line 260 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
266 267 268 |
# File 'lib/swagger_client/models/site.rb', line 266 def hash [accepts_american_express, accepts_discover, accepts_master_card, accepts_visa, allows_dashboard_access, contact_email, description, id, logo_url, name, page_color1, page_color2, page_color3, page_color4, pricing_level, sms_package_enabled, tax_inclusive_prices, currency_iso_code, country_code, time_zone].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
220 221 222 223 |
# File 'lib/swagger_client/models/site.rb', line 220 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
340 341 342 |
# File 'lib/swagger_client/models/site.rb', line 340 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
346 347 348 349 350 351 352 353 354 |
# File 'lib/swagger_client/models/site.rb', line 346 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
334 335 336 |
# File 'lib/swagger_client/models/site.rb', line 334 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
227 228 229 |
# File 'lib/swagger_client/models/site.rb', line 227 def valid? true end |