ultracart_api 3.10.47 → 3.10.48

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,224 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ItemDigitalItemsResponse
17
+ # digital_items
18
+ attr_accessor :digital_items
19
+
20
+ attr_accessor :error
21
+
22
+ attr_accessor :metadata
23
+
24
+ # Indicates if API call was successful
25
+ attr_accessor :success
26
+
27
+ attr_accessor :warning
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'digital_items' => :'digitalItems',
33
+ :'error' => :'error',
34
+ :'metadata' => :'metadata',
35
+ :'success' => :'success',
36
+ :'warning' => :'warning'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'digital_items' => :'Array<ItemDigitalItem>',
44
+ :'error' => :'Error',
45
+ :'metadata' => :'ResponseMetadata',
46
+ :'success' => :'BOOLEAN',
47
+ :'warning' => :'Warning'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
+
59
+ if attributes.has_key?(:'digitalItems')
60
+ if (value = attributes[:'digitalItems']).is_a?(Array)
61
+ self.digital_items = value
62
+ end
63
+ end
64
+
65
+ if attributes.has_key?(:'error')
66
+ self.error = attributes[:'error']
67
+ end
68
+
69
+ if attributes.has_key?(:'metadata')
70
+ self.metadata = attributes[:'metadata']
71
+ end
72
+
73
+ if attributes.has_key?(:'success')
74
+ self.success = attributes[:'success']
75
+ end
76
+
77
+ if attributes.has_key?(:'warning')
78
+ self.warning = attributes[:'warning']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ digital_items == o.digital_items &&
101
+ error == o.error &&
102
+ metadata == o.metadata &&
103
+ success == o.success &&
104
+ warning == o.warning
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Fixnum] Hash code
115
+ def hash
116
+ [digital_items, error, metadata, success, warning].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ self.class.swagger_types.each_pair do |key, type|
125
+ if type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :DateTime
146
+ DateTime.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :BOOLEAN
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ temp_model = UltracartClient.const_get(type).new
177
+ temp_model.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ next if value.nil?
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.47'
14
+ VERSION = '3.10.48'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -425,6 +425,9 @@ require 'ultracart_api/models/item_content_multimedia'
425
425
  require 'ultracart_api/models/item_content_multimedia_thumbnail'
426
426
  require 'ultracart_api/models/item_digital_delivery'
427
427
  require 'ultracart_api/models/item_digital_item'
428
+ require 'ultracart_api/models/item_digital_item_pdf_meta'
429
+ require 'ultracart_api/models/item_digital_item_response'
430
+ require 'ultracart_api/models/item_digital_items_response'
428
431
  require 'ultracart_api/models/item_ebay'
429
432
  require 'ultracart_api/models/item_ebay_category_specific'
430
433
  require 'ultracart_api/models/item_ebay_market_listing'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.47
4
+ version: 3.10.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-19 00:00:00.000000000 Z
11
+ date: 2022-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -641,6 +641,9 @@ files:
641
641
  - docs/ItemContentMultimediaThumbnail.md
642
642
  - docs/ItemDigitalDelivery.md
643
643
  - docs/ItemDigitalItem.md
644
+ - docs/ItemDigitalItemPdfMeta.md
645
+ - docs/ItemDigitalItemResponse.md
646
+ - docs/ItemDigitalItemsResponse.md
644
647
  - docs/ItemEbay.md
645
648
  - docs/ItemEbayCategorySpecific.md
646
649
  - docs/ItemEbayMarketListing.md
@@ -1342,6 +1345,9 @@ files:
1342
1345
  - lib/ultracart_api/models/item_content_multimedia_thumbnail.rb
1343
1346
  - lib/ultracart_api/models/item_digital_delivery.rb
1344
1347
  - lib/ultracart_api/models/item_digital_item.rb
1348
+ - lib/ultracart_api/models/item_digital_item_pdf_meta.rb
1349
+ - lib/ultracart_api/models/item_digital_item_response.rb
1350
+ - lib/ultracart_api/models/item_digital_items_response.rb
1345
1351
  - lib/ultracart_api/models/item_ebay.rb
1346
1352
  - lib/ultracart_api/models/item_ebay_category_specific.rb
1347
1353
  - lib/ultracart_api/models/item_ebay_market_listing.rb