Class: UltracartClient::LibraryItem

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/models/library_item.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LibraryItem

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
# File 'lib/ultracart_api/models/library_item.rb', line 225

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::LibraryItem` 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::LibraryItem`. 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?(:'assets')
    if (value = attributes[:'assets']).is_a?(Array)
      self.assets = value
    end
  end

  if attributes.key?(:'attributes')
    if (value = attributes[:'attributes']).is_a?(Array)
      self.attributes = value
    end
  end

  if attributes.key?(:'categories')
    if (value = attributes[:'categories']).is_a?(Array)
      self.categories = value
    end
  end

  if attributes.key?(:'content')
    self.content = attributes[:'content']
  end

  if attributes.key?(:'content_type')
    self.content_type = attributes[:'content_type']
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'industries')
    if (value = attributes[:'industries']).is_a?(Array)
      self.industries = value
    end
  end

  if attributes.key?(:'library_item_oid')
    self.library_item_oid = attributes[:'library_item_oid']
  end

  if attributes.key?(:'merchant_id')
    self.merchant_id = attributes[:'merchant_id']
  end

  if attributes.key?(:'my_purchased_version')
    self.my_purchased_version = attributes[:'my_purchased_version']
  end

  if attributes.key?(:'original_object_id')
    self.original_object_id = attributes[:'original_object_id']
  end

  if attributes.key?(:'price')
    self.price = attributes[:'price']
  end

  if attributes.key?(:'price_formatted')
    self.price_formatted = attributes[:'price_formatted']
  end

  if attributes.key?(:'published')
    self.published = attributes[:'published']
  end

  if attributes.key?(:'published_dts')
    self.published_dts = attributes[:'published_dts']
  end

  if attributes.key?(:'published_from_library_item_oid')
    self.published_from_library_item_oid = attributes[:'published_from_library_item_oid']
  end

  if attributes.key?(:'published_meta')
    self.published_meta = attributes[:'published_meta']
  end

  if attributes.key?(:'published_version')
    self.published_version = attributes[:'published_version']
  end

  if attributes.key?(:'purchased')
    self.purchased = attributes[:'purchased']
  end

  if attributes.key?(:'purchased_from_library_item_oid')
    self.purchased_from_library_item_oid = attributes[:'purchased_from_library_item_oid']
  end

  if attributes.key?(:'purchased_meta')
    self.purchased_meta = attributes[:'purchased_meta']
  end

  if attributes.key?(:'purchased_version')
    self.purchased_version = attributes[:'purchased_version']
  end

  if attributes.key?(:'rejected')
    self.rejected = attributes[:'rejected']
  end

  if attributes.key?(:'rejected_reason')
    self.rejected_reason = attributes[:'rejected_reason']
  end

  if attributes.key?(:'release_notes')
    self.release_notes = attributes[:'release_notes']
  end

  if attributes.key?(:'release_version')
    self.release_version = attributes[:'release_version']
  end

  if attributes.key?(:'reviewed')
    self.reviewed = attributes[:'reviewed']
  end

  if attributes.key?(:'reviewed_dts')
    self.reviewed_dts = attributes[:'reviewed_dts']
  end

  if attributes.key?(:'screenshots')
    if (value = attributes[:'screenshots']).is_a?(Array)
      self.screenshots = value
    end
  end

  if attributes.key?(:'share_with_accounts')
    if (value = attributes[:'share_with_accounts']).is_a?(Array)
      self.share_with_accounts = value
    end
  end

  if attributes.key?(:'share_with_other_emails')
    if (value = attributes[:'share_with_other_emails']).is_a?(Array)
      self.share_with_other_emails = value
    end
  end

  if attributes.key?(:'shared')
    self.shared = attributes[:'shared']
  end

  if attributes.key?(:'source')
    self.source = attributes[:'source']
  end

  if attributes.key?(:'source_to_library_item_oid')
    self.source_to_library_item_oid = attributes[:'source_to_library_item_oid']
  end

  if attributes.key?(:'source_version')
    self.source_version = attributes[:'source_version']
  end

  if attributes.key?(:'style')
    self.style = attributes[:'style']
  end

  if attributes.key?(:'times_purchased')
    self.times_purchased = attributes[:'times_purchased']
  end

  if attributes.key?(:'title')
    self.title = attributes[:'title']
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.key?(:'under_review')
    self.under_review = attributes[:'under_review']
  end
end

Instance Attribute Details

#assetsObject

Returns the value of attribute assets.



18
19
20
# File 'lib/ultracart_api/models/library_item.rb', line 18

def assets
  @assets
end

#attributesObject

Returns the value of attribute attributes.



20
21
22
# File 'lib/ultracart_api/models/library_item.rb', line 20

def attributes
  @attributes
end

#categoriesObject

Returns the value of attribute categories.



