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
-
.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 = {}) ⇒ 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
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 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/ultracart_api/models/item.rb', line 267 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::Item` 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::Item`. 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?(:'accounting') self.accounting = attributes[:'accounting'] end if attributes.key?(:'amember') self.amember = attributes[:'amember'] end if attributes.key?(:'auto_order') self.auto_order = attributes[:'auto_order'] end if attributes.key?(:'ccbill') self.ccbill = attributes[:'ccbill'] end if attributes.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.key?(:'chargeback') self.chargeback = attributes[:'chargeback'] end if attributes.key?(:'checkout') self.checkout = attributes[:'checkout'] end if attributes.key?(:'content') self.content = attributes[:'content'] end if attributes.key?(:'creation_dts') self.creation_dts = attributes[:'creation_dts'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'description_translated_text_instance_oid') self.description_translated_text_instance_oid = attributes[:'description_translated_text_instance_oid'] end if attributes.key?(:'digital_delivery') self.digital_delivery = attributes[:'digital_delivery'] end if attributes.key?(:'ebay') self.ebay = attributes[:'ebay'] end if attributes.key?(:'email_notifications') self.email_notifications = attributes[:'email_notifications'] end if attributes.key?(:'enrollment123') self.enrollment123 = attributes[:'enrollment123'] end if attributes.key?(:'fulfillment_addons') if (value = attributes[:'fulfillment_addons']).is_a?(Array) self.fulfillment_addons = value end end if attributes.key?(:'gift_certificate') self.gift_certificate = attributes[:'gift_certificate'] end if attributes.key?(:'google_product_search') self.google_product_search = attributes[:'google_product_search'] end if attributes.key?(:'identifiers') self.identifiers = attributes[:'identifiers'] end if attributes.key?(:'inactive') self.inactive = attributes[:'inactive'] end if attributes.key?(:'instant_payment_notifications') self.instant_payment_notifications = attributes[:'instant_payment_notifications'] end if attributes.key?(:'internal') self.internal = attributes[:'internal'] end if attributes.key?(:'kit') self.kit = attributes[:'kit'] end if attributes.key?(:'kit_component_only') self.kit_component_only = attributes[:'kit_component_only'] end if attributes.key?(:'kit_definition') self.kit_definition = attributes[:'kit_definition'] end if attributes.key?(:'last_modified_dts') self.last_modified_dts = attributes[:'last_modified_dts'] end if attributes.key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.key?(:'merchant_item_id') self.merchant_item_id = attributes[:'merchant_item_id'] end if attributes.key?(:'merchant_item_oid') self.merchant_item_oid = attributes[:'merchant_item_oid'] end if attributes.key?(:'options') if (value = attributes[:'options']).is_a?(Array) self. = value end end if attributes.key?(:'parent_category_id') self.parent_category_id = attributes[:'parent_category_id'] end if attributes.key?(:'parent_category_path') self.parent_category_path = attributes[:'parent_category_path'] end if attributes.key?(:'payment_processing') self.payment_processing = attributes[:'payment_processing'] end if attributes.key?(:'physical') self.physical = attributes[:'physical'] end if attributes.key?(:'pricing') self.pricing = attributes[:'pricing'] end if attributes.key?(:'properties') if (value = attributes[:'properties']).is_a?(Array) self.properties = value end end if attributes.key?(:'realtime_pricing') self.realtime_pricing = attributes[:'realtime_pricing'] end if attributes.key?(:'recommend_replenishment_days') self.recommend_replenishment_days = attributes[:'recommend_replenishment_days'] end if attributes.key?(:'related') self. = attributes[:'related'] end if attributes.key?(:'reporting') self.reporting = attributes[:'reporting'] end if attributes.key?(:'restriction') self.restriction = attributes[:'restriction'] end if attributes.key?(:'revguard') self.revguard = attributes[:'revguard'] end if attributes.key?(:'reviews') self.reviews = attributes[:'reviews'] end if attributes.key?(:'salesforce') self.salesforce = attributes[:'salesforce'] end if attributes.key?(:'shipping') self.shipping = attributes[:'shipping'] end if attributes.key?(:'tags') self. = attributes[:'tags'] end if attributes.key?(:'tax') self.tax = attributes[:'tax'] end if attributes.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.key?(:'variant_items') if (value = attributes[:'variant_items']).is_a?(Array) self.variant_items = value end end if attributes.key?(:'variations') if (value = attributes[:'variations']).is_a?(Array) self.variations = value end end if attributes.key?(:'wishlist_member') self.wishlist_member = attributes[:'wishlist_member'] end end |
Instance Attribute Details
#accounting ⇒ Object
Returns the value of attribute accounting.
18 19 20 |
# File 'lib/ultracart_api/models/item.rb', line 18 def accounting @accounting end |
#amember ⇒ Object
Returns the value of attribute amember.
20 21 22 |
# File 'lib/ultracart_api/models/item.rb', line 20 def amember @amember end |
#auto_order ⇒ Object
Returns the value of attribute auto_order.
22 23 24 |
# File 'lib/ultracart_api/models/item.rb', line 22 def auto_order @auto_order end |
#ccbill ⇒ Object
Returns the value of attribute ccbill.
24 25 26 |
# File 'lib/ultracart_api/models/item.rb', line 24 def ccbill @ccbill end |
#channel_partner_item_mappings ⇒ Object
Channel Partner Item Mapping
27 28 29 |
# File 'lib/ultracart_api/models/item.rb', line 27 def channel_partner_item_mappings @channel_partner_item_mappings end |
#chargeback ⇒ Object
Returns the value of attribute chargeback.
29 30 31 |
# File 'lib/ultracart_api/models/item.rb', line 29 def chargeback @chargeback end |
#checkout ⇒ Object
Returns the value of attribute checkout.
31 32 33 |
# File 'lib/ultracart_api/models/item.rb', line 31 def checkout @checkout end |
#content ⇒ Object
Returns the value of attribute content.
33 34 35 |
# File 'lib/ultracart_api/models/item.rb', line 33 def content @content end |
#creation_dts ⇒ Object
Date/time of creation
36 37 38 |
# File 'lib/ultracart_api/models/item.rb', line 36 def creation_dts @creation_dts end |
#description ⇒ Object
Description of the item up to 500 characters.
39 40 41 |
# File 'lib/ultracart_api/models/item.rb', line 39 def description @description end |
#description_translated_text_instance_oid ⇒ Object
Description translated text instance id
42 43 44 |
# File 'lib/ultracart_api/models/item.rb', line 42 def description_translated_text_instance_oid @description_translated_text_instance_oid end |
#digital_delivery ⇒ Object
Returns the value of attribute digital_delivery.
44 45 46 |
# File 'lib/ultracart_api/models/item.rb', line 44 def digital_delivery @digital_delivery end |
#ebay ⇒ Object
Returns the value of attribute ebay.
46 47 48 |
# File 'lib/ultracart_api/models/item.rb', line 46 def ebay @ebay end |
#email_notifications ⇒ Object
Returns the value of attribute email_notifications.
48 49 50 |
# File 'lib/ultracart_api/models/item.rb', line 48 def email_notifications @email_notifications end |
#enrollment123 ⇒ Object
Returns the value of attribute enrollment123.
50 51 52 |
# File 'lib/ultracart_api/models/item.rb', line 50 def enrollment123 @enrollment123 end |
#fulfillment_addons ⇒ Object
Fulfillment Add-ons
53 54 55 |
# File 'lib/ultracart_api/models/item.rb', line 53 def fulfillment_addons @fulfillment_addons end |
#gift_certificate ⇒ Object
Returns the value of attribute gift_certificate.
55 56 57 |
# File 'lib/ultracart_api/models/item.rb', line 55 def gift_certificate @gift_certificate end |
#google_product_search ⇒ Object
Returns the value of attribute google_product_search.
57 58 59 |
# File 'lib/ultracart_api/models/item.rb', line 57 def google_product_search @google_product_search end |
#identifiers ⇒ Object
Returns the value of attribute identifiers.
59 60 61 |
# File 'lib/ultracart_api/models/item.rb', line 59 def identifiers @identifiers end |
#inactive ⇒ Object
True if this item is inactive and can not be purchased
62 63 64 |
# File 'lib/ultracart_api/models/item.rb', line 62 def inactive @inactive end |
#instant_payment_notifications ⇒ Object
Returns the value of attribute instant_payment_notifications.
64 65 66 |
# File 'lib/ultracart_api/models/item.rb', line 64 def instant_payment_notifications @instant_payment_notifications end |
#internal ⇒ Object
Returns the value of attribute internal.
66 67 68 |
# File 'lib/ultracart_api/models/item.rb', line 66 def internal @internal end |
#kit ⇒ Object
True if this item is a kit
69 70 71 |
# File 'lib/ultracart_api/models/item.rb', line 69 def kit @kit end |
#kit_component_only ⇒ Object
True if this item can only be usd as a kit component
72 73 74 |
# File 'lib/ultracart_api/models/item.rb', line 72 def kit_component_only @kit_component_only end |
#kit_definition ⇒ Object
Returns the value of attribute kit_definition.
74 75 76 |
# File 'lib/ultracart_api/models/item.rb', line 74 def kit_definition @kit_definition end |
#last_modified_dts ⇒ Object
Date/time of last modification
77 78 79 |
# File 'lib/ultracart_api/models/item.rb', line 77 def last_modified_dts @last_modified_dts end |
#merchant_id ⇒ Object
UltraCart merchant ID owning item
80 81 82 |
# File 'lib/ultracart_api/models/item.rb', line 80 def merchant_id @merchant_id end |
#merchant_item_id ⇒ Object
Unique item id assigned to this item
83 84 85 |
# File 'lib/ultracart_api/models/item.rb', line 83 def merchant_item_id @merchant_item_id end |
#merchant_item_oid ⇒ Object
Unique object identifier for this item
86 87 88 |
# File 'lib/ultracart_api/models/item.rb', line 86 def merchant_item_oid @merchant_item_oid end |
#options ⇒ Object
Options
89 90 91 |
# File 'lib/ultracart_api/models/item.rb', line 89 def @options end |
#parent_category_id ⇒ Object
Parent category of the item. Zero indicates the root folder.
92 93 94 |
# File 'lib/ultracart_api/models/item.rb', line 92 def parent_category_id @parent_category_id end |
#parent_category_path ⇒ Object
Parent category path. / indicates the root folder. This is the folder structure within item management.
95 96 97 |
# File 'lib/ultracart_api/models/item.rb', line 95 def parent_category_path @parent_category_path end |
#payment_processing ⇒ Object
Returns the value of attribute payment_processing.
97 98 99 |
# File 'lib/ultracart_api/models/item.rb', line 97 def payment_processing @payment_processing end |
#physical ⇒ Object
Returns the value of attribute physical.
99 100 101 |
# File 'lib/ultracart_api/models/item.rb', line 99 def physical @physical end |
#pricing ⇒ Object
Returns the value of attribute pricing.
101 102 103 |
# File 'lib/ultracart_api/models/item.rb', line 101 def pricing @pricing end |
#properties ⇒ Object
Properties
104 105 106 |
# File 'lib/ultracart_api/models/item.rb', line 104 def properties @properties end |
#realtime_pricing ⇒ Object
Returns the value of attribute realtime_pricing.
106 107 108 |
# File 'lib/ultracart_api/models/item.rb', line 106 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.
109 110 111 |
# File 'lib/ultracart_api/models/item.rb', line 109 def recommend_replenishment_days @recommend_replenishment_days end |
#related ⇒ Object
Returns the value of attribute related.
111 112 113 |
# File 'lib/ultracart_api/models/item.rb', line 111 def @related end |
#reporting ⇒ Object
Returns the value of attribute reporting.
113 114 115 |
# File 'lib/ultracart_api/models/item.rb', line 113 def reporting @reporting end |
#restriction ⇒ Object
Returns the value of attribute restriction.
115 116 117 |
# File 'lib/ultracart_api/models/item.rb', line 115 def restriction @restriction end |
#revguard ⇒ Object
Returns the value of attribute revguard.
117 118 119 |
# File 'lib/ultracart_api/models/item.rb', line 117 def revguard @revguard end |
#reviews ⇒ Object
Returns the value of attribute reviews.
119 120 121 |
# File 'lib/ultracart_api/models/item.rb', line 119 def reviews @reviews end |
#salesforce ⇒ Object
Returns the value of attribute salesforce.
121 122 123 |
# File 'lib/ultracart_api/models/item.rb', line 121 def salesforce @salesforce end |
#shipping ⇒ Object
Returns the value of attribute shipping.
123 124 125 |
# File 'lib/ultracart_api/models/item.rb', line 123 def shipping @shipping end |
#tags ⇒ Object
Returns the value of attribute tags.
125 126 127 |
# File 'lib/ultracart_api/models/item.rb', line 125 def @tags end |
#tax ⇒ Object
Returns the value of attribute tax.
127 128 129 |
# File 'lib/ultracart_api/models/item.rb', line 127 def tax @tax end |
#third_party_email_marketing ⇒ Object
3rd Party Email Marketing
130 131 132 |
# File 'lib/ultracart_api/models/item.rb', line 130 def third_party_email_marketing @third_party_email_marketing end |
#variant_items ⇒ Object
Variant Items
133 134 135 |
# File 'lib/ultracart_api/models/item.rb', line 133 def variant_items @variant_items end |
#variations ⇒ Object
Variations
136 137 138 |
# File 'lib/ultracart_api/models/item.rb', line 136 def variations @variations end |
#wishlist_member ⇒ Object
Returns the value of attribute wishlist_member.
138 139 140 |
# File 'lib/ultracart_api/models/item.rb', line 138 def wishlist_member @wishlist_member end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
198 199 200 |
# File 'lib/ultracart_api/models/item.rb', line 198 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 195 |
# File 'lib/ultracart_api/models/item.rb', line 141 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 |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
630 631 632 |
# File 'lib/ultracart_api/models/item.rb', line 630 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
260 261 262 263 |
# File 'lib/ultracart_api/models/item.rb', line 260 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 252 253 254 255 256 257 |
# File 'lib/ultracart_api/models/item.rb', line 203 def self.openapi_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.
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 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/ultracart_api/models/item.rb', line 559 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
661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 |
# File 'lib/ultracart_api/models/item.rb', line 661 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
732 733 734 735 736 737 738 739 740 741 742 743 744 |
# File 'lib/ultracart_api/models/item.rb', line 732 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
637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
# File 'lib/ultracart_api/models/item.rb', line 637 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
617 618 619 |
# File 'lib/ultracart_api/models/item.rb', line 617 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
623 624 625 |
# File 'lib/ultracart_api/models/item.rb', line 623 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?
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/ultracart_api/models/item.rb', line 501 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)
708 709 710 |
# File 'lib/ultracart_api/models/item.rb', line 708 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
714 715 716 717 718 719 720 721 722 723 724 725 726 |
# File 'lib/ultracart_api/models/item.rb', line 714 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
702 703 704 |
# File 'lib/ultracart_api/models/item.rb', line 702 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
520 521 522 523 524 525 |
# File 'lib/ultracart_api/models/item.rb', line 520 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 |