Class: UltracartClient::Item
- Inherits:
-
Object
- Object
- UltracartClient::Item
- Defined in:
- lib/ultracart_api/models/item.rb
Instance Attribute Summary collapse
-
#accounting ⇒ Object
Returns the value of attribute accounting.
-
#amember ⇒ Object
Returns the value of attribute amember.
-
#auto_order ⇒ Object
Returns the value of attribute auto_order.
-
#ccbill ⇒ Object
Returns the value of attribute ccbill.
-
#channel_partner_item_mappings ⇒ Object
Channel Partner Item Mapping.
-
#chargeback ⇒ Object
Returns the value of attribute chargeback.
-
#checkout ⇒ Object
Returns the value of attribute checkout.
-
#content ⇒ Object
Returns the value of attribute content.
-
#creation_dts ⇒ Object
Date/time of creation.
-
#description ⇒ Object
Description of the item up to 500 characters.
-
#description_translated_text_instance_oid ⇒ Object
Description translated text instance id.
-
#digital_delivery ⇒ Object
Returns the value of attribute digital_delivery.
-
#ebay ⇒ Object
Returns the value of attribute ebay.
-
#email_notifications ⇒ Object
Returns the value of attribute email_notifications.
-
#enrollment123 ⇒ Object
Returns the value of attribute enrollment123.
-
#fulfillment_addons ⇒ Object
Fulfillment Add-ons.
-
#gift_certificate ⇒ Object
Returns the value of attribute gift_certificate.
-
#google_product_search ⇒ Object
Returns the value of attribute google_product_search.
-
#identifiers ⇒ Object
Returns the value of attribute identifiers.
-
#inactive ⇒ Object
True if this item is inactive and can not be purchased.
-
#instant_payment_notifications ⇒ Object
Returns the value of attribute instant_payment_notifications.
-
#internal ⇒ Object
Returns the value of attribute internal.
-
#kit ⇒ Object
True if this item is a kit.
-
#kit_component_only ⇒ Object
True if this item can only be usd as a kit component.
-
#kit_definition ⇒ Object
Returns the value of attribute kit_definition.
-
#last_modified_dts ⇒ Object
Date/time of last modification.
-
#merchant_id ⇒ Object
UltraCart merchant ID owning item.
-
#merchant_item_id ⇒ Object
Unique item id assigned to this item.
-
#merchant_item_oid ⇒ Object
Unique object identifier for this item.
-
#options ⇒ Object
Options.
-
#parent_category_id ⇒ Object
Parent category of the item.
-
#parent_category_path ⇒ Object
Parent category path.
-
#payment_processing ⇒ Object
Returns the value of attribute payment_processing.
-
#physical ⇒ Object
Returns the value of attribute physical.
-
#pricing ⇒ Object
Returns the value of attribute pricing.
-
#properties ⇒ Object
Properties.
-
#realtime_pricing ⇒ Object
Returns the value of attribute realtime_pricing.
-
#recommend_replenishment_days ⇒ Object
Number of days to recommend replenishment after.
-
#related ⇒ Object
Returns the value of attribute related.
-
#reporting ⇒ Object
Returns the value of attribute reporting.
-
#restriction ⇒ Object
Returns the value of attribute restriction.
-
#revguard ⇒ Object
Returns the value of attribute revguard.
-
#reviews ⇒ Object
Returns the value of attribute reviews.
-
#salesforce ⇒ Object
Returns the value of attribute salesforce.
-
#shipping ⇒ Object
Returns the value of attribute shipping.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#tax ⇒ Object
Returns the value of attribute tax.
-
#third_party_email_marketing ⇒ Object
3rd Party Email Marketing.
-
#variant_items ⇒ Object
Variant Items.
-
#variations ⇒ Object
Variations.
-
#wishlist_member ⇒ Object
Returns the value of attribute wishlist_member.
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 = {}) ⇒ Item
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 = {}) ⇒ Item
Initializes the object
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 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 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/ultracart_api/models/item.rb', line 255 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?(:'accounting') self.accounting = attributes[:'accounting'] end if attributes.has_key?(:'amember') self.amember = attributes[:'amember'] end if attributes.has_key?(:'auto_order') self.auto_order = attributes[:'auto_order'] end if attributes.has_key?(:'ccbill') self.ccbill = attributes[:'ccbill'] end if attributes.has_key?(:'channel_partner_item_mappings') if (value = attributes[:'channel_partner_item_mappings']).is_a?(Array) self.channel_partner_item_mappings = value end end if attributes.has_key?(:'chargeback') self.chargeback = attributes[:'chargeback'] end if attributes.has_key?(:'checkout') self.checkout = attributes[:'checkout'] end if attributes.has_key?(:'content') self.content = attributes[:'content'] end if attributes.has_key?(:'creation_dts') self.creation_dts = attributes[:'creation_dts'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'description_translated_text_instance_oid') self.description_translated_text_instance_oid = attributes[:'description_translated_text_instance_oid'] end if attributes.has_key?(:'digital_delivery') self.digital_delivery = attributes[:'digital_delivery'] end if attributes.has_key?(:'ebay') self.ebay = attributes[:'ebay'] end if attributes.has_key?(:'email_notifications') self.email_notifications = attributes[:'email_notifications'] end if attributes.has_key?(:'enrollment123') self.enrollment123 = attributes[:'enrollment123'] end if attributes.has_key?(:'fulfillment_addons') if (value = attributes[:'fulfillment_addons']).is_a?(Array) self.fulfillment_addons = value end end if attributes.has_key?(:'gift_certificate') self.gift_certificate = attributes[:'gift_certificate'] end if attributes.has_key?(:'google_product_search') self.google_product_search = attributes[:'google_product_search'] end if attributes.has_key?(:'identifiers') self.identifiers = attributes[:'identifiers'] end if attributes.has_key?(:'inactive') self.inactive = attributes[:'inactive'] end if attributes.has_key?(:'instant_payment_notifications') self.instant_payment_notifications = attributes[:'instant_payment_notifications'] end if attributes.has_key?(:'internal') self.internal = attributes[:'internal'] end if attributes.has_key?(:'kit') self.kit = attributes[:'kit'] end if attributes.has_key?(:'kit_component_only') self.kit_component_only = attributes[:'kit_component_only'] end if attributes.has_key?(:'kit_definition') self.kit_definition = attributes[:'kit_definition'] end if attributes.has_key?(:'last_modified_dts') self.last_modified_dts = attributes[:'last_modified_dts'] end if attributes.has_key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.has_key?(:'merchant_item_id') self.merchant_item_id = attributes[:'merchant_item_id'] end if attributes.has_key?(:'merchant_item_oid') self.merchant_item_oid = attributes[:'merchant_item_oid'] end if attributes.has_key?(:'options') if (value = attributes[:'options']).is_a?(Array) self. = value end end if attributes.has_key?(:'parent_category_id') self.parent_category_id = attributes[:'parent_category_id'] end if attributes.has_key?(:'parent_category_path') self.parent_category_path = attributes[:'parent_category_path'] end if attributes.has_key?(:'payment_processing') self.payment_processing = attributes[:'payment_processing'] end if attributes.has_key?(:'physical') self.physical = attributes[:'physical'] end if attributes.has_key?(:'pricing') self.pricing = attributes[:'pricing'] end if attributes.has_key?(:'properties') if (value = attributes[:'properties']).is_a?(Array) self.properties = value end end if attributes.has_key?(:'realtime_pricing') self.realtime_pricing = attributes[:'realtime_pricing'] end if attributes.has_key?(:'recommend_replenishment_days') self.recommend_replenishment_days = attributes[:'recommend_replenishment_days'] end if attributes.has_key?(:'related') self. = attributes[:'related'] end if attributes.has_key?(:'reporting') self.reporting = attributes[:'reporting'] end if attributes.has_key?(:'restriction') self.restriction = attributes[:'restriction'] end if attributes.has_key?(:'revguard') self.revguard = attributes[:'revguard'] end if attributes.has_key?(:'reviews') self.reviews = attributes[:'reviews'] 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?(:'tags') self. = attributes[:'tags'] end if attributes.has_key?(:'tax') self.tax = attributes[:'tax'] end if attributes.has_key?(:'third_party_email_marketing') if (value = attributes[:'third_party_email_marketing']).is_a?(Array) self.third_party_email_marketing = value end end if attributes.has_key?(:'variant_items') if (value = attributes[:'variant_items']).is_a?(Array) self.variant_items = value end end if attributes.has_key?(:'variations') if (value = attributes[:'variations']).is_a?(Array) self.variations = value end end if attributes.has_key?(:'wishlist_member') self.wishlist_member = attributes[:'wishlist_member'] end end |
Instance Attribute Details
#accounting ⇒ Object
Returns the value of attribute accounting.
17 18 19 |
# File 'lib/ultracart_api/models/item.rb', line 17 def accounting @accounting end |
#amember ⇒ Object
Returns the value of attribute amember.
19 20 21 |
# File 'lib/ultracart_api/models/item.rb', line 19 def amember @amember end |
#auto_order ⇒ Object
Returns the value of attribute auto_order.
21 22 23 |
# File 'lib/ultracart_api/models/item.rb', line 21 def auto_order @auto_order end |
#ccbill ⇒ Object
Returns the value of attribute ccbill.
23 24 25 |
# File 'lib/ultracart_api/models/item.rb', line 23 def ccbill @ccbill end |
#channel_partner_item_mappings ⇒ Object
Channel Partner Item Mapping
26 27 28 |
# File 'lib/ultracart_api/models/item.rb', line 26 def channel_partner_item_mappings @channel_partner_item_mappings end |
#chargeback ⇒ Object
Returns the value of attribute chargeback.
28 29 30 |
# File 'lib/ultracart_api/models/item.rb', line 28 def chargeback @chargeback end |
#checkout ⇒ Object
Returns the value of attribute checkout.
30 31 32 |
# File 'lib/ultracart_api/models/item.rb', line 30 def checkout @checkout end |
#content ⇒ Object
Returns the value of attribute content.
32 33 34 |
# File 'lib/ultracart_api/models/item.rb', line 32 def content @content end |
#creation_dts ⇒ Object
Date/time of creation
35 36 37 |
# File 'lib/ultracart_api/models/item.rb', line 35 def creation_dts @creation_dts end |
#description ⇒ Object
Description of the item up to 500 characters.
38 39 40 |
# File 'lib/ultracart_api/models/item.rb', line 38 def description @description end |
#description_translated_text_instance_oid ⇒ Object
Description translated text instance id
41 42 43 |
# File 'lib/ultracart_api/models/item.rb', line 41 def description_translated_text_instance_oid @description_translated_text_instance_oid end |
#digital_delivery ⇒ Object
Returns the value of attribute digital_delivery.
43 44 45 |
# File 'lib/ultracart_api/models/item.rb', line 43 def digital_delivery @digital_delivery end |
#ebay ⇒ Object
Returns the value of attribute ebay.
45 46 47 |
# File 'lib/ultracart_api/models/item.rb', line 45 def ebay @ebay end |
#email_notifications ⇒ Object
Returns the value of attribute email_notifications.
47 48 49 |
# File 'lib/ultracart_api/models/item.rb', line 47 def email_notifications @email_notifications end |
#enrollment123 ⇒ Object
Returns the value of attribute enrollment123.
49 50 51 |
# File 'lib/ultracart_api/models/item.rb', line 49 def enrollment123 @enrollment123 end |
#fulfillment_addons ⇒ Object
Fulfillment Add-ons
52 53 54 |
# File 'lib/ultracart_api/models/item.rb', line 52 def fulfillment_addons @fulfillment_addons end |
#gift_certificate ⇒ Object
Returns the value of attribute gift_certificate.
54 55 56 |
# File 'lib/ultracart_api/models/item.rb', line 54 def gift_certificate @gift_certificate end |
#google_product_search ⇒ Object
Returns the value of attribute google_product_search.
56 57 58 |
# File 'lib/ultracart_api/models/item.rb', line 56 def google_product_search @google_product_search end |
#identifiers ⇒ Object
Returns the value of attribute identifiers.
58 59 60 |
# File 'lib/ultracart_api/models/item.rb', line 58 def identifiers @identifiers end |
#inactive ⇒ Object
True if this item is inactive and can not be purchased
61 62 63 |
# File 'lib/ultracart_api/models/item.rb', line 61 def inactive @inactive end |
#instant_payment_notifications ⇒ Object
Returns the value of attribute instant_payment_notifications.
63 64 65 |
# File 'lib/ultracart_api/models/item.rb', line 63 def instant_payment_notifications @instant_payment_notifications end |
#internal ⇒ Object
Returns the value of attribute internal.
65 66 67 |
# File 'lib/ultracart_api/models/item.rb', line 65 def internal @internal end |
#kit ⇒ Object
True if this item is a kit
68 69 70 |
# File 'lib/ultracart_api/models/item.rb', line 68 def kit @kit end |
#kit_component_only ⇒ Object
True if this item can only be usd as a kit component
71 72 73 |
# File 'lib/ultracart_api/models/item.rb', line 71 def kit_component_only @kit_component_only end |
#kit_definition ⇒ Object
Returns the value of attribute kit_definition.
73 74 75 |
# File 'lib/ultracart_api/models/item.rb', line 73 def kit_definition @kit_definition end |
#last_modified_dts ⇒ Object
Date/time of last modification
76 77 78 |
# File 'lib/ultracart_api/models/item.rb', line 76 def last_modified_dts @last_modified_dts end |
#merchant_id ⇒ Object
UltraCart merchant ID owning item
79 80 81 |
# File 'lib/ultracart_api/models/item.rb', line 79 def merchant_id @merchant_id end |
#merchant_item_id ⇒ Object
Unique item id assigned to this item
82 83 84 |
# File 'lib/ultracart_api/models/item.rb', line 82 def merchant_item_id @merchant_item_id end |
#merchant_item_oid ⇒ Object
Unique object identifier for this item
85 86 87 |
# File 'lib/ultracart_api/models/item.rb', line 85 def merchant_item_oid @merchant_item_oid end |
#options ⇒ Object
Options
88 89 90 |
# File 'lib/ultracart_api/models/item.rb', line 88 def @options end |
#parent_category_id ⇒ Object
Parent category of the item. Zero indicates the root folder.
91 92 93 |
# File 'lib/ultracart_api/models/item.rb', line 91 def parent_category_id @parent_category_id end |
#parent_category_path ⇒ Object
Parent category path. / indicates the root folder.
94 95 96 |
# File 'lib/ultracart_api/models/item.rb', line 94 def parent_category_path @parent_category_path end |
#payment_processing ⇒ Object
Returns the value of attribute payment_processing.
96 97 98 |
# File 'lib/ultracart_api/models/item.rb', line 96 def payment_processing @payment_processing end |
#physical ⇒ Object
Returns the value of attribute physical.
98 99 100 |
# File 'lib/ultracart_api/models/item.rb', line 98 def physical @physical end |
#pricing ⇒ Object
Returns the value of attribute pricing.
100 101 102 |
# File 'lib/ultracart_api/models/item.rb', line 100 def pricing @pricing end |
#properties ⇒ Object
Properties
103 104 105 |
# File 'lib/ultracart_api/models/item.rb', line 103 def properties @properties end |
#realtime_pricing ⇒ Object
Returns the value of attribute realtime_pricing.
105 106 107 |
# File 'lib/ultracart_api/models/item.rb', line 105 def realtime_pricing @realtime_pricing end |
#recommend_replenishment_days ⇒ Object
Number of days to recommend replenishment after. Null is not configured. Set to zero to disable.
108 109 110 |
# File 'lib/ultracart_api/models/item.rb', line 108 def recommend_replenishment_days @recommend_replenishment_days end |
#related ⇒ Object
Returns the value of attribute related.
110 111 112 |
# File 'lib/ultracart_api/models/item.rb', line 110 def @related end |
#reporting ⇒ Object
Returns the value of attribute reporting.
112 113 114 |
# File 'lib/ultracart_api/models/item.rb', line 112 def reporting @reporting end |
#restriction ⇒ Object
Returns the value of attribute restriction.
114 115 116 |
# File 'lib/ultracart_api/models/item.rb', line 114 def restriction @restriction end |
#revguard ⇒ Object
Returns the value of attribute revguard.
116 117 118 |
# File 'lib/ultracart_api/models/item.rb', line 116 def revguard @revguard end |
#reviews ⇒ Object
Returns the value of attribute reviews.
118 119 120 |
# File 'lib/ultracart_api/models/item.rb', line 118 def reviews @reviews end |
#salesforce ⇒ Object
Returns the value of attribute salesforce.
120 121 122 |
# File 'lib/ultracart_api/models/item.rb', line 120 def salesforce @salesforce end |
#shipping ⇒ Object
Returns the value of attribute shipping.
122 123 124 |
# File 'lib/ultracart_api/models/item.rb', line 122 def shipping @shipping end |
#tags ⇒ Object
Returns the value of attribute tags.
124 125 126 |
# File 'lib/ultracart_api/models/item.rb', line 124 def @tags end |
#tax ⇒ Object
Returns the value of attribute tax.
126 127 128 |
# File 'lib/ultracart_api/models/item.rb', line 126 def tax @tax end |
#third_party_email_marketing ⇒ Object
3rd Party Email Marketing
129 130 131 |
# File 'lib/ultracart_api/models/item.rb', line 129 def third_party_email_marketing @third_party_email_marketing end |
#variant_items ⇒ Object
Variant Items
132 133 134 |
# File 'lib/ultracart_api/models/item.rb', line 132 def variant_items @variant_items end |
#variations ⇒ Object
Variations
135 136 137 |
# File 'lib/ultracart_api/models/item.rb', line 135 def variations @variations end |
#wishlist_member ⇒ Object
Returns the value of attribute wishlist_member.
137 138 139 |
# File 'lib/ultracart_api/models/item.rb', line 137 def wishlist_member @wishlist_member end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/ultracart_api/models/item.rb', line 140 def self.attribute_map { :'accounting' => :'accounting', :'amember' => :'amember', :'auto_order' => :'auto_order', :'ccbill' => :'ccbill', :'channel_partner_item_mappings' => :'channel_partner_item_mappings', :'chargeback' => :'chargeback', :'checkout' => :'checkout', :'content' => :'content', :'creation_dts' => :'creation_dts', :'description' => :'description', :'description_translated_text_instance_oid' => :'description_translated_text_instance_oid', :'digital_delivery' => :'digital_delivery', :'ebay' => :'ebay', :'email_notifications' => :'email_notifications', :'enrollment123' => :'enrollment123', :'fulfillment_addons' => :'fulfillment_addons', :'gift_certificate' => :'gift_certificate', :'google_product_search' => :'google_product_search', :'identifiers' => :'identifiers', :'inactive' => :'inactive', :'instant_payment_notifications' => :'instant_payment_notifications', :'internal' => :'internal', :'kit' => :'kit', :'kit_component_only' => :'kit_component_only', :'kit_definition' => :'kit_definition', :'last_modified_dts' => :'last_modified_dts', :'merchant_id' => :'merchant_id', :'merchant_item_id' => :'merchant_item_id', :'merchant_item_oid' => :'merchant_item_oid', :'options' => :'options', :'parent_category_id' => :'parent_category_id', :'parent_category_path' => :'parent_category_path', :'payment_processing' => :'payment_processing', :'physical' => :'physical', :'pricing' => :'pricing', :'properties' => :'properties', :'realtime_pricing' => :'realtime_pricing', :'recommend_replenishment_days' => :'recommend_replenishment_days', :'related' => :'related', :'reporting' => :'reporting', :'restriction' => :'restriction', :'revguard' => :'revguard', :'reviews' => :'reviews', :'salesforce' => :'salesforce', :'shipping' => :'shipping', :'tags' => :'tags', :'tax' => :'tax', :'third_party_email_marketing' => :'third_party_email_marketing', :'variant_items' => :'variant_items', :'variations' => :'variations', :'wishlist_member' => :'wishlist_member' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/ultracart_api/models/item.rb', line 197 def self.swagger_types { :'accounting' => :'ItemAccounting', :'amember' => :'ItemAmember', :'auto_order' => :'ItemAutoOrder', :'ccbill' => :'ItemCCBill', :'channel_partner_item_mappings' => :'Array<ItemChannelPartnerMapping>', :'chargeback' => :'ItemChargeback', :'checkout' => :'ItemCheckout', :'content' => :'ItemContent', :'creation_dts' => :'String', :'description' => :'String', :'description_translated_text_instance_oid' => :'Integer', :'digital_delivery' => :'ItemDigitalDelivery', :'ebay' => :'ItemEbay', :'email_notifications' => :'ItemEmailNotifications', :'enrollment123' => :'ItemEnrollment123', :'fulfillment_addons' => :'Array<ItemFulfillmentAddon>', :'gift_certificate' => :'ItemGiftCertificate', :'google_product_search' => :'ItemGoogleProductSearch', :'identifiers' => :'ItemIdentifiers', :'inactive' => :'BOOLEAN', :'instant_payment_notifications' => :'ItemInstantPaymentNotifications', :'internal' => :'ItemInternal', :'kit' => :'BOOLEAN', :'kit_component_only' => :'BOOLEAN', :'kit_definition' => :'ItemKitDefinition', :'last_modified_dts' => :'String', :'merchant_id' => :'String', :'merchant_item_id' => :'String', :'merchant_item_oid' => :'Integer', :'options' => :'Array<ItemOption>', :'parent_category_id' => :'Integer', :'parent_category_path' => :'String', :'payment_processing' => :'ItemPaymentProcessing', :'physical' => :'ItemPhysical', :'pricing' => :'ItemPricing', :'properties' => :'Array<ItemProperty>', :'realtime_pricing' => :'ItemRealtimePricing', :'recommend_replenishment_days' => :'Integer', :'related' => :'ItemRelated', :'reporting' => :'ItemReporting', :'restriction' => :'ItemRestriction', :'revguard' => :'ItemRevguard', :'reviews' => :'ItemReviews', :'salesforce' => :'ItemSalesforce', :'shipping' => :'ItemShipping', :'tags' => :'ItemTags', :'tax' => :'ItemTax', :'third_party_email_marketing' => :'Array<ItemThirdPartyEmailMarketing>', :'variant_items' => :'Array<ItemVariantItem>', :'variations' => :'Array<ItemVariation>', :'wishlist_member' => :'ItemWishlistMember' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'lib/ultracart_api/models/item.rb', line 540 def ==(o) return true if self.equal?(o) self.class == o.class && accounting == o.accounting && amember == o.amember && auto_order == o.auto_order && ccbill == o.ccbill && channel_partner_item_mappings == o.channel_partner_item_mappings && chargeback == o.chargeback && checkout == o.checkout && content == o.content && creation_dts == o.creation_dts && description == o.description && description_translated_text_instance_oid == o.description_translated_text_instance_oid && digital_delivery == o.digital_delivery && ebay == o.ebay && email_notifications == o.email_notifications && enrollment123 == o.enrollment123 && fulfillment_addons == o.fulfillment_addons && gift_certificate == o.gift_certificate && google_product_search == o.google_product_search && identifiers == o.identifiers && inactive == o.inactive && instant_payment_notifications == o.instant_payment_notifications && internal == o.internal && kit == o.kit && kit_component_only == o.kit_component_only && kit_definition == o.kit_definition && last_modified_dts == o.last_modified_dts && merchant_id == o.merchant_id && merchant_item_id == o.merchant_item_id && merchant_item_oid == o.merchant_item_oid && == o. && parent_category_id == o.parent_category_id && parent_category_path == o.parent_category_path && payment_processing == o.payment_processing && physical == o.physical && pricing == o.pricing && properties == o.properties && realtime_pricing == o.realtime_pricing && recommend_replenishment_days == o.recommend_replenishment_days && == o. && reporting == o.reporting && restriction == o.restriction && revguard == o.revguard && reviews == o.reviews && salesforce == o.salesforce && shipping == o.shipping && == o. && tax == o.tax && third_party_email_marketing == o.third_party_email_marketing && variant_items == o.variant_items && variations == o.variations && wishlist_member == o.wishlist_member end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'lib/ultracart_api/models/item.rb', line 632 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
698 699 700 701 702 703 704 705 706 707 708 709 710 |
# File 'lib/ultracart_api/models/item.rb', line 698 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
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 |
# File 'lib/ultracart_api/models/item.rb', line 611 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
598 599 600 |
# File 'lib/ultracart_api/models/item.rb', line 598 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
604 605 606 |
# File 'lib/ultracart_api/models/item.rb', line 604 def hash [accounting, amember, auto_order, ccbill, channel_partner_item_mappings, chargeback, checkout, content, creation_dts, description, description_translated_text_instance_oid, digital_delivery, ebay, email_notifications, enrollment123, fulfillment_addons, gift_certificate, google_product_search, identifiers, inactive, instant_payment_notifications, internal, kit, kit_component_only, kit_definition, last_modified_dts, merchant_id, merchant_item_id, merchant_item_oid, , parent_category_id, parent_category_path, payment_processing, physical, pricing, properties, realtime_pricing, recommend_replenishment_days, , reporting, restriction, revguard, reviews, salesforce, shipping, , tax, third_party_email_marketing, variant_items, variations, wishlist_member].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/ultracart_api/models/item.rb', line 482 def list_invalid_properties invalid_properties = Array.new if !@description.nil? && @description.to_s.length > 512 invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 512.') end if !@merchant_id.nil? && @merchant_id.to_s.length > 5 invalid_properties.push('invalid value for "merchant_id", the character length must be smaller than or equal to 5.') end if !@merchant_item_id.nil? && @merchant_item_id.to_s.length > 20 invalid_properties.push('invalid value for "merchant_item_id", the character length must be smaller than or equal to 20.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
678 679 680 |
# File 'lib/ultracart_api/models/item.rb', line 678 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
684 685 686 687 688 689 690 691 692 |
# File 'lib/ultracart_api/models/item.rb', line 684 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
672 673 674 |
# File 'lib/ultracart_api/models/item.rb', line 672 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
501 502 503 504 505 506 |
# File 'lib/ultracart_api/models/item.rb', line 501 def valid? return false if !@description.nil? && @description.to_s.length > 512 return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5 return false if !@merchant_item_id.nil? && @merchant_item_id.to_s.length > 20 true end |