Class: CyberSource::Boardingv1registrationsOrganizationInformationBusinessInformation
- Inherits:
-
Object
- Object
- CyberSource::Boardingv1registrationsOrganizationInformationBusinessInformation
- Defined in:
- lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#business_contact ⇒ Object
Returns the value of attribute business_contact.
-
#description ⇒ Object
Returns the value of attribute description.
-
#doing_business_as ⇒ Object
Returns the value of attribute doing_business_as.
-
#emergency_contact ⇒ Object
Returns the value of attribute emergency_contact.
-
#merchant_category_code ⇒ Object
Industry standard Merchant Category Code (MCC).
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#start_date ⇒ Object
‘Format: YYYY-MM-DD` Example 2016-08-11 equals August 11, 2016.
-
#tax_id ⇒ Object
Returns the value of attribute tax_id.
-
#technical_contact ⇒ Object
Returns the value of attribute technical_contact.
-
#time_zone ⇒ Object
Merchant perferred time zone Possible Values: - ‘Pacific/Pago_Pago’ - ‘Pacific/Honolulu’ - ‘America/Anchorage’ - ‘America/Vancouver’ - ‘America/Los_Angeles’ - ‘America/Phoenix’ - ‘America/Edmonton’ - ‘America/Denver’ - ‘America/Winnipeg’ - ‘America/Mexico_City’ - ‘America/Chicago’ - ‘America/Bogota’ - ‘America/Indianapolis’ - ‘America/New_York’ - ‘America/La_Paz’ - ‘America/Halifax’ - ‘America/St_Johns’ - ‘America/Buenos_Aires’ - ‘America/Godthab’ - ‘America/Sao_Paulo’ - ‘America/Noronha’ - ‘Atlantic/Cape_Verde’ - ‘GMT’ - ‘Europe/Dublin’ - ‘Europe/Lisbon’ - ‘Europe/London’ - ‘Africa/Tunis’ - ‘Europe/Vienna’ - ‘Europe/Brussels’ - ‘Europe/Zurich’ - ‘Europe/Prague’ - ‘Europe/Berlin’ - ‘Europe/Copenhagen’ - ‘Europe/Madrid’ - ‘Europe/Budapest’ - ‘Europe/Rome’ - ‘Africa/Tripoli’ - ‘Europe/Monaco’ - ‘Europe/Malta’ - ‘Europe/Amsterdam’ - ‘Europe/Oslo’ - ‘Europe/Warsaw’ - ‘Europe/Stockholm’ - ‘Europe/Belgrade’ - ‘Europe/Paris’ - ‘Africa/Johannesburg’ - ‘Europe/Minsk’ - ‘Africa/Cairo’ - ‘Europe/Helsinki’ - ‘Europe/Athens’ - ‘Asia/Jerusalem’ - ‘Europe/Riga’ - ‘Europe/Bucharest’ - ‘Europe/Istanbul’ - ‘Asia/Riyadh’ - ‘Europe/Moscow’ - ‘Asia/Dubai’ - ‘Asia/Baku’ - ‘Asia/Tbilisi’ - ‘Asia/Calcutta’ - ‘Asia/Katmandu’ - ‘Asia/Dacca’ - ‘Asia/Rangoon’ - ‘Asia/Jakarta’ - ‘Asia/Saigon’ - ‘Asia/Bangkok’ - ‘Australia/Perth’ - ‘Asia/Hong_Kong’ - ‘Asia/Macao’ - ‘Asia/Kuala_Lumpur’ - ‘Asia/Manila’ - ‘Asia/Singapore’ - ‘Asia/Taipei’ - ‘Asia/Shanghai’ - ‘Asia/Seoul’ - ‘Asia/Tokyo’ - ‘Asia/Yakutsk’ - ‘Australia/Adelaide’ - ‘Australia/Brisbane’ - ‘Australia/Broken_Hill’ - ‘Australia/Darwin’ - ‘Australia/Eucla’ - ‘Australia/Hobart’ - ‘Australia/Lindeman’ - ‘Australia/Sydney’ - ‘Australia/Lord_Howe’ - ‘Australia/Melbourne’ - ‘Asia/Magadan’ - ‘Pacific/Norfolk’ - ‘Pacific/Auckland’.
-
#type ⇒ Object
Business type Possible Values: - ‘PARTNERSHIP’ - ‘SOLE_PROPRIETORSHIP’ - ‘CORPORATION’ - ‘LLC’ - ‘NON_PROFIT’ - ‘TRUST’.
-
#website_url ⇒ Object
Returns the value of attribute website_url.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.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 = {}) ⇒ Boardingv1registrationsOrganizationInformationBusinessInformation
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 = {}) ⇒ Boardingv1registrationsOrganizationInformationBusinessInformation
Initializes the object
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 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 132 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?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'doingBusinessAs') self.doing_business_as = attributes[:'doingBusinessAs'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'startDate') self.start_date = attributes[:'startDate'] end if attributes.has_key?(:'address') self.address = attributes[:'address'] end if attributes.has_key?(:'timeZone') self.time_zone = attributes[:'timeZone'] end if attributes.has_key?(:'websiteUrl') self.website_url = attributes[:'websiteUrl'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'taxId') self.tax_id = attributes[:'taxId'] end if attributes.has_key?(:'phoneNumber') self.phone_number = attributes[:'phoneNumber'] end if attributes.has_key?(:'businessContact') self.business_contact = attributes[:'businessContact'] end if attributes.has_key?(:'technicalContact') self.technical_contact = attributes[:'technicalContact'] end if attributes.has_key?(:'emergencyContact') self.emergency_contact = attributes[:'emergencyContact'] end if attributes.has_key?(:'merchantCategoryCode') self.merchant_category_code = attributes[:'merchantCategoryCode'] end end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
25 26 27 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 25 def address @address end |
#business_contact ⇒ Object
Returns the value of attribute business_contact.
39 40 41 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 39 def business_contact @business_contact end |
#description ⇒ Object
Returns the value of attribute description.
20 21 22 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 20 def description @description end |
#doing_business_as ⇒ Object
Returns the value of attribute doing_business_as.
18 19 20 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 18 def doing_business_as @doing_business_as end |
#emergency_contact ⇒ Object
Returns the value of attribute emergency_contact.
43 44 45 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 43 def emergency_contact @emergency_contact end |
#merchant_category_code ⇒ Object
Industry standard Merchant Category Code (MCC)
46 47 48 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 46 def merchant_category_code @merchant_category_code end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 16 def name @name end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
37 38 39 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 37 def phone_number @phone_number end |
#start_date ⇒ Object
‘Format: YYYY-MM-DD` Example 2016-08-11 equals August 11, 2016
23 24 25 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 23 def start_date @start_date end |
#tax_id ⇒ Object
Returns the value of attribute tax_id.
35 36 37 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 35 def tax_id @tax_id end |
#technical_contact ⇒ Object
Returns the value of attribute technical_contact.
41 42 43 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 41 def technical_contact @technical_contact end |
#time_zone ⇒ Object
Merchant perferred time zone Possible Values: - ‘Pacific/Pago_Pago’ - ‘Pacific/Honolulu’ - ‘America/Anchorage’ - ‘America/Vancouver’ - ‘America/Los_Angeles’ - ‘America/Phoenix’ - ‘America/Edmonton’ - ‘America/Denver’ - ‘America/Winnipeg’ - ‘America/Mexico_City’ - ‘America/Chicago’ - ‘America/Bogota’ - ‘America/Indianapolis’ - ‘America/New_York’ - ‘America/La_Paz’ - ‘America/Halifax’ - ‘America/St_Johns’ - ‘America/Buenos_Aires’ - ‘America/Godthab’ - ‘America/Sao_Paulo’ - ‘America/Noronha’ - ‘Atlantic/Cape_Verde’ - ‘GMT’ - ‘Europe/Dublin’ - ‘Europe/Lisbon’ - ‘Europe/London’ - ‘Africa/Tunis’ - ‘Europe/Vienna’ - ‘Europe/Brussels’ - ‘Europe/Zurich’ - ‘Europe/Prague’ - ‘Europe/Berlin’ - ‘Europe/Copenhagen’ - ‘Europe/Madrid’ - ‘Europe/Budapest’ - ‘Europe/Rome’ - ‘Africa/Tripoli’ - ‘Europe/Monaco’ - ‘Europe/Malta’ - ‘Europe/Amsterdam’ - ‘Europe/Oslo’ - ‘Europe/Warsaw’ - ‘Europe/Stockholm’ - ‘Europe/Belgrade’ - ‘Europe/Paris’ - ‘Africa/Johannesburg’ - ‘Europe/Minsk’ - ‘Africa/Cairo’ - ‘Europe/Helsinki’ - ‘Europe/Athens’ - ‘Asia/Jerusalem’ - ‘Europe/Riga’ - ‘Europe/Bucharest’ - ‘Europe/Istanbul’ - ‘Asia/Riyadh’ - ‘Europe/Moscow’ - ‘Asia/Dubai’ - ‘Asia/Baku’ - ‘Asia/Tbilisi’ - ‘Asia/Calcutta’ - ‘Asia/Katmandu’ - ‘Asia/Dacca’ - ‘Asia/Rangoon’ - ‘Asia/Jakarta’ - ‘Asia/Saigon’ - ‘Asia/Bangkok’ - ‘Australia/Perth’ - ‘Asia/Hong_Kong’ - ‘Asia/Macao’ - ‘Asia/Kuala_Lumpur’ - ‘Asia/Manila’ - ‘Asia/Singapore’ - ‘Asia/Taipei’ - ‘Asia/Shanghai’ - ‘Asia/Seoul’ - ‘Asia/Tokyo’ - ‘Asia/Yakutsk’ - ‘Australia/Adelaide’ - ‘Australia/Brisbane’ - ‘Australia/Broken_Hill’ - ‘Australia/Darwin’ - ‘Australia/Eucla’ - ‘Australia/Hobart’ - ‘Australia/Lindeman’ - ‘Australia/Sydney’ - ‘Australia/Lord_Howe’ - ‘Australia/Melbourne’ - ‘Asia/Magadan’ - ‘Pacific/Norfolk’ - ‘Pacific/Auckland’
28 29 30 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 28 def time_zone @time_zone end |
#type ⇒ Object
Business type Possible Values: - ‘PARTNERSHIP’ - ‘SOLE_PROPRIETORSHIP’ - ‘CORPORATION’ - ‘LLC’ - ‘NON_PROFIT’ - ‘TRUST’
33 34 35 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 33 def type @type end |
#website_url ⇒ Object
Returns the value of attribute website_url.
30 31 32 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 30 def website_url @website_url end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 71 def self.attribute_map { :'name' => :'name', :'doing_business_as' => :'doingBusinessAs', :'description' => :'description', :'start_date' => :'startDate', :'address' => :'address', :'time_zone' => :'timeZone', :'website_url' => :'websiteUrl', :'type' => :'type', :'tax_id' => :'taxId', :'phone_number' => :'phoneNumber', :'business_contact' => :'businessContact', :'technical_contact' => :'technicalContact', :'emergency_contact' => :'emergencyContact', :'merchant_category_code' => :'merchantCategoryCode' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 91 def self.json_map { :'name' => :'name', :'doing_business_as' => :'doing_business_as', :'description' => :'description', :'start_date' => :'start_date', :'address' => :'address', :'time_zone' => :'time_zone', :'website_url' => :'website_url', :'type' => :'type', :'tax_id' => :'tax_id', :'phone_number' => :'phone_number', :'business_contact' => :'business_contact', :'technical_contact' => :'technical_contact', :'emergency_contact' => :'emergency_contact', :'merchant_category_code' => :'merchant_category_code' } end |
.swagger_types ⇒ Object
Attribute type mapping.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 111 def self.swagger_types { :'name' => :'String', :'doing_business_as' => :'String', :'description' => :'String', :'start_date' => :'Date', :'address' => :'Boardingv1registrationsOrganizationInformationBusinessInformationAddress', :'time_zone' => :'String', :'website_url' => :'String', :'type' => :'String', :'tax_id' => :'String', :'phone_number' => :'String', :'business_contact' => :'Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact', :'technical_contact' => :'Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact', :'emergency_contact' => :'Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact', :'merchant_category_code' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 348 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && doing_business_as == o.doing_business_as && description == o.description && start_date == o.start_date && address == o.address && time_zone == o.time_zone && website_url == o.website_url && type == o.type && tax_id == o.tax_id && phone_number == o.phone_number && business_contact == o.business_contact && technical_contact == o.technical_contact && emergency_contact == o.emergency_contact && merchant_category_code == o.merchant_category_code end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 403 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 = CyberSource.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
469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 469 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
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 382 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("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[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
369 370 371 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 369 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
375 376 377 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 375 def hash [name, doing_business_as, description, start_date, address, time_zone, website_url, type, tax_id, phone_number, business_contact, technical_contact, emergency_contact, merchant_category_code].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 197 def list_invalid_properties invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end #if @name !~ Regexp.new(/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/) #invalid_properties.push('invalid value for "name", must conform to the pattern /^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/.') #end #if !@doing_business_as.nil? && @doing_business_as !~ Regexp.new(/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/) #invalid_properties.push('invalid value for "doing_business_as", must conform to the pattern /^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/.') #end #if !@description.nil? && @description !~ Regexp.new(/[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&!?%«»€₣«»€₣ ]{1,}$/) #invalid_properties.push('invalid value for "description", must conform to the pattern /[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&!?%«»€₣«»€₣ ]{1,}$/.') #end #if !@website_url.nil? && @website_url !~ Regexp.new(/\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“â€â€˜â€™]))/) #invalid_properties.push('invalid value for "website_url", must conform to the pattern /\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“â€â€˜â€™]))/.') #end #if !@tax_id.nil? && @tax_id !~ Regexp.new(/\\d{9}/) #invalid_properties.push('invalid value for "tax_id", must conform to the pattern /\\d{9}/.') #end #if !@phone_number.nil? && @phone_number !~ Regexp.new(/^[0-9a-zA-Z\\\\+\\\\-]+$/) #invalid_properties.push('invalid value for "phone_number", must conform to the pattern /^[0-9a-zA-Z\\\\+\\\\-]+$/.') #end #if !@merchant_category_code.nil? && @merchant_category_code !~ Regexp.new(/^\\d{3,4}$/) #invalid_properties.push('invalid value for "merchant_category_code", must conform to the pattern /^\\d{3,4}$/.') #end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
449 450 451 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 449 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
455 456 457 458 459 460 461 462 463 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 455 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
443 444 445 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 443 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb', line 236 def valid? return false if @name.nil? #return false if @name !~ Regexp.new(/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/) #return false if !@doing_business_as.nil? && @doing_business_as !~ Regexp.new(/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/) #return false if !@description.nil? && @description !~ Regexp.new(/[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&!?%«»€₣«»€₣ ]{1,}$/) time_zone_validator = EnumAttributeValidator.new('String', ['Pacific/Pago_Pago', 'Pacific/Honolulu', 'America/Anchorage', 'America/Vancouver', 'America/Los_Angeles', 'America/Phoenix', 'America/Edmonton', 'America/Denver', 'America/Winnipeg', 'America/Mexico_City', 'America/Chicago', 'America/Bogota', 'America/Indianapolis', 'America/New_York', 'America/La_Paz', 'America/Halifax', 'America/St_Johns', 'America/Buenos_Aires', 'America/Godthab', 'America/Sao_Paulo', 'America/Noronha', 'Atlantic/Cape_Verde', 'GMT', 'Europe/Dublin', 'Europe/Lisbon', 'Europe/London', 'Africa/Tunis', 'Europe/Vienna', 'Europe/Brussels', 'Europe/Zurich', 'Europe/Prague', 'Europe/Berlin', 'Europe/Copenhagen', 'Europe/Madrid', 'Europe/Budapest', 'Europe/Rome', 'Africa/Tripoli', 'Europe/Monaco', 'Europe/Malta', 'Europe/Amsterdam', 'Europe/Oslo', 'Europe/Warsaw', 'Europe/Stockholm', 'Europe/Belgrade', 'Europe/Paris', 'Africa/Johannesburg', 'Europe/Minsk', 'Africa/Cairo', 'Europe/Helsinki', 'Europe/Athens', 'Asia/Jerusalem', 'Europe/Riga', 'Europe/Bucharest', 'Europe/Istanbul', 'Asia/Riyadh', 'Europe/Moscow', 'Asia/Dubai', 'Asia/Baku', 'Asia/Tbilisi', 'Asia/Calcutta', 'Asia/Katmandu', 'Asia/Dacca', 'Asia/Rangoon', 'Asia/Jakarta', 'Asia/Saigon', 'Asia/Bangkok', 'Australia/Perth', 'Asia/Hong_Kong', 'Asia/Macao', 'Asia/Kuala_Lumpur', 'Asia/Manila', 'Asia/Singapore', 'Asia/Taipei', 'Asia/Shanghai', 'Asia/Seoul', 'Asia/Tokyo', 'Asia/Yakutsk', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Darwin', 'Australia/Eucla', 'Australia/Hobart', 'Australia/Lindeman', 'Australia/Sydney', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Asia/Magadan', 'Pacific/Norfolk', 'Pacific/Auckland']) return false unless time_zone_validator.valid?(@time_zone) #return false if !@website_url.nil? && @website_url !~ Regexp.new(/\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“â€â€˜â€™]))/) type_validator = EnumAttributeValidator.new('String', ['PARTNERSHIP', 'SOLE_PROPRIETORSHIP', 'CORPORATION', 'LLC', 'NON_PROFIT', 'TRUST']) return false unless type_validator.valid?(@type) #return false if !@tax_id.nil? && @tax_id !~ Regexp.new(/\\d{9}/) #return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^[0-9a-zA-Z\\\\+\\\\-]+$/) #return false if !@merchant_category_code.nil? && @merchant_category_code !~ Regexp.new(/^\\d{3,4}$/) true end |