22
23
24
# File 'lib/ultracart_api/models/library_item.rb', line 22

def categories
  @categories
end

#contentObject

Returns the value of attribute content.



24
25
26
# File 'lib/ultracart_api/models/library_item.rb', line 24

def content
  @content
end

#content_typeObject

Returns the value of attribute content_type.



26
27
28
# File 'lib/ultracart_api/models/library_item.rb', line 26

def content_type
  @content_type
end

#descriptionObject

Returns the value of attribute description.



28
29
30
# File 'lib/ultracart_api/models/library_item.rb', line 28

def description
  @description
end

#industriesObject

Returns the value of attribute industries.



30
31
32
# File 'lib/ultracart_api/models/library_item.rb', line 30

def industries
  @industries
end

#library_item_oidObject

Returns the value of attribute library_item_oid.



32
33
34
# File 'lib/ultracart_api/models/library_item.rb', line 32

def library_item_oid
  @library_item_oid
end

#merchant_idObject

Returns the value of attribute merchant_id.



34
35
36
# File 'lib/ultracart_api/models/library_item.rb', line 34

def merchant_id
  @merchant_id
end

#my_purchased_versionObject

If this is a public item and the merchant has already purchased it, this is their version. If not yet purchased, this will be zero. This value will only be populated during a searchPublicItems() call.



37
38
39
# File 'lib/ultracart_api/models/library_item.rb', line 37

def my_purchased_version
  @my_purchased_version
end

#original_object_idObject

This id points to the original object that was added to the library. For flows and campaigns, this is a uuid string. For upsells, it is an oid integer. For transactional_emails, it is an email name.



40
41
42
# File 'lib/ultracart_api/models/library_item.rb', line 40

def original_object_id
  @original_object_id
end

#priceObject

The price of the published item. Null for any private library items.



43
44
45
# File 'lib/ultracart_api/models/library_item.rb', line 43

def price
  @price
end

#price_formattedObject

The formatted price of the published item. Null for any private library items.



46
47
48
# File 'lib/ultracart_api/models/library_item.rb', line 46

def price_formatted
  @price_formatted
end

#publishedObject

True if this library item is a published item (not source)



49
50
51
# File 'lib/ultracart_api/models/library_item.rb', line 49

def published
  @published
end

#published_dtsObject

The timestamp of the last published version



52
53
54
# File 'lib/ultracart_api/models/library_item.rb', line 52

def published_dts
  @published_dts
end

#published_from_library_item_oidObject

The source item used to publish this item. This allows for comparisons between source and published



55
56
57
# File 'lib/ultracart_api/models/library_item.rb', line 55

def published_from_library_item_oid
  @published_from_library_item_oid
end

#published_metaObject

Returns the value of attribute published_meta.



57
58
59
# File 'lib/ultracart_api/models/library_item.rb', line 57

def published_meta
  @published_meta
end

#published_versionObject

The source version when this item was published. This allows for out-of-date alerts to be shown when there is a difference between source and published



60
61
62
# File 'lib/ultracart_api/models/library_item.rb', line 60

def published_version
  @published_version
end

#purchasedObject

True if this library item has been purchased



63
64
65
# File 'lib/ultracart_api/models/library_item.rb', line 63

def purchased
  @purchased
end

#purchased_from_library_item_oidObject

The published item that was purchased to make this item. This allows for comparisons between published and purchased



66
67
68
# File 'lib/ultracart_api/models/library_item.rb', line 66

def purchased_from_library_item_oid
  @purchased_from_library_item_oid
end

#purchased_metaObject

Returns the value of attribute purchased_meta.



68
69
70
# File 'lib/ultracart_api/models/library_item.rb', line 68

def purchased_meta
  @purchased_meta
end

#purchased_versionObject

The published version when this item was purchased. This allows for out-of-date alerts to be shown when there is a difference between published and purchased



71
72
73
# File 'lib/ultracart_api/models/library_item.rb', line 71

def purchased_version
  @purchased_version
end

#rejectedObject

Any published library reviewed by UltraCart staff for malicious or inappropriate content will have this flag set to true. This is always false for non-published items



74
75
76
# File 'lib/ultracart_api/models/library_item.rb', line 74

def rejected
  @rejected
end

#rejected_reasonObject

Any rejected published item will have this field populated with the reason.



77
78
79
# File 'lib/ultracart_api/models/library_item.rb', line 77

def rejected_reason
  @rejected_reason
end

#release_notesObject

Release notes specific to each published version and only appearing on public items.



80
81
82
# File 'lib/ultracart_api/models/library_item.rb', line 80

def release_notes
  @release_notes
end

#release_versionObject

This counter records how many times a library item has been published. This is used to show version history.



83
84
85
# File 'lib/ultracart_api/models/library_item.rb', line 83

def release_version
  @release_version
end

#reviewedObject

