ultracart_api 4.1.184 → 4.1.185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/docs/SfvbApi.md +12 -12
- data/docs/SfvbLibraryHistoryResponse.md +18 -0
- data/docs/SfvbLibraryInstallsResponse.md +18 -0
- data/docs/SfvbLibraryShareTargetsResponse.md +18 -0
- data/lib/ultracart_api/api/sfvb_api.rb +9 -9
- data/lib/ultracart_api/models/sfvb_library_history_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_library_installs_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_library_share_targets_response.rb +222 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86b7a31c2fdb79ed422a7453170ecae04ef97d4a4837011901dcad91aa75f34f
|
|
4
|
+
data.tar.gz: ddc0dcab82f022fa9767b190b1c67038cbae1e40b04b86af7b39c4e832e3f7bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae9905c86955c3a0c66f6ce939af9d13fb8e63fba6eb35a476428ec9e58b2bd1979cace9a11e41c6f97a13c498b209414a1763bb2dd8e01e8a79ddc5902c5596
|
|
7
|
+
data.tar.gz: 714438367f915197c9de9cf3dbaa7606ad03113834ed635e6e67ee9d44c49fd8c2dea07a569a74033e4fb2a77757139e3108c9d734d53758f68a7f7b33c4c8d0
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
|
|
|
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.1.
|
|
10
|
+
- Package version: 4.1.185
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
- For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
|
|
16
16
|
gemfile:
|
|
17
17
|
|
|
18
18
|
```shell
|
|
19
|
-
gem 'ultracart_api', '4.1.
|
|
19
|
+
gem 'ultracart_api', '4.1.185'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -1880,16 +1880,19 @@ Class | Method | HTTP request | Description
|
|
|
1880
1880
|
- [UltracartClient::SfvbLibraryEntryRequest](docs/SfvbLibraryEntryRequest.md)
|
|
1881
1881
|
- [UltracartClient::SfvbLibraryFacet](docs/SfvbLibraryFacet.md)
|
|
1882
1882
|
- [UltracartClient::SfvbLibraryHistoryEntry](docs/SfvbLibraryHistoryEntry.md)
|
|
1883
|
+
- [UltracartClient::SfvbLibraryHistoryResponse](docs/SfvbLibraryHistoryResponse.md)
|
|
1883
1884
|
- [UltracartClient::SfvbLibraryInstallConflict](docs/SfvbLibraryInstallConflict.md)
|
|
1884
1885
|
- [UltracartClient::SfvbLibraryInstallReceipt](docs/SfvbLibraryInstallReceipt.md)
|
|
1885
1886
|
- [UltracartClient::SfvbLibraryInstallRecord](docs/SfvbLibraryInstallRecord.md)
|
|
1886
1887
|
- [UltracartClient::SfvbLibraryInstallRequest](docs/SfvbLibraryInstallRequest.md)
|
|
1888
|
+
- [UltracartClient::SfvbLibraryInstallsResponse](docs/SfvbLibraryInstallsResponse.md)
|
|
1887
1889
|
- [UltracartClient::SfvbLibraryParameter](docs/SfvbLibraryParameter.md)
|
|
1888
1890
|
- [UltracartClient::SfvbLibraryPublishRequest](docs/SfvbLibraryPublishRequest.md)
|
|
1889
1891
|
- [UltracartClient::SfvbLibraryResponse](docs/SfvbLibraryResponse.md)
|
|
1890
1892
|
- [UltracartClient::SfvbLibraryScreenshotRequest](docs/SfvbLibraryScreenshotRequest.md)
|
|
1891
1893
|
- [UltracartClient::SfvbLibraryShareRequest](docs/SfvbLibraryShareRequest.md)
|
|
1892
1894
|
- [UltracartClient::SfvbLibraryShareTarget](docs/SfvbLibraryShareTarget.md)
|
|
1895
|
+
- [UltracartClient::SfvbLibraryShareTargetsResponse](docs/SfvbLibraryShareTargetsResponse.md)
|
|
1893
1896
|
- [UltracartClient::SfvbLibraryTaxonomy](docs/SfvbLibraryTaxonomy.md)
|
|
1894
1897
|
- [UltracartClient::SfvbLibraryTaxonomyCatalog](docs/SfvbLibraryTaxonomyCatalog.md)
|
|
1895
1898
|
- [UltracartClient::SfvbLibraryUnshareResult](docs/SfvbLibraryUnshareResult.md)
|
|
@@ -2148,6 +2151,7 @@ Not every change is committed to every SDK.
|
|
|
2148
2151
|
|
|
2149
2152
|
| Version | Date | Comments |
|
|
2150
2153
|
| --: | :-: | --- |
|
|
2154
|
+
| 4.1.185 | 10/05/2026 | sfvb internal testing |
|
|
2151
2155
|
| 4.1.184 | 10/05/2026 | sfvb internal testing |
|
|
2152
2156
|
| 4.1.183 | 10/05/2026 | OrderApi rma endpoints |
|
|
2153
2157
|
| 4.1.182 | 10/02/2026 | sfvb internal testing |
|
data/docs/SfvbApi.md
CHANGED
|
@@ -2202,7 +2202,7 @@ end
|
|
|
2202
2202
|
|
|
2203
2203
|
## get_sfvb_library_history
|
|
2204
2204
|
|
|
2205
|
-
> <
|
|
2205
|
+
> <SfvbLibraryHistoryResponse> get_sfvb_library_history(storefront_oid, library_oid)
|
|
2206
2206
|
|
|
2207
2207
|
List a library entry's published revisions
|
|
2208
2208
|
|
|
@@ -2219,7 +2219,7 @@ Newest first, each with its release notes and hash. Read one with getSfvbLibrar
|
|
|
2219
2219
|
|
|
2220
2220
|
This returns an Array which contains the response data, status code and headers.
|
|
2221
2221
|
|
|
2222
|
-
> <Array(<
|
|
2222
|
+
> <Array(<SfvbLibraryHistoryResponse>, Integer, Hash)> get_sfvb_library_history_with_http_info(storefront_oid, library_oid)
|
|
2223
2223
|
|
|
2224
2224
|
```ruby
|
|
2225
2225
|
begin
|
|
@@ -2227,7 +2227,7 @@ begin
|
|
|
2227
2227
|
data, status_code, headers = api_instance.get_sfvb_library_history_with_http_info(storefront_oid, library_oid)
|
|
2228
2228
|
p status_code # => 2xx
|
|
2229
2229
|
p headers # => { ... }
|
|
2230
|
-
p data # => <
|
|
2230
|
+
p data # => <SfvbLibraryHistoryResponse>
|
|
2231
2231
|
rescue UltracartClient::ApiError => e
|
|
2232
2232
|
puts "Error when calling SfvbApi->get_sfvb_library_history_with_http_info: #{e}"
|
|
2233
2233
|
end
|
|
@@ -2242,7 +2242,7 @@ end
|
|
|
2242
2242
|
|
|
2243
2243
|
### Return type
|
|
2244
2244
|
|
|
2245
|
-
[**
|
|
2245
|
+
[**SfvbLibraryHistoryResponse**](SfvbLibraryHistoryResponse.md)
|
|
2246
2246
|
|
|
2247
2247
|
### Authorization
|
|
2248
2248
|
|
|
@@ -2256,7 +2256,7 @@ end
|
|
|
2256
2256
|
|
|
2257
2257
|
## get_sfvb_library_share_targets
|
|
2258
2258
|
|
|
2259
|
-
> <
|
|
2259
|
+
> <SfvbLibraryShareTargetsResponse> get_sfvb_library_share_targets(storefront_oid)
|
|
2260
2260
|
|
|
2261
2261
|
List the accounts a library entry can be shared with
|
|
2262
2262
|
|
|
@@ -2273,7 +2273,7 @@ The calling account's linked accounts, each with its merchant id and company. T
|
|
|
2273
2273
|
|
|
2274
2274
|
This returns an Array which contains the response data, status code and headers.
|
|
2275
2275
|
|
|
2276
|
-
> <Array(<
|
|
2276
|
+
> <Array(<SfvbLibraryShareTargetsResponse>, Integer, Hash)> get_sfvb_library_share_targets_with_http_info(storefront_oid)
|
|
2277
2277
|
|
|
2278
2278
|
```ruby
|
|
2279
2279
|
begin
|
|
@@ -2281,7 +2281,7 @@ begin
|
|
|
2281
2281
|
data, status_code, headers = api_instance.get_sfvb_library_share_targets_with_http_info(storefront_oid)
|
|
2282
2282
|
p status_code # => 2xx
|
|
2283
2283
|
p headers # => { ... }
|
|
2284
|
-
p data # => <
|
|
2284
|
+
p data # => <SfvbLibraryShareTargetsResponse>
|
|
2285
2285
|
rescue UltracartClient::ApiError => e
|
|
2286
2286
|
puts "Error when calling SfvbApi->get_sfvb_library_share_targets_with_http_info: #{e}"
|
|
2287
2287
|
end
|
|
@@ -2295,7 +2295,7 @@ end
|
|
|
2295
2295
|
|
|
2296
2296
|
### Return type
|
|
2297
2297
|
|
|
2298
|
-
[**
|
|
2298
|
+
[**SfvbLibraryShareTargetsResponse**](SfvbLibraryShareTargetsResponse.md)
|
|
2299
2299
|
|
|
2300
2300
|
### Authorization
|
|
2301
2301
|
|
|
@@ -4047,7 +4047,7 @@ end
|
|
|
4047
4047
|
|
|
4048
4048
|
## list_sfvb_library_installs
|
|
4049
4049
|
|
|
4050
|
-
> <
|
|
4050
|
+
> <SfvbLibraryInstallsResponse> list_sfvb_library_installs(storefront_oid)
|
|
4051
4051
|
|
|
4052
4052
|
List the library entries installed on a storefront
|
|
4053
4053
|
|
|
@@ -4064,7 +4064,7 @@ Each entry's most recently installed revision, its latest published revision and
|
|
|
4064
4064
|
|
|
4065
4065
|
This returns an Array which contains the response data, status code and headers.
|
|
4066
4066
|
|
|
4067
|
-
> <Array(<
|
|
4067
|
+
> <Array(<SfvbLibraryInstallsResponse>, Integer, Hash)> list_sfvb_library_installs_with_http_info(storefront_oid)
|
|
4068
4068
|
|
|
4069
4069
|
```ruby
|
|
4070
4070
|
begin
|
|
@@ -4072,7 +4072,7 @@ begin
|
|
|
4072
4072
|
data, status_code, headers = api_instance.list_sfvb_library_installs_with_http_info(storefront_oid)
|
|
4073
4073
|
p status_code # => 2xx
|
|
4074
4074
|
p headers # => { ... }
|
|
4075
|
-
p data # => <
|
|
4075
|
+
p data # => <SfvbLibraryInstallsResponse>
|
|
4076
4076
|
rescue UltracartClient::ApiError => e
|
|
4077
4077
|
puts "Error when calling SfvbApi->list_sfvb_library_installs_with_http_info: #{e}"
|
|
4078
4078
|
end
|
|
@@ -4086,7 +4086,7 @@ end
|
|
|
4086
4086
|
|
|
4087
4087
|
### Return type
|
|
4088
4088
|
|
|
4089
|
-
[**
|
|
4089
|
+
[**SfvbLibraryInstallsResponse**](SfvbLibraryInstallsResponse.md)
|
|
4090
4090
|
|
|
4091
4091
|
### Authorization
|
|
4092
4092
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UltracartClient::SfvbLibraryHistoryResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **revisions** | [**Array<SfvbLibraryHistoryEntry>**](SfvbLibraryHistoryEntry.md) | The published revisions, newest first. | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ultracart_api'
|
|
13
|
+
|
|
14
|
+
instance = UltracartClient::SfvbLibraryHistoryResponse.new(
|
|
15
|
+
revisions: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UltracartClient::SfvbLibraryInstallsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **installs** | [**Array<SfvbLibraryInstallRecord>**](SfvbLibraryInstallRecord.md) | The newest install of each entry on the storefront. | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ultracart_api'
|
|
13
|
+
|
|
14
|
+
instance = UltracartClient::SfvbLibraryInstallsResponse.new(
|
|
15
|
+
installs: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UltracartClient::SfvbLibraryShareTargetsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **share_targets** | [**Array<SfvbLibraryShareTarget>**](SfvbLibraryShareTarget.md) | The calling account's linked accounts, each with its merchant id and company. | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ultracart_api'
|
|
13
|
+
|
|
14
|
+
instance = UltracartClient::SfvbLibraryShareTargetsResponse.new(
|
|
15
|
+
share_targets: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -2819,7 +2819,7 @@ module UltracartClient
|
|
|
2819
2819
|
# @param storefront_oid [Integer]
|
|
2820
2820
|
# @param library_oid [Integer]
|
|
2821
2821
|
# @param [Hash] opts the optional parameters
|
|
2822
|
-
# @return [
|
|
2822
|
+
# @return [SfvbLibraryHistoryResponse]
|
|
2823
2823
|
def get_sfvb_library_history(storefront_oid, library_oid, opts = {})
|
|
2824
2824
|
data, _status_code, _headers = get_sfvb_library_history_with_http_info(storefront_oid, library_oid, opts)
|
|
2825
2825
|
data
|
|
@@ -2830,7 +2830,7 @@ module UltracartClient
|
|
|
2830
2830
|
# @param storefront_oid [Integer]
|
|
2831
2831
|
# @param library_oid [Integer]
|
|
2832
2832
|
# @param [Hash] opts the optional parameters
|
|
2833
|
-
# @return [Array<(
|
|
2833
|
+
# @return [Array<(SfvbLibraryHistoryResponse, Integer, Hash)>] SfvbLibraryHistoryResponse data, response status code and response headers
|
|
2834
2834
|
def get_sfvb_library_history_with_http_info(storefront_oid, library_oid, opts = {})
|
|
2835
2835
|
if @api_client.config.debugging
|
|
2836
2836
|
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_library_history ...'
|
|
@@ -2862,7 +2862,7 @@ module UltracartClient
|
|
|
2862
2862
|
post_body = opts[:debug_body]
|
|
2863
2863
|
|
|
2864
2864
|
# return_type
|
|
2865
|
-
return_type = opts[:debug_return_type] || '
|
|
2865
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryHistoryResponse'
|
|
2866
2866
|
|
|
2867
2867
|
# auth_names
|
|
2868
2868
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
@@ -2888,7 +2888,7 @@ module UltracartClient
|
|
|
2888
2888
|
# The calling account's linked accounts, each with its merchant id and company. These are the only merchants a share can name.
|
|
2889
2889
|
# @param storefront_oid [Integer]
|
|
2890
2890
|
# @param [Hash] opts the optional parameters
|
|
2891
|
-
# @return [
|
|
2891
|
+
# @return [SfvbLibraryShareTargetsResponse]
|
|
2892
2892
|
def get_sfvb_library_share_targets(storefront_oid, opts = {})
|
|
2893
2893
|
data, _status_code, _headers = get_sfvb_library_share_targets_with_http_info(storefront_oid, opts)
|
|
2894
2894
|
data
|
|
@@ -2898,7 +2898,7 @@ module UltracartClient
|
|
|
2898
2898
|
# The calling account's linked accounts, each with its merchant id and company. These are the only merchants a share can name.
|
|
2899
2899
|
# @param storefront_oid [Integer]
|
|
2900
2900
|
# @param [Hash] opts the optional parameters
|
|
2901
|
-
# @return [Array<(
|
|
2901
|
+
# @return [Array<(SfvbLibraryShareTargetsResponse, Integer, Hash)>] SfvbLibraryShareTargetsResponse data, response status code and response headers
|
|
2902
2902
|
def get_sfvb_library_share_targets_with_http_info(storefront_oid, opts = {})
|
|
2903
2903
|
if @api_client.config.debugging
|
|
2904
2904
|
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_library_share_targets ...'
|
|
@@ -2926,7 +2926,7 @@ module UltracartClient
|
|
|
2926
2926
|
post_body = opts[:debug_body]
|
|
2927
2927
|
|
|
2928
2928
|
# return_type
|
|
2929
|
-
return_type = opts[:debug_return_type] || '
|
|
2929
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryShareTargetsResponse'
|
|
2930
2930
|
|
|
2931
2931
|
# auth_names
|
|
2932
2932
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
@@ -5218,7 +5218,7 @@ module UltracartClient
|
|
|
5218
5218
|
# Each entry's most recently installed revision, its latest published revision and update_available. Nothing updates automatically. An entry this account can no longer see is listed without its name.
|
|
5219
5219
|
# @param storefront_oid [Integer]
|
|
5220
5220
|
# @param [Hash] opts the optional parameters
|
|
5221
|
-
# @return [
|
|
5221
|
+
# @return [SfvbLibraryInstallsResponse]
|
|
5222
5222
|
def list_sfvb_library_installs(storefront_oid, opts = {})
|
|
5223
5223
|
data, _status_code, _headers = list_sfvb_library_installs_with_http_info(storefront_oid, opts)
|
|
5224
5224
|
data
|
|
@@ -5228,7 +5228,7 @@ module UltracartClient
|
|
|
5228
5228
|
# Each entry's most recently installed revision, its latest published revision and update_available. Nothing updates automatically. An entry this account can no longer see is listed without its name.
|
|
5229
5229
|
# @param storefront_oid [Integer]
|
|
5230
5230
|
# @param [Hash] opts the optional parameters
|
|
5231
|
-
# @return [Array<(
|
|
5231
|
+
# @return [Array<(SfvbLibraryInstallsResponse, Integer, Hash)>] SfvbLibraryInstallsResponse data, response status code and response headers
|
|
5232
5232
|
def list_sfvb_library_installs_with_http_info(storefront_oid, opts = {})
|
|
5233
5233
|
if @api_client.config.debugging
|
|
5234
5234
|
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_library_installs ...'
|
|
@@ -5256,7 +5256,7 @@ module UltracartClient
|
|
|
5256
5256
|
post_body = opts[:debug_body]
|
|
5257
5257
|
|
|
5258
5258
|
# return_type
|
|
5259
|
-
return_type = opts[:debug_return_type] || '
|
|
5259
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryInstallsResponse'
|
|
5260
5260
|
|
|
5261
5261
|
# auth_names
|
|
5262
5262
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
@@ -0,0 +1,222 @@
|
|
|
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 SfvbLibraryHistoryResponse
|
|
18
|
+
# The published revisions, newest first.
|
|
19
|
+
attr_accessor :revisions
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'revisions' => :'revisions'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
|
29
|
+
def self.acceptable_attributes
|
|
30
|
+
attribute_map.values
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.openapi_types
|
|
35
|
+
{
|
|
36
|
+
:'revisions' => :'Array<SfvbLibraryHistoryEntry>'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# List of attributes with nullable: true
|
|
41
|
+
def self.openapi_nullable
|
|
42
|
+
Set.new([
|
|
43
|
+
])
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Initializes the object
|
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
if (!attributes.is_a?(Hash))
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryHistoryResponse` initialize method"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryHistoryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
57
|
+
end
|
|
58
|
+
h[k.to_sym] = v
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if attributes.key?(:'revisions')
|
|
62
|
+
if (value = attributes[:'revisions']).is_a?(Array)
|
|
63
|
+
self.revisions = value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
|
+
# @return Array for valid properties with the reasons
|
|
70
|
+
def list_invalid_properties
|
|
71
|
+
invalid_properties = Array.new
|
|
72
|
+
invalid_properties
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Check to see if the all the properties in the model are valid
|
|
76
|
+
# @return true if the model is valid
|
|
77
|
+
def valid?
|
|
78
|
+
true
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Checks equality by comparing each attribute.
|
|
82
|
+
# @param [Object] Object to be compared
|
|
83
|
+
def ==(o)
|
|
84
|
+
return true if self.equal?(o)
|
|
85
|
+
self.class == o.class &&
|
|
86
|
+
revisions == o.revisions
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @see the `==` method
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def eql?(o)
|
|
92
|
+
self == o
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Calculates hash code according to all attributes.
|
|
96
|
+
# @return [Integer] Hash code
|
|
97
|
+
def hash
|
|
98
|
+
[revisions].hash
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Builds the object from hash
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
# @return [Object] Returns the model itself
|
|
104
|
+
def self.build_from_hash(attributes)
|
|
105
|
+
new.build_from_hash(attributes)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
115
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
116
|
+
self.send("#{key}=", nil)
|
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
self
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Deserializes the data based on type
|
|
132
|
+
# @param string type Data type
|
|
133
|
+
# @param string value Value to be deserialized
|
|
134
|
+
# @return [Object] Deserialized data
|
|
135
|
+
def _deserialize(type, value)
|
|
136
|
+
case type.to_sym
|
|
137
|
+
when :Time
|
|
138
|
+
Time.parse(value)
|
|
139
|
+
when :Date
|
|
140
|
+
Date.parse(value)
|
|
141
|
+
when :String
|
|
142
|
+
value.to_s
|
|
143
|
+
when :Integer
|
|
144
|
+
value.to_i
|
|
145
|
+
when :Float
|
|
146
|
+
value.to_f
|
|
147
|
+
when :Boolean
|
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
+
true
|
|
150
|
+
else
|
|
151
|
+
false
|
|
152
|
+
end
|
|
153
|
+
when :Object
|
|
154
|
+
# generic object (usually a Hash), return directly
|
|
155
|
+
value
|
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
|
162
|
+
{}.tap do |hash|
|
|
163
|
+
value.each do |k, v|
|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
else # model
|
|
168
|
+
# models (e.g. Pet) or oneOf
|
|
169
|
+
klass = UltracartClient.const_get(type)
|
|
170
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the string representation of the object
|
|
175
|
+
# @return [String] String presentation of the object
|
|
176
|
+
def to_s
|
|
177
|
+
to_hash.to_s
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_body
|
|
183
|
+
to_hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
191
|
+
value = self.send(attr)
|
|
192
|
+
if value.nil?
|
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Outputs non-array value in the form of hash
|
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
204
|
+
# @param [Object] value Any valid value
|
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
|
206
|
+
def _to_hash(value)
|
|
207
|
+
if value.is_a?(Array)
|
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
|
209
|
+
elsif value.is_a?(Hash)
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
212
|
+
end
|
|
213
|
+
elsif value.respond_to? :to_hash
|
|
214
|
+
value.to_hash
|
|
215
|
+
else
|
|
216
|
+
value
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
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 SfvbLibraryInstallsResponse
|
|
18
|
+
# The newest install of each entry on the storefront.
|
|
19
|
+
attr_accessor :installs
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'installs' => :'installs'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
|
29
|
+
def self.acceptable_attributes
|
|
30
|
+
attribute_map.values
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.openapi_types
|
|
35
|
+
{
|
|
36
|
+
:'installs' => :'Array<SfvbLibraryInstallRecord>'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# List of attributes with nullable: true
|
|
41
|
+
def self.openapi_nullable
|
|
42
|
+
Set.new([
|
|
43
|
+
])
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Initializes the object
|
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
if (!attributes.is_a?(Hash))
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryInstallsResponse` initialize method"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryInstallsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
57
|
+
end
|
|
58
|
+
h[k.to_sym] = v
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if attributes.key?(:'installs')
|
|
62
|
+
if (value = attributes[:'installs']).is_a?(Array)
|
|
63
|
+
self.installs = value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
|
+
# @return Array for valid properties with the reasons
|
|
70
|
+
def list_invalid_properties
|
|
71
|
+
invalid_properties = Array.new
|
|
72
|
+
invalid_properties
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Check to see if the all the properties in the model are valid
|
|
76
|
+
# @return true if the model is valid
|
|
77
|
+
def valid?
|
|
78
|
+
true
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Checks equality by comparing each attribute.
|
|
82
|
+
# @param [Object] Object to be compared
|
|
83
|
+
def ==(o)
|
|
84
|
+
return true if self.equal?(o)
|
|
85
|
+
self.class == o.class &&
|
|
86
|
+
installs == o.installs
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @see the `==` method
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def eql?(o)
|
|
92
|
+
self == o
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Calculates hash code according to all attributes.
|
|
96
|
+
# @return [Integer] Hash code
|
|
97
|
+
def hash
|
|
98
|
+
[installs].hash
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Builds the object from hash
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
# @return [Object] Returns the model itself
|
|
104
|
+
def self.build_from_hash(attributes)
|
|
105
|
+
new.build_from_hash(attributes)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
115
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
116
|
+
self.send("#{key}=", nil)
|
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
self
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Deserializes the data based on type
|
|
132
|
+
# @param string type Data type
|
|
133
|
+
# @param string value Value to be deserialized
|
|
134
|
+
# @return [Object] Deserialized data
|
|
135
|
+
def _deserialize(type, value)
|
|
136
|
+
case type.to_sym
|
|
137
|
+
when :Time
|
|
138
|
+
Time.parse(value)
|
|
139
|
+
when :Date
|
|
140
|
+
Date.parse(value)
|
|
141
|
+
when :String
|
|
142
|
+
value.to_s
|
|
143
|
+
when :Integer
|
|
144
|
+
value.to_i
|
|
145
|
+
when :Float
|
|
146
|
+
value.to_f
|
|
147
|
+
when :Boolean
|
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
+
true
|
|
150
|
+
else
|
|
151
|
+
false
|
|
152
|
+
end
|
|
153
|
+
when :Object
|
|
154
|
+
# generic object (usually a Hash), return directly
|
|
155
|
+
value
|
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
|
162
|
+
{}.tap do |hash|
|
|
163
|
+
value.each do |k, v|
|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
else # model
|
|
168
|
+
# models (e.g. Pet) or oneOf
|
|
169
|
+
klass = UltracartClient.const_get(type)
|
|
170
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the string representation of the object
|
|
175
|
+
# @return [String] String presentation of the object
|
|
176
|
+
def to_s
|
|
177
|
+
to_hash.to_s
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_body
|
|
183
|
+
to_hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
191
|
+
value = self.send(attr)
|
|
192
|
+
if value.nil?
|
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Outputs non-array value in the form of hash
|
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
204
|
+
# @param [Object] value Any valid value
|
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
|
206
|
+
def _to_hash(value)
|
|
207
|
+
if value.is_a?(Array)
|
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
|
209
|
+
elsif value.is_a?(Hash)
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
212
|
+
end
|
|
213
|
+
elsif value.respond_to? :to_hash
|
|
214
|
+
value.to_hash
|
|
215
|
+
else
|
|
216
|
+
value
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
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 SfvbLibraryShareTargetsResponse
|
|
18
|
+
# The calling account's linked accounts, each with its merchant id and company.
|
|
19
|
+
attr_accessor :share_targets
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'share_targets' => :'share_targets'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
|
29
|
+
def self.acceptable_attributes
|
|
30
|
+
attribute_map.values
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.openapi_types
|
|
35
|
+
{
|
|
36
|
+
:'share_targets' => :'Array<SfvbLibraryShareTarget>'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# List of attributes with nullable: true
|
|
41
|
+
def self.openapi_nullable
|
|
42
|
+
Set.new([
|
|
43
|
+
])
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Initializes the object
|
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
if (!attributes.is_a?(Hash))
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryShareTargetsResponse` initialize method"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryShareTargetsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
57
|
+
end
|
|
58
|
+
h[k.to_sym] = v
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if attributes.key?(:'share_targets')
|
|
62
|
+
if (value = attributes[:'share_targets']).is_a?(Array)
|
|
63
|
+
self.share_targets = value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
|
+
# @return Array for valid properties with the reasons
|
|
70
|
+
def list_invalid_properties
|
|
71
|
+
invalid_properties = Array.new
|
|
72
|
+
invalid_properties
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Check to see if the all the properties in the model are valid
|
|
76
|
+
# @return true if the model is valid
|
|
77
|
+
def valid?
|
|
78
|
+
true
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Checks equality by comparing each attribute.
|
|
82
|
+
# @param [Object] Object to be compared
|
|
83
|
+
def ==(o)
|
|
84
|
+
return true if self.equal?(o)
|
|
85
|
+
self.class == o.class &&
|
|
86
|
+
share_targets == o.share_targets
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @see the `==` method
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def eql?(o)
|
|
92
|
+
self == o
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Calculates hash code according to all attributes.
|
|
96
|
+
# @return [Integer] Hash code
|
|
97
|
+
def hash
|
|
98
|
+
[share_targets].hash
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Builds the object from hash
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
# @return [Object] Returns the model itself
|
|
104
|
+
def self.build_from_hash(attributes)
|
|
105
|
+
new.build_from_hash(attributes)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
115
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
116
|
+
self.send("#{key}=", nil)
|
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
self
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Deserializes the data based on type
|
|
132
|
+
# @param string type Data type
|
|
133
|
+
# @param string value Value to be deserialized
|
|
134
|
+
# @return [Object] Deserialized data
|
|
135
|
+
def _deserialize(type, value)
|
|
136
|
+
case type.to_sym
|
|
137
|
+
when :Time
|
|
138
|
+
Time.parse(value)
|
|
139
|
+
when :Date
|
|
140
|
+
Date.parse(value)
|
|
141
|
+
when :String
|
|
142
|
+
value.to_s
|
|
143
|
+
when :Integer
|
|
144
|
+
value.to_i
|
|
145
|
+
when :Float
|
|
146
|
+
value.to_f
|
|
147
|
+
when :Boolean
|
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
+
true
|
|
150
|
+
else
|
|
151
|
+
false
|
|
152
|
+
end
|
|
153
|
+
when :Object
|
|
154
|
+
# generic object (usually a Hash), return directly
|
|
155
|
+
value
|
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
|
162
|
+
{}.tap do |hash|
|
|
163
|
+
value.each do |k, v|
|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
else # model
|
|
168
|
+
# models (e.g. Pet) or oneOf
|
|
169
|
+
klass = UltracartClient.const_get(type)
|
|
170
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the string representation of the object
|
|
175
|
+
# @return [String] String presentation of the object
|
|
176
|
+
def to_s
|
|
177
|
+
to_hash.to_s
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_body
|
|
183
|
+
to_hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
191
|
+
value = self.send(attr)
|
|
192
|
+
if value.nil?
|
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Outputs non-array value in the form of hash
|
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
204
|
+
# @param [Object] value Any valid value
|
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
|
206
|
+
def _to_hash(value)
|
|
207
|
+
if value.is_a?(Array)
|
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
|
209
|
+
elsif value.is_a?(Hash)
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
212
|
+
end
|
|
213
|
+
elsif value.respond_to? :to_hash
|
|
214
|
+
value.to_hash
|
|
215
|
+
else
|
|
216
|
+
value
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1039,16 +1039,19 @@ require 'ultracart_api/models/sfvb_library_entry'
|
|
|
1039
1039
|
require 'ultracart_api/models/sfvb_library_entry_request'
|
|
1040
1040
|
require 'ultracart_api/models/sfvb_library_facet'
|
|
1041
1041
|
require 'ultracart_api/models/sfvb_library_history_entry'
|
|
1042
|
+
require 'ultracart_api/models/sfvb_library_history_response'
|
|
1042
1043
|
require 'ultracart_api/models/sfvb_library_install_conflict'
|
|
1043
1044
|
require 'ultracart_api/models/sfvb_library_install_receipt'
|
|
1044
1045
|
require 'ultracart_api/models/sfvb_library_install_record'
|
|
1045
1046
|
require 'ultracart_api/models/sfvb_library_install_request'
|
|
1047
|
+
require 'ultracart_api/models/sfvb_library_installs_response'
|
|
1046
1048
|
require 'ultracart_api/models/sfvb_library_parameter'
|
|
1047
1049
|
require 'ultracart_api/models/sfvb_library_publish_request'
|
|
1048
1050
|
require 'ultracart_api/models/sfvb_library_response'
|
|
1049
1051
|
require 'ultracart_api/models/sfvb_library_screenshot_request'
|
|
1050
1052
|
require 'ultracart_api/models/sfvb_library_share_request'
|
|
1051
1053
|
require 'ultracart_api/models/sfvb_library_share_target'
|
|
1054
|
+
require 'ultracart_api/models/sfvb_library_share_targets_response'
|
|
1052
1055
|
require 'ultracart_api/models/sfvb_library_taxonomy'
|
|
1053
1056
|
require 'ultracart_api/models/sfvb_library_taxonomy_catalog'
|
|
1054
1057
|
require 'ultracart_api/models/sfvb_library_unshare_result'
|
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.1.
|
|
4
|
+
version: 4.1.185
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
@@ -1101,16 +1101,19 @@ files:
|
|
|
1101
1101
|
- docs/SfvbLibraryEntryRequest.md
|
|
1102
1102
|
- docs/SfvbLibraryFacet.md
|
|
1103
1103
|
- docs/SfvbLibraryHistoryEntry.md
|
|
1104
|
+
- docs/SfvbLibraryHistoryResponse.md
|
|
1104
1105
|
- docs/SfvbLibraryInstallConflict.md
|
|
1105
1106
|
- docs/SfvbLibraryInstallReceipt.md
|
|
1106
1107
|
- docs/SfvbLibraryInstallRecord.md
|
|
1107
1108
|
- docs/SfvbLibraryInstallRequest.md
|
|
1109
|
+
- docs/SfvbLibraryInstallsResponse.md
|
|
1108
1110
|
- docs/SfvbLibraryParameter.md
|
|
1109
1111
|
- docs/SfvbLibraryPublishRequest.md
|
|
1110
1112
|
- docs/SfvbLibraryResponse.md
|
|
1111
1113
|
- docs/SfvbLibraryScreenshotRequest.md
|
|
1112
1114
|
- docs/SfvbLibraryShareRequest.md
|
|
1113
1115
|
- docs/SfvbLibraryShareTarget.md
|
|
1116
|
+
- docs/SfvbLibraryShareTargetsResponse.md
|
|
1114
1117
|
- docs/SfvbLibraryTaxonomy.md
|
|
1115
1118
|
- docs/SfvbLibraryTaxonomyCatalog.md
|
|
1116
1119
|
- docs/SfvbLibraryUnshareResult.md
|
|
@@ -2349,16 +2352,19 @@ files:
|
|
|
2349
2352
|
- lib/ultracart_api/models/sfvb_library_entry_request.rb
|
|
2350
2353
|
- lib/ultracart_api/models/sfvb_library_facet.rb
|
|
2351
2354
|
- lib/ultracart_api/models/sfvb_library_history_entry.rb
|
|
2355
|
+
- lib/ultracart_api/models/sfvb_library_history_response.rb
|
|
2352
2356
|
- lib/ultracart_api/models/sfvb_library_install_conflict.rb
|
|
2353
2357
|
- lib/ultracart_api/models/sfvb_library_install_receipt.rb
|
|
2354
2358
|
- lib/ultracart_api/models/sfvb_library_install_record.rb
|
|
2355
2359
|
- lib/ultracart_api/models/sfvb_library_install_request.rb
|
|
2360
|
+
- lib/ultracart_api/models/sfvb_library_installs_response.rb
|
|
2356
2361
|
- lib/ultracart_api/models/sfvb_library_parameter.rb
|
|
2357
2362
|
- lib/ultracart_api/models/sfvb_library_publish_request.rb
|
|
2358
2363
|
- lib/ultracart_api/models/sfvb_library_response.rb
|
|
2359
2364
|
- lib/ultracart_api/models/sfvb_library_screenshot_request.rb
|
|
2360
2365
|
- lib/ultracart_api/models/sfvb_library_share_request.rb
|
|
2361
2366
|
- lib/ultracart_api/models/sfvb_library_share_target.rb
|
|
2367
|
+
- lib/ultracart_api/models/sfvb_library_share_targets_response.rb
|
|
2362
2368
|
- lib/ultracart_api/models/sfvb_library_taxonomy.rb
|
|
2363
2369
|
- lib/ultracart_api/models/sfvb_library_taxonomy_catalog.rb
|
|
2364
2370
|
- lib/ultracart_api/models/sfvb_library_unshare_result.rb
|