ultracart_api 4.0.68.rc → 4.0.70.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/FileManagerPageResponse.md +26 -0
- data/docs/StorefrontApi.md +12 -12
- data/lib/ultracart_api/api/storefront_api.rb +9 -9
- data/lib/ultracart_api/models/file_manager_page_response.rb +256 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 148323eac62bcdb01a1a6acc096bce265723905102e29c9e49f5871be5493bb8
|
4
|
+
data.tar.gz: af87c73c0ffc5b5f8bef0b4ff302d16b232e82ac73ad1e70ae201e6855cf2d75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff6365ae961a4312c7e8fb85ae80a567ebe6f268bb39ebb1ceba21764d4fe2dd5fff2204f8e3e48e8e54435e48f8b3e61bd341240976a6b0bdbddcc34fd4fea0
|
7
|
+
data.tar.gz: 3381afe48ccf2b433fbd023c8d42b87001e0408415daf75d36c6b6141ab5fac6800d38910d235a358cf9876bbfac16c2039ff853f47b7a87bf70790c1011ed3a
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 4.0.
|
10
|
+
- Package version: 4.0.70.rc
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-4.0.
|
27
|
+
gem install ./ultracart_api-4.0.70.rc.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.70.rc.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'ultracart_api', '~> 4.0.
|
36
|
+
gem 'ultracart_api', '~> 4.0.70.rc'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -831,6 +831,7 @@ Class | Method | HTTP request | Description
|
|
831
831
|
- [UltracartClient::FileManagerDirectory](docs/FileManagerDirectory.md)
|
832
832
|
- [UltracartClient::FileManagerFile](docs/FileManagerFile.md)
|
833
833
|
- [UltracartClient::FileManagerPage](docs/FileManagerPage.md)
|
834
|
+
- [UltracartClient::FileManagerPageResponse](docs/FileManagerPageResponse.md)
|
834
835
|
- [UltracartClient::FileManagerUploadRequest](docs/FileManagerUploadRequest.md)
|
835
836
|
- [UltracartClient::FileManagerUploadUrlResponse](docs/FileManagerUploadUrlResponse.md)
|
836
837
|
- [UltracartClient::FulfillmentInventory](docs/FulfillmentInventory.md)
|
@@ -1217,6 +1218,8 @@ Not every change is committed to every SDK.
|
|
1217
1218
|
|
1218
1219
|
| Version | Date | Comments |
|
1219
1220
|
| --: | :-: | --- |
|
1221
|
+
| 4.0.70-RC | 09/29/2022 | page_paths search category for search2 method |
|
1222
|
+
| 4.0.69-RC | 09/29/2022 | storefront file mgr calls tweaks |
|
1220
1223
|
| 4.0.68-RC | 09/29/2022 | storefront methods for file manager ui |
|
1221
1224
|
| 4.0.67-RC | 09/27/2022 | added digital library call for unassociated content |
|
1222
1225
|
| 4.0.66-RC | 09/22/2022 | digital item mgmt testing |
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# UltracartClient::FileManagerPageResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
8
|
+
| **file_manager_page** | [**FileManagerPage**](FileManagerPage.md) | | [optional] |
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ultracart_api'
|
17
|
+
|
18
|
+
instance = UltracartClient::FileManagerPageResponse.new(
|
19
|
+
error: null,
|
20
|
+
file_manager_page: null,
|
21
|
+
metadata: null,
|
22
|
+
success: null,
|
23
|
+
warning: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/StorefrontApi.md
CHANGED
@@ -893,7 +893,7 @@ end
|
|
893
893
|
|
894
894
|
## create_fs_directory
|
895
895
|
|
896
|
-
> <
|
896
|
+
> <FileManagerPageResponse> create_fs_directory(id, opts)
|
897
897
|
|
898
898
|
Create file manager directory
|
899
899
|
|
@@ -930,7 +930,7 @@ end
|
|
930
930
|
|
931
931
|
This returns an Array which contains the response data, status code and headers.
|
932
932
|
|
933
|
-
> <Array(<
|
933
|
+
> <Array(<FileManagerPageResponse>, Integer, Hash)> create_fs_directory_with_http_info(id, opts)
|
934
934
|
|
935
935
|
```ruby
|
936
936
|
begin
|
@@ -938,7 +938,7 @@ begin
|
|
938
938
|
data, status_code, headers = api_instance.create_fs_directory_with_http_info(id, opts)
|
939
939
|
p status_code # => 2xx
|
940
940
|
p headers # => { ... }
|
941
|
-
p data # => <
|
941
|
+
p data # => <FileManagerPageResponse>
|
942
942
|
rescue UltracartClient::ApiError => e
|
943
943
|
puts "Error when calling StorefrontApi->create_fs_directory_with_http_info: #{e}"
|
944
944
|
end
|
@@ -954,7 +954,7 @@ end
|
|
954
954
|
|
955
955
|
### Return type
|
956
956
|
|
957
|
-
[**
|
957
|
+
[**FileManagerPageResponse**](FileManagerPageResponse.md)
|
958
958
|
|
959
959
|
### Authorization
|
960
960
|
|
@@ -1674,7 +1674,7 @@ nil (empty response body)
|
|
1674
1674
|
|
1675
1675
|
## delete_fs_file
|
1676
1676
|
|
1677
|
-
> <
|
1677
|
+
> <FileManagerPageResponse> delete_fs_file(id, opts)
|
1678
1678
|
|
1679
1679
|
Delete file manager directory
|
1680
1680
|
|
@@ -1711,7 +1711,7 @@ end
|
|
1711
1711
|
|
1712
1712
|
This returns an Array which contains the response data, status code and headers.
|
1713
1713
|
|
1714
|
-
> <Array(<
|
1714
|
+
> <Array(<FileManagerPageResponse>, Integer, Hash)> delete_fs_file_with_http_info(id, opts)
|
1715
1715
|
|
1716
1716
|
```ruby
|
1717
1717
|
begin
|
@@ -1719,7 +1719,7 @@ begin
|
|
1719
1719
|
data, status_code, headers = api_instance.delete_fs_file_with_http_info(id, opts)
|
1720
1720
|
p status_code # => 2xx
|
1721
1721
|
p headers # => { ... }
|
1722
|
-
p data # => <
|
1722
|
+
p data # => <FileManagerPageResponse>
|
1723
1723
|
rescue UltracartClient::ApiError => e
|
1724
1724
|
puts "Error when calling StorefrontApi->delete_fs_file_with_http_info: #{e}"
|
1725
1725
|
end
|
@@ -1735,7 +1735,7 @@ end
|
|
1735
1735
|
|
1736
1736
|
### Return type
|
1737
1737
|
|
1738
|
-
[**
|
1738
|
+
[**FileManagerPageResponse**](FileManagerPageResponse.md)
|
1739
1739
|
|
1740
1740
|
### Authorization
|
1741
1741
|
|
@@ -6436,7 +6436,7 @@ end
|
|
6436
6436
|
|
6437
6437
|
## get_fs_directory
|
6438
6438
|
|
6439
|
-
> <
|
6439
|
+
> <FileManagerPageResponse> get_fs_directory(id, opts)
|
6440
6440
|
|
6441
6441
|
Get file manager directory
|
6442
6442
|
|
@@ -6474,7 +6474,7 @@ end
|
|
6474
6474
|
|
6475
6475
|
This returns an Array which contains the response data, status code and headers.
|
6476
6476
|
|
6477
|
-
> <Array(<
|
6477
|
+
> <Array(<FileManagerPageResponse>, Integer, Hash)> get_fs_directory_with_http_info(id, opts)
|
6478
6478
|
|
6479
6479
|
```ruby
|
6480
6480
|
begin
|
@@ -6482,7 +6482,7 @@ begin
|
|
6482
6482
|
data, status_code, headers = api_instance.get_fs_directory_with_http_info(id, opts)
|
6483
6483
|
p status_code # => 2xx
|
6484
6484
|
p headers # => { ... }
|
6485
|
-
p data # => <
|
6485
|
+
p data # => <FileManagerPageResponse>
|
6486
6486
|
rescue UltracartClient::ApiError => e
|
6487
6487
|
puts "Error when calling StorefrontApi->get_fs_directory_with_http_info: #{e}"
|
6488
6488
|
end
|
@@ -6499,7 +6499,7 @@ end
|
|
6499
6499
|
|
6500
6500
|
### Return type
|
6501
6501
|
|
6502
|
-
[**
|
6502
|
+
[**FileManagerPageResponse**](FileManagerPageResponse.md)
|
6503
6503
|
|
6504
6504
|
### Authorization
|
6505
6505
|
|
@@ -731,7 +731,7 @@ module UltracartClient
|
|
731
731
|
# @param [Hash] opts the optional parameters
|
732
732
|
# @option opts [String] :name
|
733
733
|
# @option opts [Integer] :parent_storefront_fs_directory_oid
|
734
|
-
# @return [
|
734
|
+
# @return [FileManagerPageResponse]
|
735
735
|
def create_fs_directory(id, opts = {})
|
736
736
|
data, _status_code, _headers = create_fs_directory_with_http_info(id, opts)
|
737
737
|
data
|
@@ -742,7 +742,7 @@ module UltracartClient
|
|
742
742
|
# @param [Hash] opts the optional parameters
|
743
743
|
# @option opts [String] :name
|
744
744
|
# @option opts [Integer] :parent_storefront_fs_directory_oid
|
745
|
-
# @return [Array<(
|
745
|
+
# @return [Array<(FileManagerPageResponse, Integer, Hash)>] FileManagerPageResponse data, response status code and response headers
|
746
746
|
def create_fs_directory_with_http_info(id, opts = {})
|
747
747
|
if @api_client.config.debugging
|
748
748
|
@api_client.config.logger.debug 'Calling API: StorefrontApi.create_fs_directory ...'
|
@@ -772,7 +772,7 @@ module UltracartClient
|
|
772
772
|
post_body = opts[:debug_body]
|
773
773
|
|
774
774
|
# return_type
|
775
|
-
return_type = opts[:debug_return_type] || '
|
775
|
+
return_type = opts[:debug_return_type] || 'FileManagerPageResponse'
|
776
776
|
|
777
777
|
# auth_names
|
778
778
|
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
@@ -1478,7 +1478,7 @@ module UltracartClient
|
|
1478
1478
|
# @param [Hash] opts the optional parameters
|
1479
1479
|
# @option opts [Integer] :parent_storefront_fs_directory_oid
|
1480
1480
|
# @option opts [Integer] :storefront_fs_file_oid
|
1481
|
-
# @return [
|
1481
|
+
# @return [FileManagerPageResponse]
|
1482
1482
|
def delete_fs_file(id, opts = {})
|
1483
1483
|
data, _status_code, _headers = delete_fs_file_with_http_info(id, opts)
|
1484
1484
|
data
|
@@ -1489,7 +1489,7 @@ module UltracartClient
|
|
1489
1489
|
# @param [Hash] opts the optional parameters
|
1490
1490
|
# @option opts [Integer] :parent_storefront_fs_directory_oid
|
1491
1491
|
# @option opts [Integer] :storefront_fs_file_oid
|
1492
|
-
# @return [Array<(
|
1492
|
+
# @return [Array<(FileManagerPageResponse, Integer, Hash)>] FileManagerPageResponse data, response status code and response headers
|
1493
1493
|
def delete_fs_file_with_http_info(id, opts = {})
|
1494
1494
|
if @api_client.config.debugging
|
1495
1495
|
@api_client.config.logger.debug 'Calling API: StorefrontApi.delete_fs_file ...'
|
@@ -1519,7 +1519,7 @@ module UltracartClient
|
|
1519
1519
|
post_body = opts[:debug_body]
|
1520
1520
|
|
1521
1521
|
# return_type
|
1522
|
-
return_type = opts[:debug_return_type] || '
|
1522
|
+
return_type = opts[:debug_return_type] || 'FileManagerPageResponse'
|
1523
1523
|
|
1524
1524
|
# auth_names
|
1525
1525
|
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
@@ -5999,7 +5999,7 @@ module UltracartClient
|
|
5999
5999
|
# @option opts [String] :path
|
6000
6000
|
# @option opts [Integer] :storefront_fs_directory_oid
|
6001
6001
|
# @option opts [Integer] :storefront_theme_oid
|
6002
|
-
# @return [
|
6002
|
+
# @return [FileManagerPageResponse]
|
6003
6003
|
def get_fs_directory(id, opts = {})
|
6004
6004
|
data, _status_code, _headers = get_fs_directory_with_http_info(id, opts)
|
6005
6005
|
data
|
@@ -6011,7 +6011,7 @@ module UltracartClient
|
|
6011
6011
|
# @option opts [String] :path
|
6012
6012
|
# @option opts [Integer] :storefront_fs_directory_oid
|
6013
6013
|
# @option opts [Integer] :storefront_theme_oid
|
6014
|
-
# @return [Array<(
|
6014
|
+
# @return [Array<(FileManagerPageResponse, Integer, Hash)>] FileManagerPageResponse data, response status code and response headers
|
6015
6015
|
def get_fs_directory_with_http_info(id, opts = {})
|
6016
6016
|
if @api_client.config.debugging
|
6017
6017
|
@api_client.config.logger.debug 'Calling API: StorefrontApi.get_fs_directory ...'
|
@@ -6042,7 +6042,7 @@ module UltracartClient
|
|
6042
6042
|
post_body = opts[:debug_body]
|
6043
6043
|
|
6044
6044
|
# return_type
|
6045
|
-
return_type = opts[:debug_return_type] || '
|
6045
|
+
return_type = opts[:debug_return_type] || 'FileManagerPageResponse'
|
6046
6046
|
|
6047
6047
|
# auth_names
|
6048
6048
|
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
@@ -0,0 +1,256 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module UltracartClient
|
17
|
+
class FileManagerPageResponse
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
attr_accessor :file_manager_page
|
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
|
+
:'error' => :'error',
|
33
|
+
:'file_manager_page' => :'file_manager_page',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'error' => :'Error',
|
49
|
+
:'file_manager_page' => :'FileManagerPage',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'success' => :'Boolean',
|
52
|
+
:'warning' => :'Warning'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
])
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::FileManagerPageResponse` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::FileManagerPageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'error')
|
78
|
+
self.error = attributes[:'error']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'file_manager_page')
|
82
|
+
self.file_manager_page = attributes[:'file_manager_page']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'metadata')
|
86
|
+
self.metadata = attributes[:'metadata']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'success')
|
90
|
+
self.success = attributes[:'success']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'warning')
|
94
|
+
self.warning = attributes[:'warning']
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
+
# @return Array for valid properties with the reasons
|
100
|
+
def list_invalid_properties
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
error == o.error &&
|
117
|
+
file_manager_page == o.file_manager_page &&
|
118
|
+
metadata == o.metadata &&
|
119
|
+
success == o.success &&
|
120
|
+
warning == o.warning
|
121
|
+
end
|
122
|
+
|
123
|
+
# @see the `==` method
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def eql?(o)
|
126
|
+
self == o
|
127
|
+
end
|
128
|
+
|
129
|
+
# Calculates hash code according to all attributes.
|
130
|
+
# @return [Integer] Hash code
|
131
|
+
def hash
|
132
|
+
[error, file_manager_page, metadata, success, warning].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def self.build_from_hash(attributes)
|
139
|
+
new.build_from_hash(attributes)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
150
|
+
self.send("#{key}=", nil)
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = UltracartClient.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -382,6 +382,7 @@ require 'ultracart_api/models/experiments_response'
|
|
382
382
|
require 'ultracart_api/models/file_manager_directory'
|
383
383
|
require 'ultracart_api/models/file_manager_file'
|
384
384
|
require 'ultracart_api/models/file_manager_page'
|
385
|
+
require 'ultracart_api/models/file_manager_page_response'
|
385
386
|
require 'ultracart_api/models/file_manager_upload_request'
|
386
387
|
require 'ultracart_api/models/file_manager_upload_url_response'
|
387
388
|
require 'ultracart_api/models/fulfillment_inventory'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.70.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -434,6 +434,7 @@ files:
|
|
434
434
|
- docs/FileManagerDirectory.md
|
435
435
|
- docs/FileManagerFile.md
|
436
436
|
- docs/FileManagerPage.md
|
437
|
+
- docs/FileManagerPageResponse.md
|
437
438
|
- docs/FileManagerUploadRequest.md
|
438
439
|
- docs/FileManagerUploadUrlResponse.md
|
439
440
|
- docs/FulfillmentApi.md
|
@@ -1147,6 +1148,7 @@ files:
|
|
1147
1148
|
- lib/ultracart_api/models/file_manager_directory.rb
|
1148
1149
|
- lib/ultracart_api/models/file_manager_file.rb
|
1149
1150
|
- lib/ultracart_api/models/file_manager_page.rb
|
1151
|
+
- lib/ultracart_api/models/file_manager_page_response.rb
|
1150
1152
|
- lib/ultracart_api/models/file_manager_upload_request.rb
|
1151
1153
|
- lib/ultracart_api/models/file_manager_upload_url_response.rb
|
1152
1154
|
- lib/ultracart_api/models/fulfillment_inventory.rb
|