Class: CyberSource::Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo
- Inherits:
-
Object
- Object
- CyberSource::Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo
- Defined in:
- lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb
Overview
Shipping information.
Instance Attribute Summary collapse
-
#address1 ⇒ Object
(Conditional) Address line 1 Conditionality - Required when used with the DPA Registration operation in the Management Service APIs Required when address is used as shipping/delivery Address.
-
#address2 ⇒ Object
Address line 2.
-
#address3 ⇒ Object
Address line 3.
-
#address_id ⇒ Object
(Conditional) Reference identifier of the address Conditionality - Required when address is already registered with VACP System.
-
#administrative_area ⇒ Object
(Conditional) Address state Recommendation to support ISO 3166-2 format i.e.
-
#country ⇒ Object
Address country code ISO 3166-1 alpha-2 country code.
-
#country_calling_code ⇒ Object
Phone number country code as defined by the International Telecommunication Union.
-
#create_time ⇒ Object
Date and time the address was created.
-
#district ⇒ Object
Name of the business; Name of the community; c/o Name etc.
-
#email ⇒ Object
Consumer-provided email address.
-
#first_name ⇒ Object
First name of the recipient.
-
#instructions ⇒ Object
Consumer-provided delivery instructions.
-
#last_name ⇒ Object
Last name of the recipient.
-
#last_used_time ⇒ Object
Date and time the address was last used.
-
#locality ⇒ Object
(Conditional) Address city Conditionality - When used with the DPA Registration operation in the Management Service APIs at least one of the following is required - both city and state - zip Required if this is a shipping address in a valid format for the country.
-
#middle_name ⇒ Object
Middle name of the recipient.
-
#number_is_voice_only ⇒ Object
Indicates that the phone number provided is not capable of receiving text messages.
-
#phone_number ⇒ Object
Phone number without country code.
-
#postal_code ⇒ Object
Address zip/postal code Conditionality - When used with the DPA Registration operation in th Management Service APIs at least one of the following is required.
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 = {}) ⇒ Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo
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 = {}) ⇒ Acpv1instructionsinstructionIdcredentialsOrderInformationShipTo
Initializes the object
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 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 151 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?(:'addressId') self.address_id = attributes[:'addressId'] end if attributes.has_key?(:'district') self.district = attributes[:'district'] end if attributes.has_key?(:'address1') self.address1 = attributes[:'address1'] end if attributes.has_key?(:'address2') self.address2 = attributes[:'address2'] end if attributes.has_key?(:'address3') self.address3 = attributes[:'address3'] end if attributes.has_key?(:'locality') self.locality = attributes[:'locality'] end if attributes.has_key?(:'administrativeArea') self.administrative_area = attributes[:'administrativeArea'] end if attributes.has_key?(:'country') self.country = attributes[:'country'] end if attributes.has_key?(:'postalCode') self.postal_code = attributes[:'postalCode'] end if attributes.has_key?(:'createTime') self.create_time = attributes[:'createTime'] end if attributes.has_key?(:'lastUsedTime') self.last_used_time = attributes[:'lastUsedTime'] end if attributes.has_key?(:'firstName') self.first_name = attributes[:'firstName'] end if attributes.has_key?(:'middleName') self.middle_name = attributes[:'middleName'] end if attributes.has_key?(:'lastName') self.last_name = attributes[:'lastName'] end if attributes.has_key?(:'email') self.email = attributes[:'email'] end if attributes.has_key?(:'countryCallingCode') self.country_calling_code = attributes[:'countryCallingCode'] end if attributes.has_key?(:'phoneNumber') self.phone_number = attributes[:'phoneNumber'] end if attributes.has_key?(:'numberIsVoiceOnly') self.number_is_voice_only = attributes[:'numberIsVoiceOnly'] end if attributes.has_key?(:'instructions') self.instructions = attributes[:'instructions'] end end |
Instance Attribute Details
#address1 ⇒ Object
(Conditional) Address line 1 Conditionality - Required when used with the DPA Registration operation in the Management Service APIs Required when address is used as shipping/delivery Address.
24 25 26 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 24 def address1 @address1 end |
#address2 ⇒ Object
Address line 2.
27 28 29 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 27 def address2 @address2 end |
#address3 ⇒ Object
Address line 3.
30 31 32 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 30 def address3 @address3 end |
#address_id ⇒ Object
(Conditional) Reference identifier of the address Conditionality - Required when address is already registered with VACP System. Optional for requests when address fields are provided.
18 19 20 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 18 def address_id @address_id end |
#administrative_area ⇒ Object
(Conditional) Address state Recommendation to support ISO 3166-2 format i.e. made up of ISO 3166-1 alpha 2 country code, followed by an alphanumeric string of 3 characters representing the state or sub-division Conditionality - When used with the DPA Registration operation in the Management Service APIs at least one of the following is required - both city and state - zip Required if this is a shipping address in a valid format for the country.
36 37 38 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 36 def administrative_area @administrative_area end |
#country ⇒ Object
Address country code ISO 3166-1 alpha-2 country code.
39 40 41 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 39 def country @country end |
#country_calling_code ⇒ Object
Phone number country code as defined by the International Telecommunication Union.
63 64 65 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 63 def country_calling_code @country_calling_code end |
#create_time ⇒ Object
Date and time the address was created. UTC time in Unix epoch format.
45 46 47 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 45 def create_time @create_time end |
#district ⇒ Object
Name of the business; Name of the community; c/o Name etc. Notes - Shipping Address - The final recipient’s name will be captured in deliveryContacts field. Billing Address - The Card Holder or Consumer Name will be recorded as part of Card or Order Information.
21 22 23 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 21 def district @district end |
#email ⇒ Object
Consumer-provided email address.
60 61 62 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 60 def email @email end |
#first_name ⇒ Object
First name of the recipient.
51 52 53 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 51 def first_name @first_name end |
#instructions ⇒ Object
Consumer-provided delivery instructions.
72 73 74 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 72 def instructions @instructions end |
#last_name ⇒ Object
Last name of the recipient.
57 58 59 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 57 def last_name @last_name end |
#last_used_time ⇒ Object
Date and time the address was last used. UTC time in Unix epoch format.
48 49 50 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 48 def last_used_time @last_used_time end |
#locality ⇒ Object
(Conditional) Address city Conditionality - When used with the DPA Registration operation in the Management Service APIs at least one of the following is required - both city and state - zip Required if this is a shipping address in a valid format for the country
33 34 35 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 33 def locality @locality end |
#middle_name ⇒ Object
Middle name of the recipient.
54 55 56 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 54 def middle_name @middle_name end |
#number_is_voice_only ⇒ Object
Indicates that the phone number provided is not capable of receiving text messages.
69 70 71 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 69 def number_is_voice_only @number_is_voice_only end |
#phone_number ⇒ Object
Phone number without country code.
66 67 68 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 66 def phone_number @phone_number end |
#postal_code ⇒ Object
Address zip/postal code Conditionality - When used with the DPA Registration operation in th Management Service APIs at least one of the following is required. - both city and state - zip Required if this is a shipping address in a valid format for the country and has a postal code or zip code
42 43 44 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 42 def postal_code @postal_code end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 75 def self.attribute_map { :'address_id' => :'addressId', :'district' => :'district', :'address1' => :'address1', :'address2' => :'address2', :'address3' => :'address3', :'locality' => :'locality', :'administrative_area' => :'administrativeArea', :'country' => :'country', :'postal_code' => :'postalCode', :'create_time' => :'createTime', :'last_used_time' => :'lastUsedTime', :'first_name' => :'firstName', :'middle_name' => :'middleName', :'last_name' => :'lastName', :'email' => :'email', :'country_calling_code' => :'countryCallingCode', :'phone_number' => :'phoneNumber', :'number_is_voice_only' => :'numberIsVoiceOnly', :'instructions' => :'instructions' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 100 def self.json_map { :'address_id' => :'address_id', :'district' => :'district', :'address1' => :'address1', :'address2' => :'address2', :'address3' => :'address3', :'locality' => :'locality', :'administrative_area' => :'administrative_area', :'country' => :'country', :'postal_code' => :'postal_code', :'create_time' => :'create_time', :'last_used_time' => :'last_used_time', :'first_name' => :'first_name', :'middle_name' => :'middle_name', :'last_name' => :'last_name', :'email' => :'email', :'country_calling_code' => :'country_calling_code', :'phone_number' => :'phone_number', :'number_is_voice_only' => :'number_is_voice_only', :'instructions' => :'instructions' } end |
.swagger_types ⇒ Object
Attribute type mapping.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 125 def self.swagger_types { :'address_id' => :'String', :'district' => :'String', :'address1' => :'String', :'address2' => :'String', :'address3' => :'String', :'locality' => :'String', :'administrative_area' => :'String', :'country' => :'String', :'postal_code' => :'String', :'create_time' => :'String', :'last_used_time' => :'String', :'first_name' => :'String', :'middle_name' => :'String', :'last_name' => :'String', :'email' => :'String', :'country_calling_code' => :'String', :'phone_number' => :'String', :'number_is_voice_only' => :'BOOLEAN', :'instructions' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 546 def ==(o) return true if self.equal?(o) self.class == o.class && address_id == o.address_id && district == o.district && address1 == o.address1 && address2 == o.address2 && address3 == o.address3 && locality == o.locality && administrative_area == o.administrative_area && country == o.country && postal_code == o.postal_code && create_time == o.create_time && last_used_time == o.last_used_time && first_name == o.first_name && middle_name == o.middle_name && last_name == o.last_name && email == o.email && country_calling_code == o.country_calling_code && phone_number == o.phone_number && number_is_voice_only == o.number_is_voice_only && instructions == o.instructions end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 606 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
672 673 674 675 676 677 678 679 680 681 682 683 684 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 672 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
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 585 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
572 573 574 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 572 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
578 579 580 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 578 def hash [address_id, district, address1, address2, address3, locality, administrative_area, country, postal_code, create_time, last_used_time, first_name, middle_name, last_name, email, country_calling_code, phone_number, number_is_voice_only, instructions].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 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 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 236 def list_invalid_properties invalid_properties = Array.new #if !@address_id.nil? && @address_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "address_id", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if [email protected]? && @district !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "district", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if [email protected]? && @address1 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "address1", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if [email protected]? && @address2 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "address2", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if [email protected]? && @address3 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "address3", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if [email protected]? && @locality !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "locality", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@administrative_area.nil? && @administrative_area !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "administrative_area", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end if @country.nil? invalid_properties.push('invalid value for "country", country cannot be nil.') end #if @country !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "country", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@postal_code.nil? && @postal_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "postal_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@create_time.nil? && @create_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "create_time", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@last_used_time.nil? && @last_used_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "last_used_time", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@first_name.nil? && @first_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "first_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@middle_name.nil? && @middle_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "middle_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@last_name.nil? && @last_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "last_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if [email protected]? && @email !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "email", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end if @country_calling_code.nil? invalid_properties.push('invalid value for "country_calling_code", country_calling_code cannot be nil.') end #if @country_calling_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "country_calling_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end if @phone_number.nil? invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.') end #if @phone_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "phone_number", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if [email protected]? && @instructions !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "instructions", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
652 653 654 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 652 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
658 659 660 661 662 663 664 665 666 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 658 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
646 647 648 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 646 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb', line 327 def valid? #return false if !@address_id.nil? && @address_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if [email protected]? && @district !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if [email protected]? && @address1 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if [email protected]? && @address2 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if [email protected]? && @address3 !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if [email protected]? && @locality !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@administrative_area.nil? && @administrative_area !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) return false if @country.nil? #return false if @country !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@postal_code.nil? && @postal_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@create_time.nil? && @create_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@last_used_time.nil? && @last_used_time !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@first_name.nil? && @first_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@middle_name.nil? && @middle_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@last_name.nil? && @last_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if [email protected]? && @email !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) return false if @country_calling_code.nil? #return false if @country_calling_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) return false if @phone_number.nil? #return false if @phone_number !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if [email protected]? && @instructions !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) true end |