ultracart_api 4.1.243 → 4.1.245

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: 5b11b83a656311382177e6356ccddbddd6a7f98e3deef76b4d03a96d8060ea38
4
- data.tar.gz: 250b9777c8799bdbe2fa174aac456e3735ef4038196741c8bddee54298e739a2
3
+ metadata.gz: 8185f97bd190ae8a755963f31cbb7facb59a7796cca056952916b62110a368b7
4
+ data.tar.gz: 8f0801db65ce67a6ab4b68a8e4332292a499e0da4aaa525f91882274f72afbdf
5
5
  SHA512:
6
- metadata.gz: e3c62d6332f14096d26293deb7fe2eab025c0fb7b74e4e8e83d3519a7ef7933962b36a89e0acc76102258eed56900c0995aa8ec38ae59b5ff382319651343f79
7
- data.tar.gz: 58e4998078833f999ded5c211dacf30741c73e4c419ee8dfa8e7abfa3b26f7c2078d28c6aed608d4182bd9a9dfc42cb54b5fb974efe5f4064f13e7e4d5068520
6
+ metadata.gz: c2c895fb02cbd14b4668419a2bb867a3d5dc7f032e9e208b1afc98d31cd8c9ed6735e49340d026aa6f991b49e9dfe72875309ae440247838965eebb17e179983
7
+ data.tar.gz: 57c0bc019a155048cdffd268d0edff73e71de4b2db972abaaf5d0cfab400e2d80fab15295ef2d197afe0883734ac378443a8f77cb4f16c1ca67b05de0d996dde
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.243
10
+ - Package version: 4.1.245
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.243'
19
+ gem 'ultracart_api', '4.1.245'
20
20
  ```
21
21
 
22
22
  install:
@@ -2026,6 +2026,8 @@ Class | Method | HTTP request | Description
2026
2026
  - [UltracartClient::SfvbCampaignMembership](docs/SfvbCampaignMembership.md)
2027
2027
  - [UltracartClient::SfvbCampaignWriteRequest](docs/SfvbCampaignWriteRequest.md)
2028
2028
  - [UltracartClient::SfvbCampaignsResponse](docs/SfvbCampaignsResponse.md)
2029
+ - [UltracartClient::SfvbCliAccess](docs/SfvbCliAccess.md)
2030
+ - [UltracartClient::SfvbCliVersion](docs/SfvbCliVersion.md)
2029
2031
  - [UltracartClient::SfvbCodeLibraryEmail](docs/SfvbCodeLibraryEmail.md)
2030
2032
  - [UltracartClient::SfvbCodeLibraryEmailsResponse](docs/SfvbCodeLibraryEmailsResponse.md)
2031
2033
  - [UltracartClient::SfvbCommsBranchStat](docs/SfvbCommsBranchStat.md)
@@ -2583,6 +2585,8 @@ Not every change is committed to every SDK.
2583
2585
 
2584
2586
  | Version | Date | Comments |
2585
2587
  | --: | :-: | --- |
2588
+ | 4.1.245 | 11/11/2026 | sfvb internal testing |
2589
+ | 4.1.244 | 11/11/2026 | sfvb internal testing |
2586
2590
  | 4.1.243 | 11/11/2026 | sfvb internal testing |
2587
2591
  | 4.1.242 | 11/11/2026 | sfvb internal testing |
2588
2592
  | 4.1.241 | 11/10/2026 | sfvb internal testing |
@@ -6,10 +6,14 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **access_token** | **String** | Access token to use in OAuth authenticated API call | [optional] |
8
8
  | **error** | **String** | | [optional] |
9
+ | **error_code** | **String** | With error access_denied, a machine readable reason. sfvb.beta_access_required means the account isn't enabled for the StoreFront CLI beta, not that a person clicked Deny. | [optional] |
9
10
  | **error_description** | **String** | | [optional] |
10
11
  | **error_uri** | **String** | | [optional] |
11
12
  | **expires_in** | **String** | The number of seconds since issuance when the access token will expire and need to be refreshed using the refresh token | [optional] |
12
13
  | **merchant_id** | **String** | The UltraCart merchant account that authorized this token. Use it to map the token to the merchant within your own system. Also returned by GET /oauth/me along with the account name. | [optional] |
14
+ | **minimum_version** | **String** | With error_code sfvb.cli_upgrade_required, the lowest StoreFront CLI version the server supports. | [optional] |
15
+ | **object_id** | **String** | With error_code sfvb.beta_access_required, the merchant id that was refused. | [optional] |
16
+ | **recommended_version** | **String** | With error_code sfvb.cli_upgrade_required, the StoreFront CLI version to install. | [optional] |
13
17
  | **refresh_token** | **String** | The refresh token that should be used to fetch a new access token when the expiration occurs | [optional] |
14
18
  | **refresh_token_expires_in** | **String** | Seconds until the refresh token expires. Returned only by applications that rotate refresh tokens, which return a new refresh token on every refresh. | [optional] |
15
19
  | **scope** | **String** | The scope of permissions associated with teh access token | [optional] |
@@ -23,10 +27,14 @@ require 'ultracart_api'
23
27
  instance = UltracartClient::OauthTokenResponse.new(
24
28
  access_token: null,
25
29
  error: null,
30
+ error_code: null,
26
31
  error_description: null,
27
32
  error_uri: null,
28
33
  expires_in: null,
29
34
  merchant_id: null,
35
+ minimum_version: null,
36
+ object_id: null,
37
+ recommended_version: null,
30
38
  refresh_token: null,
31
39
  refresh_token_expires_in: null,
32
40
  scope: null,
@@ -0,0 +1,20 @@
1
+ # UltracartClient::SfvbCliAccess
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **enabled** | **Boolean** | True when the account is on the StoreFront CLI beta list. Omitted when false. | [optional] |
8
+ | **request_access_url** | **String** | Where to request access. Returned only when enabled is false. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::SfvbCliAccess.new(
16
+ enabled: null,
17
+ request_access_url: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::SfvbCliVersion
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **cutoff** | **String** | The date (yyyy-MM-dd) the minimum will be raised to the recommended version. Omitted when none is announced. | [optional] |
8
+ | **minimum** | **String** | The lowest supported version. Omitted when none is set. | [optional] |
9
+ | **recommended** | **String** | The version to upgrade to. Omitted when none is set. | [optional] |
10
+ | **reported** | **String** | The version the CLI sent in X-UltraCart-CLI-Version. Omitted when it sent none, which is read as 0.0.0. | [optional] |
11
+ | **status** | **String** | ok, deprecated (below recommended - keep working, tell the merchant to upgrade) or unsupported (below minimum - every other call is refused with 426 sfvb.cli_upgrade_required). | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::SfvbCliVersion.new(
19
+ cutoff: null,
20
+ minimum: null,
21
+ recommended: null,
22
+ reported: null,
23
+ status: null
24
+ )
25
+ ```
26
+
@@ -9,6 +9,7 @@
9
9
  | **fs_file_oid** | **Integer** | StoreFront file system file oid. | [optional] |
