ultracart_api 4.1.193 → 4.1.194

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2746f6887e79a5ae712a950742d58cbb9adbfc525618161d2523ea68ef5002b2
4
- data.tar.gz: 355b7dc3186976bdb8399cd3c36613353566aa3f91e1f39ee1d226518e9a80ff
3
+ metadata.gz: 42f4b0cfc0d0a4f66e2a7e4bffc823ce3db7f195b559243315210ae29900eecf
4
+ data.tar.gz: 926d6c4a61195e52b52c77141ae5842e047a9f3c3a706999f7ba6cc93a2be0a4
5
5
  SHA512:
6
- metadata.gz: c371945e7fc7d9e07f94592ce0280d8b892985d55d33a4f49782b160ea746f77d38524aa7e89dfeb69197ae1025c979db77dfc50f7d44020f0f13eb69df65f01
7
- data.tar.gz: 4e2ff55047da422e7de42c4ba475fe91db6a2598edb2082c8ca944f23cd7bf697190e4f75c580c00700a53b5d53a8ebb0b955302f60b431e11cc4e0fcece618d
6
+ metadata.gz: c60e76083d0e0de5c607542a62393954fe5beb5874adffdf2ad68ad2d9115948ed1b158515c57a34dc18acddc8285ee5eccf2b711681f0f2c7c25669addfa28d
7
+ data.tar.gz: 4f4df89e74e81523bd49d89e144f1687d4370986f1e3b86fb20c8c93fe6cca199e99558990a4e6fc0abde0137c72e8d43f417506df260675767127eedd9f0fe0
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.193
10
+ - Package version: 4.1.194
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.193'
19
+ gem 'ultracart_api', '4.1.194'
20
20
  ```
21
21
 
22
22
  install:
@@ -544,6 +544,7 @@ Class | Method | HTTP request | Description
544
544
  *UltracartClient::SfvbApi* | [**get_sfvb_redirects**](docs/SfvbApi.md#get_sfvb_redirects) | **GET** /sfvb/storefronts/{storefront_oid}/redirects | List the storefront's redirect rules
545
545
  *UltracartClient::SfvbApi* | [**get_sfvb_server_log**](docs/SfvbApi.md#get_sfvb_server_log) | **GET** /sfvb/storefronts/{storefront_oid}/logs/{log_id} | Get one storefront render log
546
546
  *UltracartClient::SfvbApi* | [**get_sfvb_site_attributes**](docs/SfvbApi.md#get_sfvb_site_attributes) | **GET** /sfvb/storefronts/{storefront_oid}/attributes | Read a storefront's site attributes
547
+ *UltracartClient::SfvbApi* | [**get_sfvb_test_orders**](docs/SfvbApi.md#get_sfvb_test_orders) | **GET** /sfvb/storefronts/{storefront_oid}/test_orders | List recent test orders
547
548
  *UltracartClient::SfvbApi* | [**get_sfvb_theme**](docs/SfvbApi.md#get_sfvb_theme) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid} | Get a theme
548
549
  *UltracartClient::SfvbApi* | [**get_sfvb_theme_attributes**](docs/SfvbApi.md#get_sfvb_theme_attributes) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes | Read a theme's colors, fonts and settings
549
550
  *UltracartClient::SfvbApi* | [**get_sfvb_theme_job**](docs/SfvbApi.md#get_sfvb_theme_job) | **GET** /sfvb/storefronts/{storefront_oid}/theme_jobs/{job_id} | Status of an asynchronous theme job
@@ -2009,6 +2010,8 @@ Class | Method | HTTP request | Description
2009
2010
  - [UltracartClient::SfvbTemplateResolvePath](docs/SfvbTemplateResolvePath.md)
2010
2011
  - [UltracartClient::SfvbTemplateResolveResponse](docs/SfvbTemplateResolveResponse.md)
2011
2012
  - [UltracartClient::SfvbTemplatesResponse](docs/SfvbTemplatesResponse.md)
2013
+ - [UltracartClient::SfvbTestOrder](docs/SfvbTestOrder.md)
2014
+ - [UltracartClient::SfvbTestOrdersResponse](docs/SfvbTestOrdersResponse.md)
2012
2015
  - [UltracartClient::SfvbTheme](docs/SfvbTheme.md)
2013
2016
  - [UltracartClient::SfvbThemeAttribute](docs/SfvbThemeAttribute.md)
2014
2017
  - [UltracartClient::SfvbThemeAttributeUpdate](docs/SfvbThemeAttributeUpdate.md)
@@ -2207,6 +2210,7 @@ Not every change is committed to every SDK.
2207
2210
 
2208
2211
  | Version | Date | Comments |
2209
2212
  | --: | :-: | --- |
2213
+ | 4.1.194 | 10/07/2026 | sfvb internal testing |
2210
2214
  | 4.1.193 | 10/06/2026 | sfvb internal testing |
2211
2215
  | 4.1.192 | 10/06/2026 | sfvb internal testing |
2212
2216
  | 4.1.191 | 10/06/2026 | sfvb internal testing |
data/docs/SfvbApi.md CHANGED
@@ -72,6 +72,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
72
72
  | [**get_sfvb_redirects**](SfvbApi.md#get_sfvb_redirects) | **GET** /sfvb/storefronts/{storefront_oid}/redirects | List the storefront's redirect rules |
73
73
  | [**get_sfvb_server_log**](SfvbApi.md#get_sfvb_server_log) | **GET** /sfvb/storefronts/{storefront_oid}/logs/{log_id} | Get one storefront render log |
74
74
  | [**get_sfvb_site_attributes**](SfvbApi.md#get_sfvb_site_attributes) | **GET** /sfvb/storefronts/{storefront_oid}/attributes | Read a storefront's site attributes |
75
+ | [**get_sfvb_test_orders**](SfvbApi.md#get_sfvb_test_orders) | **GET** /sfvb/storefronts/{storefront_oid}/test_orders | List recent test orders |
75
76
  | [**get_sfvb_theme**](SfvbApi.md#get_sfvb_theme) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid} | Get a theme |
76
77
  | [**get_sfvb_theme_attributes**](SfvbApi.md#get_sfvb_theme_attributes) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes | Read a theme's colors, fonts and settings |
77
78
  | [**get_sfvb_theme_job**](SfvbApi.md#get_sfvb_theme_job) | **GET** /sfvb/storefronts/{storefront_oid}/theme_jobs/{job_id} | Status of an asynchronous theme job |
@@ -3856,6 +3857,62 @@ end
3856
3857
  - **Accept**: application/json
3857
3858
 
3858
3859
 
3860
+ ## get_sfvb_test_orders
3861
+
3862
+ > <SfvbTestOrdersResponse> get_sfvb_test_orders(storefront_oid, opts)
3863
+
3864
+ List recent test orders
3865
+
3866
+ Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render's context_order_id; a real customer's order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
3867
+
3868
+
3869
+ ### Examples
3870
+
3871
+
3872
+ (No example for this operation).
3873
+
3874
+
3875
+ #### Using the get_sfvb_test_orders_with_http_info variant
3876
+
3877
+ This returns an Array which contains the response data, status code and headers.
3878
+
3879
+ > <Array(<SfvbTestOrdersResponse>, Integer, Hash)> get_sfvb_test_orders_with_http_info(storefront_oid, opts)
3880
+
3881
+ ```ruby
3882
+ begin
3883
+ # List recent test orders
3884
+ data, status_code, headers = api_instance.get_sfvb_test_orders_with_http_info(storefront_oid, opts)
3885
+ p status_code # => 2xx
3886
+ p headers # => { ... }
3887
+ p data # => <SfvbTestOrdersResponse>
3888
+ rescue UltracartClient::ApiError => e
3889
+ puts "Error when calling SfvbApi->get_sfvb_test_orders_with_http_info: #{e}"
3890
+ end
3891
+ ```
3892
+
3893
+ ### Parameters
3894
+
3895
+ | Name | Type | Description | Notes |
3896
+ | ---- | ---- | ----------- | ----- |
3897
+ | **storefront_oid** | **Integer** | | |
3898
+ | **limit** | **Integer** | | [optional] |
3899
+ | **digital_items** | **Boolean** | | [optional] |
3900
+ | **auto_order** | **Boolean** | | [optional] |
3901
+
3902
+ ### Return type
3903
+
3904
+ [**SfvbTestOrdersResponse**](SfvbTestOrdersResponse.md)
3905
+
3906
+ ### Authorization
3907
+
3908
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
3909
+
3910
+ ### HTTP request headers
3911
+
3912
+ - **Content-Type**: Not defined
3913
+ - **Accept**: application/json
3914
+
3915
+
3859
3916
  ## get_sfvb_theme
3860
3917
 
3861
3918
  > <SfvbTheme> get_sfvb_theme(storefront_oid, theme_oid)
@@ -0,0 +1,34 @@
1
+ # UltracartClient::SfvbTestOrder
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **auto_order** | **Boolean** | True when the order started an auto order, for working on the subscription pages. | [optional] |
8
+ | **created** | **String** | When the order was placed, ISO-8601 in UTC. | [optional] |
9
+ | **currency_code** | **String** | The currency of the total. | [optional] |
10
+ | **digital_items** | **Boolean** | True when the order has digital downloads, for working on the digital download page. | [optional] |
11
+ | **item_count** | **Integer** | How many item lines the order has. | [optional] |
12
+ | **order_id** | **String** | The order id. Pass it as a render&#39;s context_order_id. | [optional] |
13
+ | **payment_method** | **String** | How the order was paid, such as Credit Card or PayPal. | [optional] |
14
+ | **stage** | **String** | The order&#39;s current stage code, such as CO (completed), SD (shipping department) or AR (accounts receivable). | [optional] |
15
+ | **total** | **String** | The order total as a decimal string. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ultracart_api'
21
+
22
+ instance = UltracartClient::SfvbTestOrder.new(
23
+ auto_order: null,
24
+ created: null,
25
+ currency_code: null,
26
+ digital_items: null,
27
+ item_count: null,
28
+ order_id: null,
29
+ payment_method: null,
30
+ stage: null,
31
+ total: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,22 @@
1
+ # UltracartClient::SfvbTestOrdersResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **hint** | **String** | Present when nothing matched. Says how to place a test order. | [optional] |
8
+ | **searched_days** | **Integer** | How many days back were searched, 7, 30 or 90, widening until enough test orders were found. | [optional] |
9
+ | **test_orders** | [**Array&lt;SfvbTestOrder&gt;**](SfvbTestOrder.md) | Test orders, newest first. Only orders marked as test orders are ever listed. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::SfvbTestOrdersResponse.new(
17
+ hint: null,
18
+ searched_days: null,
19
+ test_orders: null
20
+ )
21
+ ```
22
+
@@ -4951,6 +4951,79 @@ module UltracartClient
4951
4951
  return data, status_code, headers
