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



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

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?(:'assets')
    if (value = attributes[:'assets']).is_a?(Array)
      self.assets = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.has_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.has_key?(:'shared')
    self.shared = attributes[:'shared']
  end

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

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

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

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

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

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

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

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

Instance Attribute Details

#assetsObject

Returns the value of attribute assets.



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

def assets
  @assets
end

#attributesObject

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

#categoriesObject

Returns the value of attribute categories.



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

def categories
  @categories
end

#contentObject

Returns the value of attribute content.



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

def content
  @content
end

#content_typeObject

Returns the value of attribute content_type.



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

def content_type
  @content_type
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#industriesObject

Returns the value of attribute industries.



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

def industries
  @industries
end

#library_item_oidObject

Returns the value of attribute library_item_oid.



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

def library_item_oid
  @library_item_oid
end

#merchant_idObject

Returns the value of attribute merchant_id.



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

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.



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

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.



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

def original_object_id
  @original_object_id
end

#priceObject

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



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

def price
  @price
end

#price_formattedObject

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



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

def price_formatted
  @price_formatted
end

#publishedObject

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



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

def published
  @published
end

#published_dtsObject

The timestamp of the last published version



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

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



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

def published_from_library_item_oid
  @published_from_library_item_oid
end

#published_metaObject

Returns the value of attribute published_meta.



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

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



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

def published_version
  @published_version
end

#purchasedObject

True if this library item has been purchased



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

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



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

def purchased_from_library_item_oid
  @purchased_from_library_item_oid
end

#purchased_metaObject

Returns the value of attribute purchased_meta.



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

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



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

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



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

def rejected
  @rejected
end

#rejected_reasonObject

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



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

def rejected_reason
  @rejected_reason
end

#release_notesObject

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



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

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.



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

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



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

def reviewed
  @reviewed
end

#reviewed_dtsObject

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



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

def reviewed_dts
  @reviewed_dts
end

#screenshotsObject

Returns the value of attribute screenshots.



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

def screenshots
  @screenshots
end

#share_with_accountsObject

Returns the value of attribute share_with_accounts.



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

def share_with_accounts
  @share_with_accounts
end

#share_with_other_emailsObject

Returns the value of attribute share_with_other_emails.



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

def share_with_other_emails
  @share_with_other_emails
end

#sharedObject

True if this item is shared from another merchant account



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

def shared
  @shared
end

#sourceObject

True if this library item has been published



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

def source
  @source
end

#source_to_library_item_oidObject

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



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

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.



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

def source_version
  @source_version
end

#styleObject

Returns the value of attribute style.



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

def style
  @style
end

#times_purchasedObject

Returns the value of attribute times_purchased.



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

def times_purchased
  @times_purchased
end

#titleObject

Returns the value of attribute title.



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

def title
  @title
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#under_reviewObject

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



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

def under_review
  @under_review
end

Class Method Details

.attribute_mapObject

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



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

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

.swagger_typesObject

Attribute type mapping.



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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/ultracart_api/models/library_item.rb', line 166

def self.swagger_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



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

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



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/ultracart_api/models/library_item.rb', line 490

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



556
557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/ultracart_api/models/library_item.rb', line 556

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



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# File 'lib/ultracart_api/models/library_item.rb', line 469

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


456
457
458
# File 'lib/ultracart_api/models/library_item.rb', line 456

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



462
463
464
# File 'lib/ultracart_api/models/library_item.rb', line 462

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



396
397
398
399
# File 'lib/ultracart_api/models/library_item.rb', line 396

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



536
537
538
# File 'lib/ultracart_api/models/library_item.rb', line 536

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



542
543
544
545
546
547
548
549
550
# File 'lib/ultracart_api/models/library_item.rb', line 542

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



530
531
532
# File 'lib/ultracart_api/models/library_item.rb', line 530

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



403
404
405
# File 'lib/ultracart_api/models/library_item.rb', line 403

def valid?
  true
end