Any published library items must be reviewed by UltraCart staff for malicious content. This flag shows the status of that review. This is always false for non-published items



86
87
88
# File 'lib/ultracart_api/models/library_item.rb', line 86

def reviewed
  @reviewed
end

#reviewed_dtsObject

This is the timestamp for a published items formal review by UltraCart staff for malicious content.



89
90
91
# File 'lib/ultracart_api/models/library_item.rb', line 89

def reviewed_dts
  @reviewed_dts
end

#screenshotsObject

Returns the value of attribute screenshots.



91
92
93
# File 'lib/ultracart_api/models/library_item.rb', line 91

def screenshots
  @screenshots
end

#share_with_accountsObject

Returns the value of attribute share_with_accounts.



93
94
95
# File 'lib/ultracart_api/models/library_item.rb', line 93

def share_with_accounts
  @share_with_accounts
end

#share_with_other_emailsObject

Returns the value of attribute share_with_other_emails.



95
96
97
# File 'lib/ultracart_api/models/library_item.rb', line 95

def share_with_other_emails
  @share_with_other_emails
end

#sharedObject

True if this item is shared from another merchant account



98
99
100
# File 'lib/ultracart_api/models/library_item.rb', line 98

def shared
  @shared
end

#sourceObject

True if this library item has been published



101
102
103
# File 'lib/ultracart_api/models/library_item.rb', line 101

def source
  @source
end

#source_to_library_item_oidObject

This oid points to the published library item, if there is one.



104
105
106
# File 'lib/ultracart_api/models/library_item.rb', line 104

def source_to_library_item_oid
  @source_to_library_item_oid
end

#source_versionObject

The version of this item. Increment every time the item is saved.



107
108
109
# File 'lib/ultracart_api/models/library_item.rb', line 107

def source_version
  @source_version
end

#styleObject

Returns the value of attribute style.



109
110
111
# File 'lib/ultracart_api/models/library_item.rb', line 109

def style
  @style
end

#times_purchasedObject

Returns the value of attribute times_purchased.



111
112
113
# File 'lib/ultracart_api/models/library_item.rb', line 111

def times_purchased
  @times_purchased
end

#titleObject

Returns the value of attribute title.



113
114
115
# File 'lib/ultracart_api/models/library_item.rb', line 113

def title
  @title
end

#typeObject

Returns the value of attribute type.



115
116
117
# File 'lib/ultracart_api/models/library_item.rb', line 115

def type
  @type
end

#under_reviewObject

True if this library item was published but is awaiting review from UltraCart staff.



118
119
120
# File 'lib/ultracart_api/models/library_item.rb', line 118

def under_review
  @under_review
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



167
168
169
# File 'lib/ultracart_api/models/library_item.rb', line 167

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



121
122
123
124
125
126
127
128
129
130
131
132
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
# File 'lib/ultracart_api/models/library_item.rb', line 121