4952
4952
  end
4953
4953
 
4954
+ # List recent test orders
4955
+ # Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render's context_order_id; a real customer's order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
4956
+ # @param storefront_oid [Integer]
4957
+ # @param [Hash] opts the optional parameters
4958
+ # @option opts [Integer] :limit
4959
+ # @option opts [Boolean] :digital_items
4960
+ # @option opts [Boolean] :auto_order
4961
+ # @return [SfvbTestOrdersResponse]
4962
+ def get_sfvb_test_orders(storefront_oid, opts = {})
4963
+ data, _status_code, _headers = get_sfvb_test_orders_with_http_info(storefront_oid, opts)
4964
+ data
4965
+ end
4966
+
4967
+ # List recent test orders
4968
+ # Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render&#39;s context_order_id; a real customer&#39;s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
4969
+ # @param storefront_oid [Integer]
4970
+ # @param [Hash] opts the optional parameters
4971
+ # @option opts [Integer] :limit
4972
+ # @option opts [Boolean] :digital_items
4973
+ # @option opts [Boolean] :auto_order
4974
+ # @return [Array<(SfvbTestOrdersResponse, Integer, Hash)>] SfvbTestOrdersResponse data, response status code and response headers
4975
+ def get_sfvb_test_orders_with_http_info(storefront_oid, opts = {})
4976
+ if @api_client.config.debugging
4977
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_test_orders ...'
4978
+ end
4979
+ # verify the required parameter 'storefront_oid' is set
4980
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4981
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_test_orders"
4982
+ end
4983
+ # resource path
4984
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/test_orders'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4985
+
4986
+ # query parameters
4987
+ query_params = opts[:query_params] || {}
4988
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
4989
+ query_params[:'digital_items'] = opts[:'digital_items'] if !opts[:'digital_items'].nil?
4990
+ query_params[:'auto_order'] = opts[:'auto_order'] if !opts[:'auto_order'].nil?
4991
+
4992
+ # header parameters
4993
+ header_params = opts[:header_params] || {}
4994
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4995
+ # HTTP header 'Accept' (if needed)
4996
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4997
+
4998
+ # form parameters
4999
+ form_params = opts[:form_params] || {}
5000
+
5001
+ # http body (model)
5002
+ post_body = opts[:debug_body]
5003
+
5004
+ # return_type
5005
+ return_type = opts[:debug_return_type] || 'SfvbTestOrdersResponse'
5006
+
5007
+ # auth_names
5008
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
5009
+
5010
+ new_options = opts.merge(
5011
+ :operation => :"SfvbApi.get_sfvb_test_orders",
5012
+ :header_params => header_params,
5013
+ :query_params => query_params,
5014
+ :form_params => form_params,
5015
+ :body => post_body,
5016
+ :auth_names => auth_names,
5017
+ :return_type => return_type
5018
+ )
5019
+
5020
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
5021
+ if @api_client.config.debugging
5022
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_test_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5023
+ end
5024
+ return data, status_code, headers
5025
+ end
5026
+
4954
5027
  # Get a theme
