Class: UltracartClient::OrderQuery
- Inherits:
-
Object
- Object
- UltracartClient::OrderQuery
- Defined in:
- lib/ultracart_api/models/order_query.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#cc_email ⇒ Object
CC Email.
-
#channel_partner_code ⇒ Object
The code of the channel partner.
-
#channel_partner_order_id ⇒ Object
The order ID assigned by the channel partner for this order.
-
#city ⇒ Object
City.
-
#company ⇒ Object
Company.
-
#country_code ⇒ Object
ISO-3166 two letter country code.
-
#creation_date_begin ⇒ Object
Date/time that the order was created.
-
#creation_date_end ⇒ Object
Date/time that the order was created.
-
#current_stage ⇒ Object
Current stage that the order is in.
-
#custom_field_1 ⇒ Object
Custom field 1.
-
#custom_field_10 ⇒ Object
Custom field 10.
-
#custom_field_2 ⇒ Object
Custom field 2.
-
#custom_field_3 ⇒ Object
Custom field 3.
-
#custom_field_4 ⇒ Object
Custom field 4.
-
#custom_field_5 ⇒ Object
Custom field 5.
-
#custom_field_6 ⇒ Object
Custom field 6.
-
#custom_field_7 ⇒ Object
Custom field 7.
-
#custom_field_8 ⇒ Object
Custom field 8.
-
#custom_field_9 ⇒ Object
Custom field 9.
-
#customer_profile_oid ⇒ Object
The customer profile to find associated orders for.
-
#email ⇒ Object
Email.
-
#first_name ⇒ Object
First name.
-
#item_id ⇒ Object
Item ID.
-
#last_name ⇒ Object
Last name.
-
#order_id ⇒ Object
Order ID.
-
#payment_date_begin ⇒ Object
Date/time that the order was successfully processed.
-
#payment_date_end ⇒ Object
Date/time that the order was successfully processed.
-
#payment_method ⇒ Object
Payment method.
-
#phone ⇒ Object
Phone.
-
#postal_code ⇒ Object
Postal code.
-
#purchase_order_number ⇒ Object
Purchase order number.
-
#query_target ⇒ Object
Query Target.
-
#refund_date_begin ⇒ Object
Date/time that the order was refunded.
-
#refund_date_end ⇒ Object
Date/time that the order was refunded.
-
#rma ⇒ Object
RMA number.
-
#screen_branding_theme_code ⇒ Object
Screen branding theme code associated with the order (legacy checkout).
-
#shipment_date_begin ⇒ Object
Date/time that the order was shipped.
-
#shipment_date_end ⇒ Object
Date/time that the order was shipped.
-
#shipped_on_date_begin ⇒ Object
Date/time that the order should ship on.
-
#shipped_on_date_end ⇒ Object
Date/time that the order should ship on.
-
#state_region ⇒ Object
State for United States otherwise region or province for other countries.
-
#storefront_host_name ⇒ Object
StoreFront host name associated with the order.
-
#total ⇒ Object
Total.
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 = {}) ⇒ OrderQuery
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 = {}) ⇒ OrderQuery
Initializes the object
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 426 427 428 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 |
# File 'lib/ultracart_api/models/order_query.rb', line 280 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderQuery` 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 `UltracartClient::OrderQuery`. 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?(:'cc_email') self.cc_email = attributes[:'cc_email'] end if attributes.key?(:'channel_partner_code') self.channel_partner_code = attributes[:'channel_partner_code'] end if attributes.key?(:'channel_partner_order_id') self.channel_partner_order_id = attributes[:'channel_partner_order_id'] end if attributes.key?(:'city') self.city = attributes[:'city'] end if attributes.key?(:'company') self.company = attributes[:'company'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end if attributes.key?(:'creation_date_begin') self.creation_date_begin = attributes[:'creation_date_begin'] end if attributes.key?(:'creation_date_end') self.creation_date_end = attributes[:'creation_date_end'] end if attributes.key?(:'current_stage') self.current_stage = attributes[:'current_stage'] end if attributes.key?(:'custom_field_1') self.custom_field_1 = attributes[:'custom_field_1'] end if attributes.key?(:'custom_field_10') self.custom_field_10 = attributes[:'custom_field_10'] end if attributes.key?(:'custom_field_2') self.custom_field_2 = attributes[:'custom_field_2'] end if attributes.key?(:'custom_field_3') self.custom_field_3 = attributes[:'custom_field_3'] end if attributes.key?(:'custom_field_4') self.custom_field_4 = attributes[:'custom_field_4'] end if attributes.key?(:'custom_field_5') self.custom_field_5 = attributes[:'custom_field_5'] end if attributes.key?(:'custom_field_6') self.custom_field_6 = attributes[:'custom_field_6'] end if attributes.key?(:'custom_field_7') self.custom_field_7 = attributes[:'custom_field_7'] end if attributes.key?(:'custom_field_8') self.custom_field_8 = attributes[:'custom_field_8'] end if attributes.key?(:'custom_field_9') self.custom_field_9 = attributes[:'custom_field_9'] end if attributes.key?(:'customer_profile_oid') self.customer_profile_oid = attributes[:'customer_profile_oid'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'first_name') self.first_name = attributes[:'first_name'] end if attributes.key?(:'item_id') self.item_id = attributes[:'item_id'] end if attributes.key?(:'last_name') self.last_name = attributes[:'last_name'] end if attributes.key?(:'order_id') self.order_id = attributes[:'order_id'] end if attributes.key?(:'payment_date_begin') self.payment_date_begin = attributes[:'payment_date_begin'] end if attributes.key?(:'payment_date_end') self.payment_date_end = attributes[:'payment_date_end'] end if attributes.key?(:'payment_method') self.payment_method = attributes[:'payment_method'] end if attributes.key?(:'phone') self.phone = attributes[:'phone'] end if attributes.key?(:'postal_code') self.postal_code = attributes[:'postal_code'] end if attributes.key?(:'purchase_order_number') self.purchase_order_number = attributes[:'purchase_order_number'] end if attributes.key?(:'query_target') self.query_target = attributes[:'query_target'] end if attributes.key?(:'refund_date_begin') self.refund_date_begin = attributes[:'refund_date_begin'] end if attributes.key?(:'refund_date_end') self.refund_date_end = attributes[:'refund_date_end'] end if attributes.key?(:'rma') self.rma = attributes[:'rma'] end if attributes.key?(:'screen_branding_theme_code') self.screen_branding_theme_code = attributes[:'screen_branding_theme_code'] end if attributes.key?(:'shipment_date_begin') self.shipment_date_begin = attributes[:'shipment_date_begin'] end if attributes.key?(:'shipment_date_end') self.shipment_date_end = attributes[:'shipment_date_end'] end if attributes.key?(:'shipped_on_date_begin') self.shipped_on_date_begin = attributes[:'shipped_on_date_begin'] end if attributes.key?(:'shipped_on_date_end') self.shipped_on_date_end = attributes[:'shipped_on_date_end'] end if attributes.key?(:'state_region') self.state_region = attributes[:'state_region'] end if attributes.key?(:'storefront_host_name') self.storefront_host_name = attributes[:'storefront_host_name'] end if attributes.key?(:'total') self.total = attributes[:'total'] end end |
Instance Attribute Details
#cc_email ⇒ Object
CC Email
19 20 21 |
# File 'lib/ultracart_api/models/order_query.rb', line 19 def cc_email @cc_email end |
#channel_partner_code ⇒ Object
The code of the channel partner
22 23 24 |
# File 'lib/ultracart_api/models/order_query.rb', line 22 def channel_partner_code @channel_partner_code end |
#channel_partner_order_id ⇒ Object
The order ID assigned by the channel partner for this order
25 26 27 |
# File 'lib/ultracart_api/models/order_query.rb', line 25 def channel_partner_order_id @channel_partner_order_id end |
#city ⇒ Object
City
28 29 30 |
# File 'lib/ultracart_api/models/order_query.rb', line 28 def city @city end |
#company ⇒ Object
Company
31 32 33 |
# File 'lib/ultracart_api/models/order_query.rb', line 31 def company @company end |
#country_code ⇒ Object
ISO-3166 two letter country code
34 35 36 |
# File 'lib/ultracart_api/models/order_query.rb', line 34 def country_code @country_code end |
#creation_date_begin ⇒ Object
Date/time that the order was created
37 38 39 |
# File 'lib/ultracart_api/models/order_query.rb', line 37 def creation_date_begin @creation_date_begin end |
#creation_date_end ⇒ Object
Date/time that the order was created
40 41 42 |
# File 'lib/ultracart_api/models/order_query.rb', line 40 def creation_date_end @creation_date_end end |
#current_stage ⇒ Object
Current stage that the order is in.
43 44 45 |
# File 'lib/ultracart_api/models/order_query.rb', line 43 def current_stage @current_stage end |
#custom_field_1 ⇒ Object
Custom field 1
46 47 48 |
# File 'lib/ultracart_api/models/order_query.rb', line 46 def custom_field_1 @custom_field_1 end |
#custom_field_10 ⇒ Object
Custom field 10
49 50 51 |
# File 'lib/ultracart_api/models/order_query.rb', line 49 def custom_field_10 @custom_field_10 end |
#custom_field_2 ⇒ Object
Custom field 2
52 53 54 |
# File 'lib/ultracart_api/models/order_query.rb', line 52 def custom_field_2 @custom_field_2 end |
#custom_field_3 ⇒ Object
Custom field 3
55 56 57 |
# File 'lib/ultracart_api/models/order_query.rb', line 55 def custom_field_3 @custom_field_3 end |
#custom_field_4 ⇒ Object
Custom field 4
58 59 60 |
# File 'lib/ultracart_api/models/order_query.rb', line 58 def custom_field_4 @custom_field_4 end |
#custom_field_5 ⇒ Object
Custom field 5
61 62 63 |
# File 'lib/ultracart_api/models/order_query.rb', line 61 def custom_field_5 @custom_field_5 end |
#custom_field_6 ⇒ Object
Custom field 6
64 65 66 |
# File 'lib/ultracart_api/models/order_query.rb', line 64 def custom_field_6 @custom_field_6 end |
#custom_field_7 ⇒ Object
Custom field 7
67 68 69 |
# File 'lib/ultracart_api/models/order_query.rb', line 67 def custom_field_7 @custom_field_7 end |
#custom_field_8 ⇒ Object
Custom field 8
70 71 72 |
# File 'lib/ultracart_api/models/order_query.rb', line 70 def custom_field_8 @custom_field_8 end |
#custom_field_9 ⇒ Object
Custom field 9
73 74 75 |
# File 'lib/ultracart_api/models/order_query.rb', line 73 def custom_field_9 @custom_field_9 end |
#customer_profile_oid ⇒ Object
The customer profile to find associated orders for
76 77 78 |
# File 'lib/ultracart_api/models/order_query.rb', line 76 def customer_profile_oid @customer_profile_oid end |
#email ⇒ Object
79 80 81 |
# File 'lib/ultracart_api/models/order_query.rb', line 79 def email @email end |
#first_name ⇒ Object
First name
82 83 84 |
# File 'lib/ultracart_api/models/order_query.rb', line 82 def first_name @first_name end |
#item_id ⇒ Object
Item ID
85 86 87 |
# File 'lib/ultracart_api/models/order_query.rb', line 85 def item_id @item_id end |
#last_name ⇒ Object
Last name
88 89 90 |
# File 'lib/ultracart_api/models/order_query.rb', line 88 def last_name @last_name end |
#order_id ⇒ Object
Order ID
91 92 93 |
# File 'lib/ultracart_api/models/order_query.rb', line 91 def order_id @order_id end |
#payment_date_begin ⇒ Object
Date/time that the order was successfully processed
94 95 96 |
# File 'lib/ultracart_api/models/order_query.rb', line 94 def payment_date_begin @payment_date_begin end |
#payment_date_end ⇒ Object
Date/time that the order was successfully processed
97 98 99 |
# File 'lib/ultracart_api/models/order_query.rb', line 97 def payment_date_end @payment_date_end end |
#payment_method ⇒ Object
Payment method
100 101 102 |
# File 'lib/ultracart_api/models/order_query.rb', line 100 def payment_method @payment_method end |
#phone ⇒ Object
Phone
103 104 105 |
# File 'lib/ultracart_api/models/order_query.rb', line 103 def phone @phone end |
#postal_code ⇒ Object
Postal code
106 107 108 |
# File 'lib/ultracart_api/models/order_query.rb', line 106 def postal_code @postal_code end |
#purchase_order_number ⇒ Object
Purchase order number
109 110 111 |
# File 'lib/ultracart_api/models/order_query.rb', line 109 def purchase_order_number @purchase_order_number end |
#query_target ⇒ Object
Query Target
112 113 114 |
# File 'lib/ultracart_api/models/order_query.rb', line 112 def query_target @query_target end |
#refund_date_begin ⇒ Object
Date/time that the order was refunded
115 116 117 |
# File 'lib/ultracart_api/models/order_query.rb', line 115 def refund_date_begin @refund_date_begin end |
#refund_date_end ⇒ Object
Date/time that the order was refunded
118 119 120 |
# File 'lib/ultracart_api/models/order_query.rb', line 118 def refund_date_end @refund_date_end end |
#rma ⇒ Object
RMA number
121 122 123 |
# File 'lib/ultracart_api/models/order_query.rb', line 121 def rma @rma end |
#screen_branding_theme_code ⇒ Object
Screen branding theme code associated with the order (legacy checkout)
124 125 126 |
# File 'lib/ultracart_api/models/order_query.rb', line 124 def screen_branding_theme_code @screen_branding_theme_code end |
#shipment_date_begin ⇒ Object
Date/time that the order was shipped
127 128 129 |
# File 'lib/ultracart_api/models/order_query.rb', line 127 def shipment_date_begin @shipment_date_begin end |
#shipment_date_end ⇒ Object
Date/time that the order was shipped
130 131 132 |
# File 'lib/ultracart_api/models/order_query.rb', line 130 def shipment_date_end @shipment_date_end end |
#shipped_on_date_begin ⇒ Object
Date/time that the order should ship on
133 134 135 |
# File 'lib/ultracart_api/models/order_query.rb', line 133 def shipped_on_date_begin @shipped_on_date_begin end |
#shipped_on_date_end ⇒ Object
Date/time that the order should ship on
136 137 138 |
# File 'lib/ultracart_api/models/order_query.rb', line 136 def shipped_on_date_end @shipped_on_date_end end |
#state_region ⇒ Object
State for United States otherwise region or province for other countries
139 140 141 |
# File 'lib/ultracart_api/models/order_query.rb', line 139 def state_region @state_region end |
#storefront_host_name ⇒ Object
StoreFront host name associated with the order
142 143 144 |
# File 'lib/ultracart_api/models/order_query.rb', line 142 def storefront_host_name @storefront_host_name end |
#total ⇒ Object
Total
145 146 147 |
# File 'lib/ultracart_api/models/order_query.rb', line 145 def total @total end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
219 220 221 |
# File 'lib/ultracart_api/models/order_query.rb', line 219 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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/ultracart_api/models/order_query.rb', line 170 def self.attribute_map { :'cc_email' => :'cc_email', :'channel_partner_code' => :'channel_partner_code', :'channel_partner_order_id' => :'channel_partner_order_id', :'city' => :'city', :'company' => :'company', :'country_code' => :'country_code', :'creation_date_begin' => :'creation_date_begin', :'creation_date_end' => :'creation_date_end', :'current_stage' => :'current_stage', :'custom_field_1' => :'custom_field_1', :'custom_field_10' => :'custom_field_10', :'custom_field_2' => :'custom_field_2', :'custom_field_3' => :'custom_field_3', :'custom_field_4' => :'custom_field_4', :'custom_field_5' => :'custom_field_5', :'custom_field_6' => :'custom_field_6', :'custom_field_7' => :'custom_field_7', :'custom_field_8' => :'custom_field_8', :'custom_field_9' => :'custom_field_9', :'customer_profile_oid' => :'customer_profile_oid', :'email' => :'email', :'first_name' => :'first_name', :'item_id' => :'item_id', :'last_name' => :'last_name', :'order_id' => :'order_id', :'payment_date_begin' => :'payment_date_begin', :'payment_date_end' => :'payment_date_end', :'payment_method' => :'payment_method', :'phone' => :'phone', :'postal_code' => :'postal_code', :'purchase_order_number' => :'purchase_order_number', :'query_target' => :'query_target', :'refund_date_begin' => :'refund_date_begin', :'refund_date_end' => :'refund_date_end', :'rma' => :'rma', :'screen_branding_theme_code' => :'screen_branding_theme_code', :'shipment_date_begin' => :'shipment_date_begin', :'shipment_date_end' => :'shipment_date_end', :'shipped_on_date_begin' => :'shipped_on_date_begin', :'shipped_on_date_end' => :'shipped_on_date_end', :'state_region' => :'state_region', :'storefront_host_name' => :'storefront_host_name', :'total' => :'total' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
760 761 762 |
# File 'lib/ultracart_api/models/order_query.rb', line 760 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
273 274 275 276 |
# File 'lib/ultracart_api/models/order_query.rb', line 273 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/ultracart_api/models/order_query.rb', line 224 def self.openapi_types { :'cc_email' => :'String', :'channel_partner_code' => :'String', :'channel_partner_order_id' => :'String', :'city' => :'String', :'company' => :'String', :'country_code' => :'String', :'creation_date_begin' => :'String', :'creation_date_end' => :'String', :'current_stage' => :'String', :'custom_field_1' => :'String', :'custom_field_10' => :'String', :'custom_field_2' => :'String', :'custom_field_3' => :'String', :'custom_field_4' => :'String', :'custom_field_5' => :'String', :'custom_field_6' => :'String', :'custom_field_7' => :'String', :'custom_field_8' => :'String', :'custom_field_9' => :'String', :'customer_profile_oid' => :'Integer', :'email' => :'String', :'first_name' => :'String', :'item_id' => :'String', :'last_name' => :'String', :'order_id' => :'String', :'payment_date_begin' => :'String', :'payment_date_end' => :'String', :'payment_method' => :'String', :'phone' => :'String', :'postal_code' => :'String', :'purchase_order_number' => :'String', :'query_target' => :'String', :'refund_date_begin' => :'String', :'refund_date_end' => :'String', :'rma' => :'String', :'screen_branding_theme_code' => :'String', :'shipment_date_begin' => :'String', :'shipment_date_end' => :'String', :'shipped_on_date_begin' => :'String', :'shipped_on_date_end' => :'String', :'state_region' => :'String', :'storefront_host_name' => :'String', :'total' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 |
# File 'lib/ultracart_api/models/order_query.rb', line 697 def ==(o) return true if self.equal?(o) self.class == o.class && cc_email == o.cc_email && channel_partner_code == o.channel_partner_code && channel_partner_order_id == o.channel_partner_order_id && city == o.city && company == o.company && country_code == o.country_code && creation_date_begin == o.creation_date_begin && creation_date_end == o.creation_date_end && current_stage == o.current_stage && custom_field_1 == o.custom_field_1 && custom_field_10 == o.custom_field_10 && custom_field_2 == o.custom_field_2 && custom_field_3 == o.custom_field_3 && custom_field_4 == o.custom_field_4 && custom_field_5 == o.custom_field_5 && custom_field_6 == o.custom_field_6 && custom_field_7 == o.custom_field_7 && custom_field_8 == o.custom_field_8 && custom_field_9 == o.custom_field_9 && customer_profile_oid == o.customer_profile_oid && email == o.email && first_name == o.first_name && item_id == o.item_id && last_name == o.last_name && order_id == o.order_id && payment_date_begin == o.payment_date_begin && payment_date_end == o.payment_date_end && payment_method == o.payment_method && phone == o.phone && postal_code == o.postal_code && purchase_order_number == o.purchase_order_number && query_target == o.query_target && refund_date_begin == o.refund_date_begin && refund_date_end == o.refund_date_end && rma == o.rma && screen_branding_theme_code == o.screen_branding_theme_code && shipment_date_begin == o.shipment_date_begin && shipment_date_end == o.shipment_date_end && shipped_on_date_begin == o.shipped_on_date_begin && shipped_on_date_end == o.shipped_on_date_end && state_region == o.state_region && storefront_host_name == o.storefront_host_name && total == o.total end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 |
# File 'lib/ultracart_api/models/order_query.rb', line 791 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 = UltracartClient.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
862 863 864 865 866 867 868 869 870 871 872 873 874 |
# File 'lib/ultracart_api/models/order_query.rb', line 862 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
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/ultracart_api/models/order_query.rb', line 767 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) 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
747 748 749 |
# File 'lib/ultracart_api/models/order_query.rb', line 747 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
753 754 755 |
# File 'lib/ultracart_api/models/order_query.rb', line 753 def hash [cc_email, channel_partner_code, channel_partner_order_id, city, company, country_code, creation_date_begin, creation_date_end, current_stage, custom_field_1, custom_field_10, custom_field_2, custom_field_3, custom_field_4, custom_field_5, custom_field_6, custom_field_7, custom_field_8, custom_field_9, customer_profile_oid, email, first_name, item_id, last_name, order_id, payment_date_begin, payment_date_end, payment_method, phone, postal_code, purchase_order_number, query_target, refund_date_begin, refund_date_end, rma, screen_branding_theme_code, shipment_date_begin, shipment_date_end, shipped_on_date_begin, shipped_on_date_end, state_region, storefront_host_name, total].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/ultracart_api/models/order_query.rb', line 468 def list_invalid_properties invalid_properties = Array.new if !@cc_email.nil? && @cc_email.to_s.length > 100 invalid_properties.push('invalid value for "cc_email", the character length must be smaller than or equal to 100.') end if !@city.nil? && @city.to_s.length > 32 invalid_properties.push('invalid value for "city", the character length must be smaller than or equal to 32.') end if !@company.nil? && @company.to_s.length > 50 invalid_properties.push('invalid value for "company", the character length must be smaller than or equal to 50.') end if !@country_code.nil? && @country_code.to_s.length > 2 invalid_properties.push('invalid value for "country_code", the character length must be smaller than or equal to 2.') end if !@email.nil? && @email.to_s.length > 100 invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 100.') end if !@first_name.nil? && @first_name.to_s.length > 30 invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 30.') end if !@last_name.nil? && @last_name.to_s.length > 30 invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 30.') end if !@phone.nil? && @phone.to_s.length > 25 invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 25.') end if !@postal_code.nil? && @postal_code.to_s.length > 20 invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 20.') end if !@rma.nil? && @rma.to_s.length > 30 invalid_properties.push('invalid value for "rma", the character length must be smaller than or equal to 30.') end if !@screen_branding_theme_code.nil? && @screen_branding_theme_code.to_s.length > 10 invalid_properties.push('invalid value for "screen_branding_theme_code", the character length must be smaller than or equal to 10.') end if !@state_region.nil? && @state_region.to_s.length > 32 invalid_properties.push('invalid value for "state_region", the character length must be smaller than or equal to 32.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
838 839 840 |
# File 'lib/ultracart_api/models/order_query.rb', line 838 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
844 845 846 847 848 849 850 851 852 853 854 855 856 |
# File 'lib/ultracart_api/models/order_query.rb', line 844 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
832 833 834 |
# File 'lib/ultracart_api/models/order_query.rb', line 832 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 |
# File 'lib/ultracart_api/models/order_query.rb', line 523 def valid? return false if !@cc_email.nil? && @cc_email.to_s.length > 100 return false if !@city.nil? && @city.to_s.length > 32 return false if !@company.nil? && @company.to_s.length > 50 return false if !@country_code.nil? && @country_code.to_s.length > 2 current_stage_validator = EnumAttributeValidator.new('String', ["Accounts Receivable", "Pending Clearance", "Fraud Review", "Rejected", "Shipping Department", "Completed Order", "Quote Request", "Quote Sent", "Least Cost Routing", "Unknown"]) return false unless current_stage_validator.valid?(@current_stage) return false if !@email.nil? && @email.to_s.length > 100 return false if !@first_name.nil? && @first_name.to_s.length > 30 return false if !@last_name.nil? && @last_name.to_s.length > 30 payment_method_validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eCheck", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Venmo", "Apple Pay", " Google Pay", "PayPal Fastlane"]) return false unless payment_method_validator.valid?(@payment_method) return false if !@phone.nil? && @phone.to_s.length > 25 return false if !@postal_code.nil? && @postal_code.to_s.length > 20 query_target_validator = EnumAttributeValidator.new('String', ["origin", "cache"]) return false unless query_target_validator.valid?(@query_target) return false if !@rma.nil? && @rma.to_s.length > 30 return false if !@screen_branding_theme_code.nil? && @screen_branding_theme_code.to_s.length > 10 return false if !@state_region.nil? && @state_region.to_s.length > 32 true end |