def self.attribute_map
  {
    :'assets' => :'assets',
    :'attributes' => :'attributes',
    :'categories' => :'categories',
    :'content' => :'content',
    :'content_type' => :'content_type',
    :'description' => :'description',
    :'industries' => :'industries',
    :'library_item_oid' => :'library_item_oid',
    :'merchant_id' => :'merchant_id',
    :'my_purchased_version' => :'my_purchased_version',
    :'original_object_id' => :'original_object_id',
    :'price' => :'price',
    :'price_formatted' => :'price_formatted',
    :'published' => :'published',
    :'published_dts' => :'published_dts',
    :'published_from_library_item_oid' => :'published_from_library_item_oid',
    :'published_meta' => :'published_meta',
    :'published_version' => :'published_version',
    :'purchased' => :'purchased',
    :'purchased_from_library_item_oid' => :'purchased_from_library_item_oid',
    :'purchased_meta' => :'purchased_meta',
    :'purchased_version' => :'purchased_version',
    :'rejected' => :'rejected',
    :'rejected_reason' => :'rejected_reason',
    :'release_notes' => :'release_notes',
    :'release_version' => :'release_version',
    :'reviewed' => :'reviewed',
    :'reviewed_dts' => :'reviewed_dts',
    :'screenshots' => :'screenshots',
    :'share_with_accounts' => :'share_with_accounts',
    :'share_with_other_emails' => :'share_with_other_emails',
    :'shared' => :'shared',
    :'source' => :'source',
    :'source_to_library_item_oid' => :'source_to_library_item_oid',
    :'source_version' => :'source_version',
    :'style' => :'style',
    :'times_purchased' => :'times_purchased',
    :'title' => :'title',
    :'type' => :'type',
    :'under_review' => :'under_review'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



488
489
490
# File 'lib/ultracart_api/models/library_item.rb', line 488

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



218
219
220
221
# File 'lib/ultracart_api/models/library_item.rb', line 218

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/ultracart_api/models/library_item.rb', line 172

def self.openapi_types
  {
    :'assets' => :'Array<LibraryItemAsset>',
    :'attributes' => :'Array<LibraryItemAttribute>',
    :'categories' => :'Array<String>',
    :'content' => :'String',
    :'content_type' => :'String',
    :'description' => :'String',
    :'industries' => :'Array<String>',
    :'library_item_oid' => :'Integer',
    :'merchant_id' => :'String',
    :'my_purchased_version' => :'Integer',
    :'original_object_id' => :'String',
    :'price' => :'Float',
    :'price_formatted' => :'String',
    :'published' => :'Boolean',
    :'published_dts' => :'Object',
    :'published_from_library_item_oid' => :'Integer',
    :'published_meta' => :'LibraryItemPublishedMeta',
    :'published_version' => :'Integer',
    :'purchased' => :'Boolean',
    :'purchased_from_library_item_oid' => :'Integer',
    :'purchased_meta' => :'LibraryItemPurchasedMeta',
    :'purchased_version' => :'Integer',
    :'rejected' => :'Boolean',
    :'rejected_reason' => :'String',
    :'release_notes' => :'String',
    :'release_version' => :'Integer',
    :'reviewed' => :'Boolean',
    :'reviewed_dts' => :'Object',
    :'screenshots' => :'Array<LibraryItemScreenshot>',
    :'share_with_accounts' => :'Array<LibraryItemAccount>',
    :'share_with_other_emails' => :'Array<LibraryItemEmail>',
    :'shared' => :'Boolean',
    :'source' => :'Boolean',
    :'source_to_library_item_oid' => :'Integer',
    :'source_version' => :'Integer',
    :'style' => :'String',
    :'times_purchased' => :'Integer',
    :'title' => :'String',
    :'type' => :'String',
    :'under_review' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/ultracart_api/models/library_item.rb', line 428

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      assets == o.assets &&
      attributes == o.attributes &&
      categories == o.categories &&
      content == o.content &&
      content_type == o.content_type &&
      description == o.description &&
      industries == o.industries &&
      library_item_oid == o.library_item_oid &&
      merchant_id == o.merchant_id &&
      my_purchased_version == o.my_purchased_version &&
      original_object_id == o.original_object_id &&
      price == o.price &&
      price_formatted == o.price_formatted &&
      published == o.published &&
      published_dts == o.published_dts &&
      published_from_library_item_oid == o.published_from_library_item_oid &&
      published_meta == o.published_meta &&
      published_version == o.published_version &&
      purchased == o.purchased &&
      purchased_from_library_item_oid == o.purchased_from_library_item_oid &&
      purchased_meta == o.purchased_meta &&
      purchased_version == o.purchased_version &&
      rejected == o.rejected &&
      rejected_reason == o.rejected_reason &&
      release_notes == o.release_notes &&
      release_version == o.release_version &&
      reviewed == o.reviewed &&
      reviewed_dts == o.reviewed_dts &&
      screenshots == o.screenshots &&
      share_with_accounts == o.share_with_accounts &&
      share_with_other_emails == o.share_with_other_emails &&
      shared == o.shared &&
      source == o.source &&
      source_to_library_item_oid == o.source_to_library_item_oid &&
      source_version == o.source_version &&
      style == o.style &&
      times_purchased == o.times_purchased &&
      title == o.title &&
      type == o.type &&
      under_review == o.under_review
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



519
520
521
522
523
524
525
526
527
528
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
# File 'lib/ultracart_api/models/library_item.rb', line 519

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/ultracart_api/models/library_item.rb', line 590

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/ultracart_api/models/library_item.rb', line 495

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


475
476
477
# File 'lib/ultracart_api/models/library_item.rb', line 475

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



481
482
483
# File 'lib/ultracart_api/models/library_item.rb', line 481

def hash
  [assets, attributes, categories, content, content_type, description, industries, library_item_oid, merchant_id, my_purchased_version, original_object_id, price, price_formatted, published, published_dts, published_from_library_item_oid, published_meta, published_version, purchased, purchased_from_library_item_oid, purchased_meta, purchased_version, rejected, rejected_reason, release_notes, release_version, reviewed, reviewed_dts, screenshots, share_with_accounts, share_with_other_emails, shared, source, source_to_library_item_oid, source_version, style, times_purchased, title, type, under_review].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



415
416
417
418
# File 'lib/ultracart_api/models/library_item.rb', line 415

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



566
567
568
# File 'lib/ultracart_api/models/library_item.rb', line 566

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



572
573
574
575
576
577
578
579
580
581
582
583
584
# File 'lib/ultracart_api/models/library_item.rb', line 572

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



560
561
562
# File 'lib/ultracart_api/models/library_item.rb', line 560

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



422
423
424
# File 'lib/ultracart_api/models/library_item.rb', line 422

def valid?
  true
end