10
10
  | **hash_sha256** | **String** | SHA-256 of the content. Send this back as If-Match when writing. The ETag header carries the same hash, but a compressing proxy may append a suffix such as -gzip to it, so this body value is the authoritative one. Both forms are accepted on write. | [optional] |
11
11
  | **merge_conflict** | **Boolean** | True when a theme upgrade left unresolved merge conflicts in this file. The content holds conflict marker lines. Resolve each conflict and save the file without any marker lines to clear it - a save that still has marker lines is refused. | [optional] |
12
+ | **metadata_error** | [**SfvbErrorDetail**](SfvbErrorDetail.md) | | [optional] |
12
13
  | **mime_type** | **String** | Mime type. | [optional] |
13
14
  | **path** | **String** | Full path of the file. | [optional] |
14
15
  | **size** | **Integer** | Size in bytes. | [optional] |
@@ -28,6 +29,7 @@ instance = UltracartClient::SfvbFileContentResponse.new(
28
29
  fs_file_oid: null,
29
30
  hash_sha256: null,
30
31
  merge_conflict: null,
32
+ metadata_error: null,
31
33
  mime_type: null,
32
34
  path: null,
33
35
  size: null,
@@ -13,6 +13,8 @@
13
13
  | **can_read** | **Boolean** | True when this token may read. Do not infer this from the requested scope name. | [optional] |
14
14
  | **can_read_items** | **Boolean** | True when this token may read item data - the item, its pricing, pre-order and related items. Needs can_read, and the UltraCart user behind the token must hold View Items or Edit Items. A token with no user is judged on its scopes alone. | [optional] |
15
15
  | **can_write** | **Boolean** | True when this token may write. Writing a target that is not currently live needs only this. | [optional] |
16
+ | **cli_access** | [**SfvbCliAccess**](SfvbCliAccess.md) | | [optional] |
17
+ | **cli_version** | [**SfvbCliVersion**](SfvbCliVersion.md) | | [optional] |
16
18
  | **device_scope** | **String** | Device scope name, when this is a device flow token. | [optional] |
17
19
  | **login** | **String** | Login of the user who approved this token. Populated for device flow tokens; null for plain API key credentials. | [optional] |
18
20
  | **merchant_id** | **String** | Merchant id this token acts against. | [optional] |
@@ -36,6 +38,8 @@ instance = UltracartClient::SfvbWhoamiResponse.new(
36
38
  can_read: null,
37
39
  can_read_items: null,
38
40
  can_write: null,
41
+ cli_access: null,
42
+ cli_version: null,
39
43
  device_scope: null,
40
44
  login: null,
41
45
  merchant_id: null,
@@ -20,6 +20,9 @@ module UltracartClient
20
20
 
21
21
  attr_accessor :error
22
22
 
23
+ # With error access_denied, a machine readable reason. sfvb.beta_access_required means the account isn't enabled for the StoreFront CLI beta, not that a person clicked Deny.
24
+ attr_accessor :error_code
25
+
23
26
  attr_accessor :error_description
24
27
 
25
28
  attr_accessor :error_uri
@@ -30,6 +33,15 @@ module UltracartClient
30
33
  # The UltraCart merchant account that authorized this token. Use it to map the token to the merchant within your own system. Also returned by GET /oauth/me along with the account name.
31
34
  attr_accessor :merchant_id
32
35
 
36
+ # With error_code sfvb.cli_upgrade_required, the lowest StoreFront CLI version the server supports.
37
+ attr_accessor :minimum_version
38
+
39
+ # With error_code sfvb.beta_access_required, the merchant id that was refused.
40
+ attr_accessor :object_id
41
+
42
+ # With error_code sfvb.cli_upgrade_required, the StoreFront CLI version to install.
43
+ attr_accessor :recommended_version
44
+
33
45
  # The refresh token that should be used to fetch a new access token when the expiration occurs
34
46
  attr_accessor :refresh_token
35
47
 
@@ -69,10 +81,14 @@ module UltracartClient
69
81
  {
70
82
  :'access_token' => :'access_token',
71
83
  :'error' => :'error',
84
+ :'error_code' => :'error_code',
72
85
  :'error_description' => :'error_description',
73
86
  :'error_uri' => :'error_uri',
74
87
  :'expires_in' => :'expires_in',
75
88
  :'merchant_id' => :'merchant_id',
89
+ :'minimum_version' => :'minimum_version',
90
+ :'object_id' => :'object_id',
91
+ :'recommended_version' => :'recommended_version',
76
92
  :'refresh_token' => :'refresh_token',
77
93
  :'refresh_token_expires_in' => :'refresh_token_expires_in',
78
94
  :'scope' => :'scope',
@@ -90,10 +106,14 @@ module UltracartClient
90
106
  {
91
107
  :'access_token' => :'String',
92
108
  :'error' => :'String',
109
+ :'error_code' => :'String',
93
110
  :'error_description' => :'String',
94
111
  :'error_uri' => :'String',
95
112
  :'expires_in' => :'String',
96
113
  :'merchant_id' => :'String',
114
+ :'minimum_version' => :'String',
115
+ :'object_id' => :'String',
116
+ :'recommended_version' => :'String',
97
117
  :'refresh_token' => :'String',
98
118
  :'refresh_token_expires_in' => :'String',
99
119
  :'scope' => :'String',
@@ -130,6 +150,10 @@ module UltracartClient
130
150
  self.error = attributes[:'error']
131
151
  end
132
152
 
153
+ if attributes.key?(:'error_code')
154
+ self.error_code = attributes[:'error_code']
155
+ end
156
+
133
157
  if attributes.key?(:'error_description')
134
158
  self.error_description = attributes[:'error_description']
135
159
  end
@@ -146,6 +170,18 @@ module UltracartClient
146
170
  self.merchant_id = attributes[:'merchant_id']
147
171
  end
148
172
 
173
+ if attributes.key?(:'minimum_version')
174
+ self.minimum_version = attributes[:'minimum_version']
175
+ end
176
+
177
+ if attributes.key?(:'object_id')
178
+ self.object_id = attributes[:'object_id']
179
+ end
180
+
181
+ if attributes.key?(:'recommended_version')
182
+ self.recommended_version = attributes[:'recommended_version']
183
+ end
184
+
149
185
  if attributes.key?(:'refresh_token')
150
186
  self.refresh_token = attributes[:'refresh_token']
151
187
  end
@@ -195,10 +231,14 @@ module UltracartClient
195
231
  self.class == o.class &&
196
232
  access_token == o.access_token &&
197
233
  error == o.error &&
234
+ error_code == o.error_code &&
198
235
  error_description == o.error_description &&
199
236
  error_uri == o.error_uri &&
200
237
  expires_in == o.expires_in &&
201
238
  merchant_id == o.merchant_id &&
239
+ minimum_version == o.minimum_version &&
240
+ object_id == o.object_id &&
241
+ recommended_version == o.recommended_version &&
202
242
  refresh_token == o.refresh_token &&
203
243
  refresh_token_expires_in == o.refresh_token_expires_in &&
204
244
  scope == o.scope &&
@@ -214,7 +254,7 @@ module UltracartClient
214
254
  # Calculates hash code according to all attributes.
215
255
  # @return [Integer] Hash code
216
256
  def hash
217
- [access_token, error, error_description, error_uri, expires_in, merchant_id, refresh_token, refresh_token_expires_in, scope, token_type].hash
257
+ [access_token, error, error_code, error_description, error_uri, expires_in, merchant_id, minimum_version, object_id, recommended_version, refresh_token, refresh_token_expires_in, scope, token_type].hash
218
258
  end
219
259
 
220
260
  # Builds the object from hash
@@ -0,0 +1,230 @@
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 SfvbCliAccess
18
+ # True when the account is on the StoreFront CLI beta list. Omitted when false.
19
+ attr_accessor :enabled
20
+
21
+ # Where to request access. Returned only when enabled is false.
22
+ attr_accessor :request_access_url
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'enabled' => :'enabled',
28
+ :'request_access_url' => :'request_access_url'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'enabled' => :'Boolean',
41
+ :'request_access_url' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCliAccess` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCliAccess`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'enabled')
67
+ self.enabled = attributes[:'enabled']
68
+ end
69
+
70
+ if attributes.key?(:'request_access_url')
71
+ self.request_access_url = attributes[:'request_access_url']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ enabled == o.enabled &&
94
+ request_access_url == o.request_access_url
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [enabled, request_access_url].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = UltracartClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -0,0 +1,260 @@
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 SfvbCliVersion
18
+ # The date (yyyy-MM-dd) the minimum will be raised to the recommended version. Omitted when none is announced.
19
+ attr_accessor :cutoff
20
+
21
+ # The lowest supported version. Omitted when none is set.
22
+ attr_accessor :minimum
23
+
24
+ # The version to upgrade to. Omitted when none is set.
25
+ attr_accessor :recommended
26
+
27
+ # The version the CLI sent in X-UltraCart-CLI-Version. Omitted when it sent none, which is read as 0.0.0.
28
+ attr_accessor :reported
29
+
30
+ # ok, deprecated (below recommended - keep working, tell the merchant to upgrade) or unsupported (below minimum - every other call is refused with 426 sfvb.cli_upgrade_required).
31
+ attr_accessor :status
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'cutoff' => :'cutoff',
37
+ :'minimum' => :'minimum',
38
+ :'recommended' => :'recommended',
39
+ :'reported' => :'reported',
40
+ :'status' => :'status'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'cutoff' => :'String',
53
+ :'minimum' => :'String',
54
+ :'recommended' => :'String',
55
+ :'reported' => :'String',
56
+ :'status' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCliVersion` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCliVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'cutoff')
82
+ self.cutoff = attributes[:'cutoff']
83
+ end
84
+
85
+ if attributes.key?(:'minimum')
86
+ self.minimum = attributes[:'minimum']
87
+ end
88
+
89
+ if attributes.key?(:'recommended')
90
+ self.recommended = attributes[:'recommended']
91
+ end
92
+
93
+ if attributes.key?(:'reported')
94
+ self.reported = attributes[:'reported']
95
+ end
96
+
97
+ if attributes.key?(:'status')
98
+ self.status = attributes[:'status']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ cutoff == o.cutoff &&
121
+ minimum == o.minimum &&
122
+ recommended == o.recommended &&
123
+ reported == o.reported &&
124
+ status == o.status
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [cutoff, minimum, recommended, reported, status].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = UltracartClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end
@@ -30,6 +30,8 @@ module UltracartClient
30
30
  # True when a theme upgrade left unresolved merge conflicts in this file. The content holds conflict marker lines. Resolve each conflict and save the file without any marker lines to clear it - a save that still has marker lines is refused.
31
31
  attr_accessor :merge_conflict
32
32
 
33
+ attr_accessor :metadata_error
34
+
33
35
  # Mime type.
34
36
  attr_accessor :mime_type
35
37
 
@@ -59,6 +61,7 @@ module UltracartClient
59
61
  :'fs_file_oid' => :'fs_file_oid',
60
62
  :'hash_sha256' => :'hash_sha256',
61
63
  :'merge_conflict' => :'merge_conflict',
64
+ :'metadata_error' => :'metadata_error',
62
65
  :'mime_type' => :'mime_type',
63
66
  :'path' => :'path',
64
67
  :'size' => :'size',
@@ -82,6 +85,7 @@ module UltracartClient
82
85
  :'fs_file_oid' => :'Integer',
83
86
  :'hash_sha256' => :'String',
84
87
  :'merge_conflict' => :'Boolean',
88
+ :'metadata_error' => :'SfvbErrorDetail',
85
89
  :'mime_type' => :'String',
86
90
  :'path' => :'String',
87
91
  :'size' => :'Integer',
@@ -133,6 +137,10 @@ module UltracartClient
133
137
  self.merge_conflict = attributes[:'merge_conflict']
134
138
  end
135
139
 
140
+ if attributes.key?(:'metadata_error')
141
+ self.metadata_error = attributes[:'metadata_error']
142
+ end
143
+
136
144
  if attributes.key?(:'mime_type')
137
145
  self.mime_type = attributes[:'mime_type']
138
146
  end
@@ -185,6 +193,7 @@ module UltracartClient
185
193
  fs_file_oid == o.fs_file_oid &&
186
194
  hash_sha256 == o.hash_sha256 &&
187
195
  merge_conflict == o.merge_conflict &&
196
+ metadata_error == o.metadata_error &&
188
197
  mime_type == o.mime_type &&
189
198
  path == o.path &&
190
199
  size == o.size &&
@@ -203,7 +212,7 @@ module UltracartClient
203
212
  # Calculates hash code according to all attributes.
204
213
  # @return [Integer] Hash code
205
214
  def hash
206
- [auto_compiled, content, fs_file_oid, hash_sha256, merge_conflict, mime_type, path, size, truncated, valid, velocity_errors, version].hash
215
+ [auto_compiled, content, fs_file_oid, hash_sha256, merge_conflict, metadata_error, mime_type, path, size, truncated, valid, velocity_errors, version].hash
207
216
  end
208
217
 
209
218
  # Builds the object from hash
@@ -42,6 +42,10 @@ module UltracartClient
42
42
  # True when this token may write. Writing a target that is not currently live needs only this.
43
43
  attr_accessor :can_write
44
44
 
45
+ attr_accessor :cli_access
46
+
47
+ attr_accessor :cli_version
48
+
45
49
  # Device scope name, when this is a device flow token.
46
50
  attr_accessor :device_scope
47
51
 
@@ -75,6 +79,8 @@ module UltracartClient
75
79
  :'can_read' => :'can_read',
76
80
  :'can_read_items' => :'can_read_items',
77
81
  :'can_write' => :'can_write',
82
+ :'cli_access' => :'cli_access',
83
+ :'cli_version' => :'cli_version',
78
84
  :'device_scope' => :'device_scope',
79
85
  :'login' => :'login',
80
86
  :'merchant_id' => :'merchant_id',
@@ -102,6 +108,8 @@ module UltracartClient
102
108
  :'can_read' => :'Boolean',
103
109
  :'can_read_items' => :'Boolean',
104
110
  :'can_write' => :'Boolean',
111
+ :'cli_access' => :'SfvbCliAccess',
112
+ :'cli_version' => :'SfvbCliVersion',
105
113
  :'device_scope' => :'String',
106
114
  :'login' => :'String',
107
115
  :'merchant_id' => :'String',
@@ -169,6 +177,14 @@ module UltracartClient
169
177
  self.can_write = attributes[:'can_write']
170
178
  end
171
179
 
180
+ if attributes.key?(:'cli_access')
181
+ self.cli_access = attributes[:'cli_access']
182
+ end
183
+
184
+ if attributes.key?(:'cli_version')
185
+ self.cli_version = attributes[:'cli_version']
186
+ end
187
+
172
188
  if attributes.key?(:'device_scope')
173
189
  self.device_scope = attributes[:'device_scope']
174
190
  end
@@ -229,6 +245,8 @@ module UltracartClient
229
245
  can_read == o.can_read &&
230
246
  can_read_items == o.can_read_items &&
231
247
  can_write == o.can_write &&
248
+ cli_access == o.cli_access &&
249
+ cli_version == o.cli_version &&
232
250
  device_scope == o.device_scope &&
233
251
  login == o.login &&
234
252
  merchant_id == o.merchant_id &&
@@ -247,7 +265,7 @@ module UltracartClient
247
265
  # Calculates hash code according to all attributes.
248
266
  # @return [Integer] Hash code
249
267
  def hash
250
- [acting_as_user, application_name, authentication_type, can_edit_items, can_publish, can_publish_public, can_read, can_read_items, can_write, device_scope, login, merchant_id, scopes, storefronts, storefronts_withheld, user_name].hash
268
+ [acting_as_user, application_name, authentication_type, can_edit_items, can_publish, can_publish_public, can_read, can_read_items, can_write, cli_access, cli_version, device_scope, login, merchant_id, scopes, storefronts, storefronts_withheld, user_name].hash
251
269
  end
252
270
 
253
271
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.243'
14
+ VERSION = '4.1.245'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1004,6 +1004,8 @@ require 'ultracart_api/models/sfvb_campaign'
1004
1004
  require 'ultracart_api/models/sfvb_campaign_membership'
1005
1005
  require 'ultracart_api/models/sfvb_campaign_write_request'
1006
1006
  require 'ultracart_api/models/sfvb_campaigns_response'
1007
+ require 'ultracart_api/models/sfvb_cli_access'
1008
+ require 'ultracart_api/models/sfvb_cli_version'
1007
1009
  require 'ultracart_api/models/sfvb_code_library_email'
1008
1010
  require 'ultracart_api/models/sfvb_code_library_emails_response'
1009
1011
  require 'ultracart_api/models/sfvb_comms_branch_stat'
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.243
4
+ version: 4.1.245
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -1066,6 +1066,8 @@ files:
1066
1066
  - docs/SfvbCampaignMembership.md
1067
1067
  - docs/SfvbCampaignWriteRequest.md
1068
1068
  - docs/SfvbCampaignsResponse.md
1069
+ - docs/SfvbCliAccess.md
1070
+ - docs/SfvbCliVersion.md
1069
1071
  - docs/SfvbCodeLibraryEmail.md
1070
1072
  - docs/SfvbCodeLibraryEmailsResponse.md
1071
1073
  - docs/SfvbCommsBranchStat.md
@@ -2568,6 +2570,8 @@ files:
2568
2570
  - lib/ultracart_api/models/sfvb_campaign_membership.rb
2569
2571
  - lib/ultracart_api/models/sfvb_campaign_write_request.rb
2570
2572
  - lib/ultracart_api/models/sfvb_campaigns_response.rb
2573
+ - lib/ultracart_api/models/sfvb_cli_access.rb
2574
+ - lib/ultracart_api/models/sfvb_cli_version.rb
2571
2575
  - lib/ultracart_api/models/sfvb_code_library_email.rb
2572
2576
  - lib/ultracart_api/models/sfvb_code_library_emails_response.rb
2573
2577
  - lib/ultracart_api/models/sfvb_comms_branch_stat.rb