4955
5028
  # @param storefront_oid [Integer]
4956
5029
  # @param theme_oid [Integer]
@@ -0,0 +1,300 @@
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 SfvbTestOrder
18
+ # True when the order started an auto order, for working on the subscription pages.
19
+ attr_accessor :auto_order
20
+
21
+ # When the order was placed, ISO-8601 in UTC.
22
+ attr_accessor :created
23
+
24
+ # The currency of the total.
25
+ attr_accessor :currency_code
26
+
27
+ # True when the order has digital downloads, for working on the digital download page.
28
+ attr_accessor :digital_items
29
+
30
+ # How many item lines the order has.
31
+ attr_accessor :item_count
32
+
33
+ # The order id. Pass it as a render's context_order_id.
34
+ attr_accessor :order_id
35
+
36
+ # How the order was paid, such as Credit Card or PayPal.
37
+ attr_accessor :payment_method
38
+
39
+ # The order's current stage code, such as CO (completed), SD (shipping department) or AR (accounts receivable).
40
+ attr_accessor :stage
41
+
42
+ # The order total as a decimal string.
43
+ attr_accessor :total
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'auto_order' => :'auto_order',
49
+ :'created' => :'created',
50
+ :'currency_code' => :'currency_code',
51
+ :'digital_items' => :'digital_items',
52
+ :'item_count' => :'item_count',
53
+ :'order_id' => :'order_id',
54
+ :'payment_method' => :'payment_method',
55
+ :'stage' => :'stage',
56
+ :'total' => :'total'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'auto_order' => :'Boolean',
69
+ :'created' => :'String',
70
+ :'currency_code' => :'String',
71
+ :'digital_items' => :'Boolean',
72
+ :'item_count' => :'Integer',
73
+ :'order_id' => :'String',
74
+ :'payment_method' => :'String',
75
+ :'stage' => :'String',
76
+ :'total' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTestOrder` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTestOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'auto_order')
102
+ self.auto_order = attributes[:'auto_order']
103
+ end
104
+
105
+ if attributes.key?(:'created')
106
+ self.created = attributes[:'created']
107
+ end
108
+
109
+ if attributes.key?(:'currency_code')
110
+ self.currency_code = attributes[:'currency_code']
111
+ end
112
+
113
+ if attributes.key?(:'digital_items')
114
+ self.digital_items = attributes[:'digital_items']
115
+ end
116
+
117
+ if attributes.key?(:'item_count')
118
+ self.item_count = attributes[:'item_count']
119
+ end
120
+
121
+ if attributes.key?(:'order_id')
122
+ self.order_id = attributes[:'order_id']
123
+ end
124
+
125
+ if attributes.key?(:'payment_method')
126
+ self.payment_method = attributes[:'payment_method']
127
+ end
128
+
129
+ if attributes.key?(:'stage')
130
+ self.stage = attributes[:'stage']
131
+ end
132
+
133
+ if attributes.key?(:'total')
134
+ self.total = attributes[:'total']
135
+ end
136
+ end
137
+
138
+ # Show invalid properties with the reasons. Usually used together with valid?
139
+ # @return Array for valid properties with the reasons
140
+ def list_invalid_properties
141
+ invalid_properties = Array.new
142
+ invalid_properties
143
+ end
144
+
145
+ # Check to see if the all the properties in the model are valid
146
+ # @return true if the model is valid
147
+ def valid?
148
+ true
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ auto_order == o.auto_order &&
157
+ created == o.created &&
158
+ currency_code == o.currency_code &&
159
+ digital_items == o.digital_items &&
160
+ item_count == o.item_count &&
161
+ order_id == o.order_id &&
162
+ payment_method == o.payment_method &&
163
+ stage == o.stage &&
164
+ total == o.total
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [auto_order, created, currency_code, digital_items, item_count, order_id, payment_method, stage, total].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ new.build_from_hash(attributes)
184
+ end
185
+
186
+ # Builds the object from hash
187
+ # @param [Hash] attributes Model attributes in the form of hash
188
+ # @return [Object] Returns the model itself
189
+ def build_from_hash(attributes)
190
+ return nil unless attributes.is_a?(Hash)
191
+ attributes = attributes.transform_keys(&:to_sym)
192
+ self.class.openapi_types.each_pair do |key, type|
193
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
194
+ self.send("#{key}=", nil)
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
199
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
200
+ end
201
+ elsif !attributes[self.class.attribute_map[key]].nil?
202
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
203
+ end
204
+ end
205
+
206
+ self
207
+ end
208
+
209
+ # Deserializes the data based on type
210
+ # @param string type Data type
211
+ # @param string value Value to be deserialized
212
+ # @return [Object] Deserialized data
213
+ def _deserialize(type, value)
214
+ case type.to_sym
215
+ when :Time
216
+ Time.parse(value)
217
+ when :Date
218
+ Date.parse(value)
219
+ when :String
220
+ value.to_s
221
+ when :Integer
222
+ value.to_i
223
+ when :Float
224
+ value.to_f
225
+ when :Boolean
226
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
227
+ true
228
+ else
229
+ false
230
+ end
231
+ when :Object
232
+ # generic object (usually a Hash), return directly
233
+ value
234
+ when /\AArray<(?<inner_type>.+)>\z/
235
+ inner_type = Regexp.last_match[:inner_type]
236
+ value.map { |v| _deserialize(inner_type, v) }
237
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
238
+ k_type = Regexp.last_match[:k_type]
239
+ v_type = Regexp.last_match[:v_type]
240
+ {}.tap do |hash|
241
+ value.each do |k, v|
242
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
243
+ end
244
+ end
245
+ else # model
246
+ # models (e.g. Pet) or oneOf
247
+ klass = UltracartClient.const_get(type)
248
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
249
+ end
250
+ end
251
+
252
+ # Returns the string representation of the object
253
+ # @return [String] String presentation of the object
254
+ def to_s
255
+ to_hash.to_s
256
+ end
257
+
258
+ # to_body is an alias to to_hash (backward compatibility)
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_body
261
+ to_hash
262
+ end
263
+
264
+ # Returns the object in the form of hash
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_hash
267
+ hash = {}
268
+ self.class.attribute_map.each_pair do |attr, param|
269
+ value = self.send(attr)
270
+ if value.nil?
271
+ is_nullable = self.class.openapi_nullable.include?(attr)
272
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
273
+ end
274
+
275
+ hash[param] = _to_hash(value)
276
+ end
277
+ hash
278
+ end
279
+
280
+ # Outputs non-array value in the form of hash
281
+ # For object, use to_hash. Otherwise, just return the value
282
+ # @param [Object] value Any valid value
283
+ # @return [Hash] Returns the value in the form of hash
284
+ def _to_hash(value)
285
+ if value.is_a?(Array)
286
+ value.compact.map { |v| _to_hash(v) }
287
+ elsif value.is_a?(Hash)
288
+ {}.tap do |hash|
289
+ value.each { |k, v| hash[k] = _to_hash(v) }
290
+ end
291
+ elsif value.respond_to? :to_hash
292
+ value.to_hash
293
+ else
294
+ value
295
+ end
296
+ end
297
+
298
+ end
299
+
300
+ end
@@ -0,0 +1,242 @@
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 SfvbTestOrdersResponse
18
+ # Present when nothing matched. Says how to place a test order.
19
+ attr_accessor :hint
20
+
21
+ # How many days back were searched, 7, 30 or 90, widening until enough test orders were found.
22
+ attr_accessor :searched_days
23
+
24
+ # Test orders, newest first. Only orders marked as test orders are ever listed.
25
+ attr_accessor :test_orders
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'hint' => :'hint',
31
+ :'searched_days' => :'searched_days',
32
+ :'test_orders' => :'test_orders'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'hint' => :'String',
45
+ :'searched_days' => :'Integer',
46
+ :'test_orders' => :'Array<SfvbTestOrder>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTestOrdersResponse` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTestOrdersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'hint')
72
+ self.hint = attributes[:'hint']
73
+ end
74
+
75
+ if attributes.key?(:'searched_days')
76
+ self.searched_days = attributes[:'searched_days']
77
+ end
78
+
79
+ if attributes.key?(:'test_orders')
80
+ if (value = attributes[:'test_orders']).is_a?(Array)
81
+ self.test_orders = value
82
+ end
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ hint == o.hint &&
105
+ searched_days == o.searched_days &&
106
+ test_orders == o.test_orders
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [hint, searched_days, test_orders].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ new.build_from_hash(attributes)
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ self.class.openapi_types.each_pair do |key, type|
135
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
136
+ self.send("#{key}=", nil)
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
142
+ end
143
+ elsif !attributes[self.class.attribute_map[key]].nil?
144
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
+ end
146
+ end
147
+
148
+ self
149
+ end
150
+
151
+ # Deserializes the data based on type
152
+ # @param string type Data type
153
+ # @param string value Value to be deserialized
154
+ # @return [Object] Deserialized data
155
+ def _deserialize(type, value)
156
+ case type.to_sym
157
+ when :Time
158
+ Time.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :Boolean
168
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ # models (e.g. Pet) or oneOf
189
+ klass = UltracartClient.const_get(type)
190
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
+ end
192
+ end
193
+
194
+ # Returns the string representation of the object
195
+ # @return [String] String presentation of the object
196
+ def to_s
197
+ to_hash.to_s
198
+ end
199
+
200
+ # to_body is an alias to to_hash (backward compatibility)
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_body
203
+ to_hash
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+
240
+ end
241
+
242
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.193'
14
+ VERSION = '4.1.194'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1143,6 +1143,8 @@ require 'ultracart_api/models/sfvb_template_resolve_candidate'
1143
1143
  require 'ultracart_api/models/sfvb_template_resolve_path'
