Class: UltracartClient::Order
- Inherits:
-
Object
- Object
- UltracartClient::Order
- Defined in:
- lib/ultracart_api/models/order.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#affiliates ⇒ Object
Affiliates if any were associated with the order.
-
#auto_order ⇒ Object
Returns the value of attribute auto_order.
-
#billing ⇒ Object
Returns the value of attribute billing.
-
#buysafe ⇒ Object
Returns the value of attribute buysafe.
-
#channel_partner ⇒ Object
Returns the value of attribute channel_partner.
-
#checkout ⇒ Object
Returns the value of attribute checkout.
-
#coupons ⇒ Object
Coupons.
-
#creation_dts ⇒ Object
Date/time that the order was created.
-
#currency_code ⇒ Object
Currency code that the customer used if different than the merchant’s base currency code.
-
#current_stage ⇒ Object
Current stage that the order is in.
-
#customer_profile ⇒ Object
Returns the value of attribute customer_profile.
-
#digital_order ⇒ Object
Returns the value of attribute digital_order.
-
#edi ⇒ Object
Returns the value of attribute edi.
-
#exchange_rate ⇒ Object
Exchange rate at the time the order was placed if currency code is different than the base currency.
-
#fraud_score ⇒ Object
Returns the value of attribute fraud_score.
-
#gift ⇒ Object
Returns the value of attribute gift.
-
#gift_certificate ⇒ Object
Returns the value of attribute gift_certificate.
-
#internal ⇒ Object
Returns the value of attribute internal.
-
#items ⇒ Object
Items.
-
#language_iso_code ⇒ Object
Three letter ISO-639 language code used by the customer during the checkout if different than the default language.
-
#linked_shipment ⇒ Object
Returns the value of attribute linked_shipment.
-
#marketing ⇒ Object
Returns the value of attribute marketing.
-
#merchant_id ⇒ Object
UltraCart merchant ID owning this order.
-
#order_id ⇒ Object
Order ID.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#point_of_sale ⇒ Object
Returns the value of attribute point_of_sale.
-
#properties ⇒ Object
Properties, available only through update, not through insert due to the nature of how properties are handled internally.
-
#quote ⇒ Object
Returns the value of attribute quote.
-
#refund_dts ⇒ Object
If the order was refunded, the date/time that the last refund occurred.
-
#refund_reason ⇒ Object
Refund reason code.
-
#reject_dts ⇒ Object
If the order was rejected, the date/time that the rejection occurred.
-
#reject_reason ⇒ Object
Reject reason code.
-
#salesforce ⇒ Object
Returns the value of attribute salesforce.
-
#shipping ⇒ Object
Returns the value of attribute shipping.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#tags ⇒ Object
tags, available only through update, not through insert due to the nature of how tags are handled internally.
-
#taxes ⇒ Object
Returns the value of attribute taxes.
-
#utms ⇒ Object
UTM clicks.
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 = {}) ⇒ Order
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 = {}) ⇒ Order
Initializes the object
222 223 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 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/ultracart_api/models/order.rb', line 222 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?(:'affiliates') if (value = attributes[:'affiliates']).is_a?(Array) self.affiliates = value end end if attributes.has_key?(:'auto_order') self.auto_order = attributes[:'auto_order'] end if attributes.has_key?(:'billing') self.billing = attributes[:'billing'] end if attributes.has_key?(:'buysafe') self.buysafe = attributes[:'buysafe'] end if attributes.has_key?(:'channel_partner') self.channel_partner = attributes[:'channel_partner'] end if attributes.has_key?(:'checkout') self.checkout = attributes[:'checkout'] end if attributes.has_key?(:'coupons') if (value = attributes[:'coupons']).is_a?(Array) self.coupons = value end end if attributes.has_key?(:'creation_dts') self.creation_dts = attributes[:'creation_dts'] end if attributes.has_key?(:'currency_code') self.currency_code = attributes[:'currency_code'] end if attributes.has_key?(:'current_stage') self.current_stage = attributes[:'current_stage'] end if attributes.has_key?(:'customer_profile') self.customer_profile = attributes[:'customer_profile'] end if attributes.has_key?(:'digital_order') self.digital_order = attributes[:'digital_order'] end if attributes.has_key?(:'edi') self.edi = attributes[:'edi'] end if attributes.has_key?(:'exchange_rate') self.exchange_rate = attributes[:'exchange_rate'] end if attributes.has_key?(:'fraud_score') self.fraud_score = attributes[:'fraud_score'] end if attributes.has_key?(:'gift') self.gift = attributes[:'gift'] end if attributes.has_key?(:'gift_certificate') self.gift_certificate = attributes[:'gift_certificate'] end if attributes.has_key?(:'internal') self.internal = attributes[:'internal'] end if attributes.has_key?(:'items') if (value = attributes[:'items']).is_a?(Array) self.items = value end end if attributes.has_key?(:'language_iso_code') self.language_iso_code = attributes[:'language_iso_code'] end if attributes.has_key?(:'linked_shipment') self.linked_shipment = attributes[:'linked_shipment'] end if attributes.has_key?(:'marketing') self.marketing = attributes[:'marketing'] end if attributes.has_key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.has_key?(:'order_id') self.order_id = attributes[:'order_id'] end if attributes.has_key?(:'payment') self.payment = attributes[:'payment'] end if attributes.has_key?(:'point_of_sale') self.point_of_sale = attributes[:'point_of_sale'] end if attributes.has_key?(:'properties') if (value = attributes[:'properties']).is_a?(Array) self.properties = value end end if attributes.has_key?(:'quote') self.quote = attributes[:'quote'] end if attributes.has_key?(:'refund_dts') self.refund_dts = attributes[:'refund_dts'] end if attributes.has_key?(:'refund_reason') self.refund_reason = attributes[:'refund_reason'] end if attributes.has_key?(:'reject_dts') self.reject_dts = attributes[:'reject_dts'] end if attributes.has_key?(:'reject_reason') self.reject_reason = attributes[:'reject_reason'] end if attributes.has_key?(:'salesforce') self.salesforce = attributes[:'salesforce'] end if attributes.has_key?(:'shipping') self.shipping = attributes[:'shipping'] end if attributes.has_key?(:'summary') self.summary = attributes[:'summary'] end if attributes.has_key?(:'Tags') if (value = attributes[:'Tags']).is_a?(Array) self. = value end end if attributes.has_key?(:'taxes') self.taxes = attributes[:'taxes'] end if attributes.has_key?(:'utms') if (value = attributes[:'utms']).is_a?(Array) self.utms = value end end end |
Instance Attribute Details
#affiliates ⇒ Object
Affiliates if any were associated with the order. The first one in the array sent the order and each subsequent affiliate is the recruiter that earns a downline commission.
18 19 20 |
# File 'lib/ultracart_api/models/order.rb', line 18 def affiliates @affiliates end |
#auto_order ⇒ Object
Returns the value of attribute auto_order.
20 21 22 |
# File 'lib/ultracart_api/models/order.rb', line 20 def auto_order @auto_order end |
#billing ⇒ Object
Returns the value of attribute billing.
22 23 24 |
# File 'lib/ultracart_api/models/order.rb', line 22 def billing @billing end |
#buysafe ⇒ Object
Returns the value of attribute buysafe.
24 25 26 |
# File 'lib/ultracart_api/models/order.rb', line 24 def buysafe @buysafe end |
#channel_partner ⇒ Object
Returns the value of attribute channel_partner.
26 27 28 |
# File 'lib/ultracart_api/models/order.rb', line 26 def channel_partner @channel_partner end |
#checkout ⇒ Object
Returns the value of attribute checkout.
28 29 30 |
# File 'lib/ultracart_api/models/order.rb', line 28 def checkout @checkout end |
#coupons ⇒ Object
Coupons
31 32 33 |
# File 'lib/ultracart_api/models/order.rb', line 31 def coupons @coupons end |
#creation_dts ⇒ Object
Date/time that the order was created
34 35 36 |
# File 'lib/ultracart_api/models/order.rb', line 34 def creation_dts @creation_dts end |
#currency_code ⇒ Object
Currency code that the customer used if different than the merchant’s base currency code
37 38 39 |
# File 'lib/ultracart_api/models/order.rb', line 37 def currency_code @currency_code end |
#current_stage ⇒ Object
Current stage that the order is in.
40 41 42 |
# File 'lib/ultracart_api/models/order.rb', line 40 def current_stage @current_stage end |
#customer_profile ⇒ Object
Returns the value of attribute customer_profile.
42 43 44 |
# File 'lib/ultracart_api/models/order.rb', line 42 def customer_profile @customer_profile end |
#digital_order ⇒ Object
Returns the value of attribute digital_order.
44 45 46 |
# File 'lib/ultracart_api/models/order.rb', line 44 def digital_order @digital_order end |
#edi ⇒ Object
Returns the value of attribute edi.
46 47 48 |
# File 'lib/ultracart_api/models/order.rb', line 46 def edi @edi end |
#exchange_rate ⇒ Object
Exchange rate at the time the order was placed if currency code is different than the base currency
49 50 51 |
# File 'lib/ultracart_api/models/order.rb', line 49 def exchange_rate @exchange_rate end |
#fraud_score ⇒ Object
Returns the value of attribute fraud_score.
51 52 53 |
# File 'lib/ultracart_api/models/order.rb', line 51 def fraud_score @fraud_score end |
#gift ⇒ Object
Returns the value of attribute gift.
53 54 55 |
# File 'lib/ultracart_api/models/order.rb', line 53 def gift @gift end |
#gift_certificate ⇒ Object
Returns the value of attribute gift_certificate.
55 56 57 |
# File 'lib/ultracart_api/models/order.rb', line 55 def gift_certificate @gift_certificate end |
#internal ⇒ Object
Returns the value of attribute internal.
57 58 59 |
# File 'lib/ultracart_api/models/order.rb', line 57 def internal @internal end |
#items ⇒ Object
Items
60 61 62 |
# File 'lib/ultracart_api/models/order.rb', line 60 def items @items end |
#language_iso_code ⇒ Object
Three letter ISO-639 language code used by the customer during the checkout if different than the default language
63 64 65 |
# File 'lib/ultracart_api/models/order.rb', line 63 def language_iso_code @language_iso_code end |
#linked_shipment ⇒ Object
Returns the value of attribute linked_shipment.
65 66 67 |
# File 'lib/ultracart_api/models/order.rb', line 65 def linked_shipment @linked_shipment end |
#marketing ⇒ Object
Returns the value of attribute marketing.
67 68 69 |
# File 'lib/ultracart_api/models/order.rb', line 67 def marketing @marketing end |
#merchant_id ⇒ Object
UltraCart merchant ID owning this order
70 71 72 |
# File 'lib/ultracart_api/models/order.rb', line 70 def merchant_id @merchant_id end |
#order_id ⇒ Object
Order ID
73 74 75 |
# File 'lib/ultracart_api/models/order.rb', line 73 def order_id @order_id end |
#payment ⇒ Object
Returns the value of attribute payment.
75 76 77 |
# File 'lib/ultracart_api/models/order.rb', line 75 def payment @payment end |
#point_of_sale ⇒ Object
Returns the value of attribute point_of_sale.
77 78 79 |
# File 'lib/ultracart_api/models/order.rb', line 77 def point_of_sale @point_of_sale end |
#properties ⇒ Object
Properties, available only through update, not through insert due to the nature of how properties are handled internally
80 81 82 |
# File 'lib/ultracart_api/models/order.rb', line 80 def properties @properties end |
#quote ⇒ Object
Returns the value of attribute quote.
82 83 84 |
# File 'lib/ultracart_api/models/order.rb', line 82 def quote @quote end |
#refund_dts ⇒ Object
If the order was refunded, the date/time that the last refund occurred
85 86 87 |
# File 'lib/ultracart_api/models/order.rb', line 85 def refund_dts @refund_dts end |
#refund_reason ⇒ Object
Refund reason code. This can only be written during a refund operation otherwise this field is read only.
88 89 90 |
# File 'lib/ultracart_api/models/order.rb', line 88 def refund_reason @refund_reason end |
#reject_dts ⇒ Object
If the order was rejected, the date/time that the rejection occurred
91 92 93 |
# File 'lib/ultracart_api/models/order.rb', line 91 def reject_dts @reject_dts end |
#reject_reason ⇒ Object
Reject reason code. This can only be written during a reject operation otherwise this field is read only.
94 95 96 |
# File 'lib/ultracart_api/models/order.rb', line 94 def reject_reason @reject_reason end |
#salesforce ⇒ Object
Returns the value of attribute salesforce.
96 97 98 |
# File 'lib/ultracart_api/models/order.rb', line 96 def salesforce @salesforce end |
#shipping ⇒ Object
Returns the value of attribute shipping.
98 99 100 |
# File 'lib/ultracart_api/models/order.rb', line 98 def shipping @shipping end |
#summary ⇒ Object
Returns the value of attribute summary.
100 101 102 |
# File 'lib/ultracart_api/models/order.rb', line 100 def summary @summary end |
#tags ⇒ Object
tags, available only through update, not through insert due to the nature of how tags are handled internally
103 104 105 |
# File 'lib/ultracart_api/models/order.rb', line 103 def end |
#taxes ⇒ Object
Returns the value of attribute taxes.
105 106 107 |
# File 'lib/ultracart_api/models/order.rb', line 105 def taxes @taxes end |
#utms ⇒ Object
UTM clicks. The zero index is the most recent (last) UTM click
108 109 110 |
# File 'lib/ultracart_api/models/order.rb', line 108 def utms @utms end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/ultracart_api/models/order.rb', line 133 def self.attribute_map { :'affiliates' => :'affiliates', :'auto_order' => :'auto_order', :'billing' => :'billing', :'buysafe' => :'buysafe', :'channel_partner' => :'channel_partner', :'checkout' => :'checkout', :'coupons' => :'coupons', :'creation_dts' => :'creation_dts', :'currency_code' => :'currency_code', :'current_stage' => :'current_stage', :'customer_profile' => :'customer_profile', :'digital_order' => :'digital_order', :'edi' => :'edi', :'exchange_rate' => :'exchange_rate', :'fraud_score' => :'fraud_score', :'gift' => :'gift', :'gift_certificate' => :'gift_certificate', :'internal' => :'internal', :'items' => :'items', :'language_iso_code' => :'language_iso_code', :'linked_shipment' => :'linked_shipment', :'marketing' => :'marketing', :'merchant_id' => :'merchant_id', :'order_id' => :'order_id', :'payment' => :'payment', :'point_of_sale' => :'point_of_sale', :'properties' => :'properties', :'quote' => :'quote', :'refund_dts' => :'refund_dts', :'refund_reason' => :'refund_reason', :'reject_dts' => :'reject_dts', :'reject_reason' => :'reject_reason', :'salesforce' => :'salesforce', :'shipping' => :'shipping', :'summary' => :'summary', :'tags' => :'Tags', :'taxes' => :'taxes', :'utms' => :'utms' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ultracart_api/models/order.rb', line 177 def self.swagger_types { :'affiliates' => :'Array<OrderAffiliate>', :'auto_order' => :'OrderAutoOrder', :'billing' => :'OrderBilling', :'buysafe' => :'OrderBuysafe', :'channel_partner' => :'OrderChannelPartner', :'checkout' => :'OrderCheckout', :'coupons' => :'Array<OrderCoupon>', :'creation_dts' => :'String', :'currency_code' => :'String', :'current_stage' => :'String', :'customer_profile' => :'Customer', :'digital_order' => :'OrderDigitalOrder', :'edi' => :'OrderEdi', :'exchange_rate' => :'Float', :'fraud_score' => :'OrderFraudScore', :'gift' => :'OrderGift', :'gift_certificate' => :'OrderGiftCertificate', :'internal' => :'OrderInternal', :'items' => :'Array<OrderItem>', :'language_iso_code' => :'String', :'linked_shipment' => :'OrderLinkedShipment', :'marketing' => :'OrderMarketing', :'merchant_id' => :'String', :'order_id' => :'String', :'payment' => :'OrderPayment', :'point_of_sale' => :'OrderPointOfSale', :'properties' => :'Array<OrderProperty>', :'quote' => :'OrderQuote', :'refund_dts' => :'String', :'refund_reason' => :'String', :'reject_dts' => :'String', :'reject_reason' => :'String', :'salesforce' => :'OrderSalesforce', :'shipping' => :'OrderShipping', :'summary' => :'OrderSummary', :'tags' => :'Array<OrderTag>', :'taxes' => :'OrderTaxes', :'utms' => :'Array<OrderUtm>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/ultracart_api/models/order.rb', line 450 def ==(o) return true if self.equal?(o) self.class == o.class && affiliates == o.affiliates && auto_order == o.auto_order && billing == o.billing && buysafe == o.buysafe && channel_partner == o.channel_partner && checkout == o.checkout && coupons == o.coupons && creation_dts == o.creation_dts && currency_code == o.currency_code && current_stage == o.current_stage && customer_profile == o.customer_profile && digital_order == o.digital_order && edi == o.edi && exchange_rate == o.exchange_rate && fraud_score == o.fraud_score && gift == o.gift && gift_certificate == o.gift_certificate && internal == o.internal && items == o.items && language_iso_code == o.language_iso_code && linked_shipment == o.linked_shipment && marketing == o.marketing && merchant_id == o.merchant_id && order_id == o.order_id && payment == o.payment && point_of_sale == o.point_of_sale && properties == o.properties && quote == o.quote && refund_dts == o.refund_dts && refund_reason == o.refund_reason && reject_dts == o.reject_dts && reject_reason == o.reject_reason && salesforce == o.salesforce && shipping == o.shipping && summary == o.summary && == o. && taxes == o.taxes && utms == o.utms end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/ultracart_api/models/order.rb', line 529 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 = UltracartClient.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
595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/ultracart_api/models/order.rb', line 595 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
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/ultracart_api/models/order.rb', line 508 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 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
495 496 497 |
# File 'lib/ultracart_api/models/order.rb', line 495 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
501 502 503 |
# File 'lib/ultracart_api/models/order.rb', line 501 def hash [affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, refund_reason, reject_dts, reject_reason, salesforce, shipping, summary, , taxes, utms].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/ultracart_api/models/order.rb', line 395 def list_invalid_properties invalid_properties = Array.new if !@currency_code.nil? && @currency_code.to_s.length > 3 invalid_properties.push('invalid value for "currency_code", the character length must be smaller than or equal to 3.') end if !@language_iso_code.nil? && @language_iso_code.to_s.length > 3 invalid_properties.push('invalid value for "language_iso_code", the character length must be smaller than or equal to 3.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
575 576 577 |
# File 'lib/ultracart_api/models/order.rb', line 575 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
581 582 583 584 585 586 587 588 589 |
# File 'lib/ultracart_api/models/order.rb', line 581 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
569 570 571 |
# File 'lib/ultracart_api/models/order.rb', line 569 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
410 411 412 413 414 415 416 |
# File 'lib/ultracart_api/models/order.rb', line 410 def valid? return false if !@currency_code.nil? && @currency_code.to_s.length > 3 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', 'Pre-ordered', 'Advanced Order Routing', 'Hold']) return false unless current_stage_validator.valid?(@current_stage) return false if !@language_iso_code.nil? && @language_iso_code.to_s.length > 3 true end |