1144
1144
  require 'ultracart_api/models/sfvb_template_resolve_response'
1145
1145
  require 'ultracart_api/models/sfvb_templates_response'
1146
+ require 'ultracart_api/models/sfvb_test_order'
1147
+ require 'ultracart_api/models/sfvb_test_orders_response'
1146
1148
  require 'ultracart_api/models/sfvb_theme'
1147
1149
  require 'ultracart_api/models/sfvb_theme_attribute'
1148
1150
  require 'ultracart_api/models/sfvb_theme_attribute_update'
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: 4.1.193
4
+ version: 4.1.194
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-06 00:00:00.000000000 Z
11
+ date: 2026-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1205,6 +1205,8 @@ files:
1205
1205
  - docs/SfvbTemplateResolvePath.md
1206
1206
  - docs/SfvbTemplateResolveResponse.md
1207
1207
  - docs/SfvbTemplatesResponse.md
1208
+ - docs/SfvbTestOrder.md
1209
+ - docs/SfvbTestOrdersResponse.md
1208
1210
  - docs/SfvbTheme.md
1209
1211
  - docs/SfvbThemeAttribute.md
1210
1212
  - docs/SfvbThemeAttributeUpdate.md
@@ -2487,6 +2489,8 @@ files:
2487
2489
  - lib/ultracart_api/models/sfvb_template_resolve_path.rb
2488
2490
  - lib/ultracart_api/models/sfvb_template_resolve_response.rb
2489
2491
  - lib/ultracart_api/models/sfvb_templates_response.rb
2492
+ - lib/ultracart_api/models/sfvb_test_order.rb
2493
+ - lib/ultracart_api/models/sfvb_test_orders_response.rb
2490
2494
  - lib/ultracart_api/models/sfvb_theme.rb
2491
2495
  - lib/ultracart_api/models/sfvb_theme_attribute.rb
2492
2496
  - lib/ultracart_api/models/sfvb_theme_attribute_update.rb