ultracart_api 4.1.89 → 4.1.90
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 +5 -2
- data/docs/WebhookApi.md +52 -0
- data/docs/WebhookEventCategoriesResponse.md +26 -0
- data/lib/ultracart_api/api/webhook_api.rb +58 -0
- data/lib/ultracart_api/models/webhook_event_categories_response.rb +258 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dba53dc1e52b08b39127b7aa9b45e382a32bec2b388b43d577487c0924808c57
|
|
4
|
+
data.tar.gz: 0330eb32faad3a8a53bada0c4bea5bc15474dd49913ba936805b716b9e08729f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59eb083611de44ce5e14d1bc5610af6a14ca650f94c00ad3903fa489eddf67273ce0ce2a4c50e2a14507ebac21c7ee8270fed3d771202d890480d4e4e04dcb6a
|
|
7
|
+
data.tar.gz: 2f7b01bf050c2459ad976e4a170556a99edffcc9f38b05fbac76ae2027765cb943b3a286b966d0ef445a44657639d1f5cd594369b39d77cfbd69b47567950591
|
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.90
|
|
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.90'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -665,6 +665,7 @@ Class | Method | HTTP request | Description
|
|
|
665
665
|
*UltracartClient::UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/users/{user_id} | Update a user
|
|
666
666
|
*UltracartClient::WebhookApi* | [**delete_webhook**](docs/WebhookApi.md#delete_webhook) | **DELETE** /webhook/webhooks/{webhookOid} | Delete a webhook
|
|
667
667
|
*UltracartClient::WebhookApi* | [**delete_webhook_by_url**](docs/WebhookApi.md#delete_webhook_by_url) | **DELETE** /webhook/webhooks | Delete a webhook by URL
|
|
668
|
+
*UltracartClient::WebhookApi* | [**get_webhook_event_categories**](docs/WebhookApi.md#get_webhook_event_categories) | **GET** /webhook/webhook_event_categories | Retrieve webhook event categories
|
|
668
669
|
*UltracartClient::WebhookApi* | [**get_webhook_log**](docs/WebhookApi.md#get_webhook_log) | **GET** /webhook/webhooks/{webhookOid}/logs/{requestId} | Retrieve an individual log
|
|
669
670
|
*UltracartClient::WebhookApi* | [**get_webhook_log_summaries**](docs/WebhookApi.md#get_webhook_log_summaries) | **GET** /webhook/webhooks/{webhookOid}/logs | Retrieve the log summaries
|
|
670
671
|
*UltracartClient::WebhookApi* | [**get_webhooks**](docs/WebhookApi.md#get_webhooks) | **GET** /webhook/webhooks | Retrieve webhooks
|
|
@@ -1642,6 +1643,7 @@ Class | Method | HTTP request | Description
|
|
|
1642
1643
|
- [UltracartClient::VerificationRecord](docs/VerificationRecord.md)
|
|
1643
1644
|
- [UltracartClient::Warning](docs/Warning.md)
|
|
1644
1645
|
- [UltracartClient::Webhook](docs/Webhook.md)
|
|
1646
|
+
- [UltracartClient::WebhookEventCategoriesResponse](docs/WebhookEventCategoriesResponse.md)
|
|
1645
1647
|
- [UltracartClient::WebhookEventCategory](docs/WebhookEventCategory.md)
|
|
1646
1648
|
- [UltracartClient::WebhookEventSubscription](docs/WebhookEventSubscription.md)
|
|
1647
1649
|
- [UltracartClient::WebhookLog](docs/WebhookLog.md)
|
|
@@ -1746,6 +1748,7 @@ Not every change is committed to every SDK.
|
|
|
1746
1748
|
|
|
1747
1749
|
| Version | Date | Comments |
|
|
1748
1750
|
| --: | :-: | --- |
|
|
1751
|
+
| 4.1.90 | 05/13/2026 | webhook rest api - new method getWebhookEventCategories |
|
|
1749
1752
|
| 4.1.89 | 05/11/2026 | auto order item level webhooks - cancel scheduled, cancel, pause, reactive, and unpause |
|
|
1750
1753
|
| 4.1.88 | 05/08/2026 | order page view history |
|
|
1751
1754
|
| 4.1.87 | 05/08/2026 | order and auto order emails |
|
data/docs/WebhookApi.md
CHANGED
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**delete_webhook**](WebhookApi.md#delete_webhook) | **DELETE** /webhook/webhooks/{webhookOid} | Delete a webhook |
|
|
8
8
|
| [**delete_webhook_by_url**](WebhookApi.md#delete_webhook_by_url) | **DELETE** /webhook/webhooks | Delete a webhook by URL |
|
|
9
|
+
| [**get_webhook_event_categories**](WebhookApi.md#get_webhook_event_categories) | **GET** /webhook/webhook_event_categories | Retrieve webhook event categories |
|
|
9
10
|
| [**get_webhook_log**](WebhookApi.md#get_webhook_log) | **GET** /webhook/webhooks/{webhookOid}/logs/{requestId} | Retrieve an individual log |
|
|
10
11
|
| [**get_webhook_log_summaries**](WebhookApi.md#get_webhook_log_summaries) | **GET** /webhook/webhooks/{webhookOid}/logs | Retrieve the log summaries |
|
|
11
12
|
| [**get_webhooks**](WebhookApi.md#get_webhooks) | **GET** /webhook/webhooks | Retrieve webhooks |
|
|
@@ -153,6 +154,57 @@ end
|
|
|
153
154
|
- **Accept**: application/json
|
|
154
155
|
|
|
155
156
|
|
|
157
|
+
## get_webhook_event_categories
|
|
158
|
+
|
|
159
|
+
> <WebhookEventCategoriesResponse> get_webhook_event_categories
|
|
160
|
+
|
|
161
|
+
Retrieve webhook event categories
|
|
162
|
+
|
|
163
|
+
Retrieves the available webhook event categories and events with backend-owned metadata (OIDs, names, descriptions, available expansions, flags) independent of whether any webhooks are saved. Used by the New Webhook editor so a merchant with zero webhooks can still see the catalog.
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
### Examples
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
(No example for this operation).
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
#### Using the get_webhook_event_categories_with_http_info variant
|
|
173
|
+
|
|
174
|
+
This returns an Array which contains the response data, status code and headers.
|
|
175
|
+
|
|
176
|
+
> <Array(<WebhookEventCategoriesResponse>, Integer, Hash)> get_webhook_event_categories_with_http_info
|
|
177
|
+
|
|
178
|
+
```ruby
|
|
179
|
+
begin
|
|
180
|
+
# Retrieve webhook event categories
|
|
181
|
+
data, status_code, headers = api_instance.get_webhook_event_categories_with_http_info
|
|
182
|
+
p status_code # => 2xx
|
|
183
|
+
p headers # => { ... }
|
|
184
|
+
p data # => <WebhookEventCategoriesResponse>
|
|
185
|
+
rescue UltracartClient::ApiError => e
|
|
186
|
+
puts "Error when calling WebhookApi->get_webhook_event_categories_with_http_info: #{e}"
|
|
187
|
+
end
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Parameters
|
|
191
|
+
|
|
192
|
+
This endpoint does not need any parameter.
|
|
193
|
+
|
|
194
|
+
### Return type
|
|
195
|
+
|
|
196
|
+
[**WebhookEventCategoriesResponse**](WebhookEventCategoriesResponse.md)
|
|
197
|
+
|
|
198
|
+
### Authorization
|
|
199
|
+
|
|
200
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
201
|
+
|
|
202
|
+
### HTTP request headers
|
|
203
|
+
|
|
204
|
+
- **Content-Type**: Not defined
|
|
205
|
+
- **Accept**: application/json
|
|
206
|
+
|
|
207
|
+
|
|
156
208
|
## get_webhook_log
|
|
157
209
|
|
|
158
210
|
> <WebhookLogResponse> get_webhook_log(webhook_oid, request_id)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# UltracartClient::WebhookEventCategoriesResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
|
8
|
+
| **event_categories** | [**Array<WebhookEventCategory>**](WebhookEventCategory.md) | | [optional] |
|
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ultracart_api'
|
|
17
|
+
|
|
18
|
+
instance = UltracartClient::WebhookEventCategoriesResponse.new(
|
|
19
|
+
error: null,
|
|
20
|
+
event_categories: null,
|
|
21
|
+
metadata: null,
|
|
22
|
+
success: null,
|
|
23
|
+
warning: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -165,6 +165,64 @@ module UltracartClient
|
|
|
165
165
|
return data, status_code, headers
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
+
# Retrieve webhook event categories
|
|
169
|
+
# Retrieves the available webhook event categories and events with backend-owned metadata (OIDs, names, descriptions, available expansions, flags) independent of whether any webhooks are saved. Used by the New Webhook editor so a merchant with zero webhooks can still see the catalog.
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @return [WebhookEventCategoriesResponse]
|
|
172
|
+
def get_webhook_event_categories(opts = {})
|
|
173
|
+
data, _status_code, _headers = get_webhook_event_categories_with_http_info(opts)
|
|
174
|
+
data
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Retrieve webhook event categories
|
|
178
|
+
# Retrieves the available webhook event categories and events with backend-owned metadata (OIDs, names, descriptions, available expansions, flags) independent of whether any webhooks are saved. Used by the New Webhook editor so a merchant with zero webhooks can still see the catalog.
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @return [Array<(WebhookEventCategoriesResponse, Integer, Hash)>] WebhookEventCategoriesResponse data, response status code and response headers
|
|
181
|
+
def get_webhook_event_categories_with_http_info(opts = {})
|
|
182
|
+
if @api_client.config.debugging
|
|
183
|
+
@api_client.config.logger.debug 'Calling API: WebhookApi.get_webhook_event_categories ...'
|
|
184
|
+
end
|
|
185
|
+
# resource path
|
|
186
|
+
local_var_path = '/webhook/webhook_event_categories'
|
|
187
|
+
|
|
188
|
+
# query parameters
|
|
189
|
+
query_params = opts[:query_params] || {}
|
|
190
|
+
|
|
191
|
+
# header parameters
|
|
192
|
+
header_params = opts[:header_params] || {}
|
|
193
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
194
|
+
# HTTP header 'Accept' (if needed)
|
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
196
|
+
|
|
197
|
+
# form parameters
|
|
198
|
+
form_params = opts[:form_params] || {}
|
|
199
|
+
|
|
200
|
+
# http body (model)
|
|
201
|
+
post_body = opts[:debug_body]
|
|
202
|
+
|
|
203
|
+
# return_type
|
|
204
|
+
return_type = opts[:debug_return_type] || 'WebhookEventCategoriesResponse'
|
|
205
|
+
|
|
206
|
+
# auth_names
|
|
207
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
208
|
+
|
|
209
|
+
new_options = opts.merge(
|
|
210
|
+
:operation => :"WebhookApi.get_webhook_event_categories",
|
|
211
|
+
:header_params => header_params,
|
|
212
|
+
:query_params => query_params,
|
|
213
|
+
:form_params => form_params,
|
|
214
|
+
:body => post_body,
|
|
215
|
+
:auth_names => auth_names,
|
|
216
|
+
:return_type => return_type
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
220
|
+
if @api_client.config.debugging
|
|
221
|
+
@api_client.config.logger.debug "API called: WebhookApi#get_webhook_event_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
222
|
+
end
|
|
223
|
+
return data, status_code, headers
|
|
224
|
+
end
|
|
225
|
+
|
|
168
226
|
# Retrieve an individual log
|
|
169
227
|
# Retrieves an individual log for a webhook given the webhook oid the request id.
|
|
170
228
|
# @param webhook_oid [Integer] The webhook oid that owns the log.
|
|
@@ -0,0 +1,258 @@
|
|
|
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 WebhookEventCategoriesResponse
|
|
18
|
+
attr_accessor :error
|
|
19
|
+
|
|
20
|
+
attr_accessor :event_categories
|
|
21
|
+
|
|
22
|
+
attr_accessor :metadata
|
|
23
|
+
|
|
24
|
+
# Indicates if API call was successful
|
|
25
|
+
attr_accessor :success
|
|
26
|
+
|
|
27
|
+
attr_accessor :warning
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'error' => :'error',
|
|
33
|
+
:'event_categories' => :'event_categories',
|
|
34
|
+
:'metadata' => :'metadata',
|
|
35
|
+
:'success' => :'success',
|
|
36
|
+
:'warning' => :'warning'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'error' => :'Error',
|
|
49
|
+
:'event_categories' => :'Array<WebhookEventCategory>',
|
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
|
51
|
+
:'success' => :'Boolean',
|
|
52
|
+
:'warning' => :'Warning'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::WebhookEventCategoriesResponse` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::WebhookEventCategoriesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'error')
|
|
78
|
+
self.error = attributes[:'error']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'event_categories')
|
|
82
|
+
if (value = attributes[:'event_categories']).is_a?(Array)
|
|
83
|
+
self.event_categories = value
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'metadata')
|
|
88
|
+
self.metadata = attributes[:'metadata']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'success')
|
|
92
|
+
self.success = attributes[:'success']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'warning')
|
|
96
|
+
self.warning = attributes[:'warning']
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
101
|
+
# @return Array for valid properties with the reasons
|
|
102
|
+
def list_invalid_properties
|
|
103
|
+
invalid_properties = Array.new
|
|
104
|
+
invalid_properties
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Check to see if the all the properties in the model are valid
|
|
108
|
+
# @return true if the model is valid
|
|
109
|
+
def valid?
|
|
110
|
+
true
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Checks equality by comparing each attribute.
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def ==(o)
|
|
116
|
+
return true if self.equal?(o)
|
|
117
|
+
self.class == o.class &&
|
|
118
|
+
error == o.error &&
|
|
119
|
+
event_categories == o.event_categories &&
|
|
120
|
+
metadata == o.metadata &&
|
|
121
|
+
success == o.success &&
|
|
122
|
+
warning == o.warning
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# @see the `==` method
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def eql?(o)
|
|
128
|
+
self == o
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Calculates hash code according to all attributes.
|
|
132
|
+
# @return [Integer] Hash code
|
|
133
|
+
def hash
|
|
134
|
+
[error, event_categories, metadata, success, warning].hash
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Builds the object from hash
|
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
139
|
+
# @return [Object] Returns the model itself
|
|
140
|
+
def self.build_from_hash(attributes)
|
|
141
|
+
new.build_from_hash(attributes)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Builds the object from hash
|
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
146
|
+
# @return [Object] Returns the model itself
|
|
147
|
+
def build_from_hash(attributes)
|
|
148
|
+
return nil unless attributes.is_a?(Hash)
|
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
150
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
151
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
152
|
+
self.send("#{key}=", nil)
|
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
154
|
+
# check to ensure the input is an array given that the attribute
|
|
155
|
+
# is documented as an array but the input is not
|
|
156
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
157
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
158
|
+
end
|
|
159
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
160
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
self
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Deserializes the data based on type
|
|
168
|
+
# @param string type Data type
|
|
169
|
+
# @param string value Value to be deserialized
|
|
170
|
+
# @return [Object] Deserialized data
|
|
171
|
+
def _deserialize(type, value)
|
|
172
|
+
case type.to_sym
|
|
173
|
+
when :Time
|
|
174
|
+
Time.parse(value)
|
|
175
|
+
when :Date
|
|
176
|
+
Date.parse(value)
|
|
177
|
+
when :String
|
|
178
|
+
value.to_s
|
|
179
|
+
when :Integer
|
|
180
|
+
value.to_i
|
|
181
|
+
when :Float
|
|
182
|
+
value.to_f
|
|
183
|
+
when :Boolean
|
|
184
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
185
|
+
true
|
|
186
|
+
else
|
|
187
|
+
false
|
|
188
|
+
end
|
|
189
|
+
when :Object
|
|
190
|
+
# generic object (usually a Hash), return directly
|
|
191
|
+
value
|
|
192
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
193
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
194
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
195
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
196
|
+
k_type = Regexp.last_match[:k_type]
|
|
197
|
+
v_type = Regexp.last_match[:v_type]
|
|
198
|
+
{}.tap do |hash|
|
|
199
|
+
value.each do |k, v|
|
|
200
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
else # model
|
|
204
|
+
# models (e.g. Pet) or oneOf
|
|
205
|
+
klass = UltracartClient.const_get(type)
|
|
206
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns the string representation of the object
|
|
211
|
+
# @return [String] String presentation of the object
|
|
212
|
+
def to_s
|
|
213
|
+
to_hash.to_s
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
|
218
|
+
def to_body
|
|
219
|
+
to_hash
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Returns the object in the form of hash
|
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
|
224
|
+
def to_hash
|
|
225
|
+
hash = {}
|
|
226
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
227
|
+
value = self.send(attr)
|
|
228
|
+
if value.nil?
|
|
229
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
230
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
hash[param] = _to_hash(value)
|
|
234
|
+
end
|
|
235
|
+
hash
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Outputs non-array value in the form of hash
|
|
239
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
240
|
+
# @param [Object] value Any valid value
|
|
241
|
+
# @return [Hash] Returns the value in the form of hash
|
|
242
|
+
def _to_hash(value)
|
|
243
|
+
if value.is_a?(Array)
|
|
244
|
+
value.compact.map { |v| _to_hash(v) }
|
|
245
|
+
elsif value.is_a?(Hash)
|
|
246
|
+
{}.tap do |hash|
|
|
247
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
248
|
+
end
|
|
249
|
+
elsif value.respond_to? :to_hash
|
|
250
|
+
value.to_hash
|
|
251
|
+
else
|
|
252
|
+
value
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -972,6 +972,7 @@ require 'ultracart_api/models/users_response'
|
|
|
972
972
|
require 'ultracart_api/models/verification_record'
|
|
973
973
|
require 'ultracart_api/models/warning'
|
|
974
974
|
require 'ultracart_api/models/webhook'
|
|
975
|
+
require 'ultracart_api/models/webhook_event_categories_response'
|
|
975
976
|
require 'ultracart_api/models/webhook_event_category'
|
|
976
977
|
require 'ultracart_api/models/webhook_event_subscription'
|
|
977
978
|
require 'ultracart_api/models/webhook_log'
|
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.
|
|
4
|
+
version: 4.1.90
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1036,6 +1036,7 @@ files:
|
|
|
1036
1036
|
- docs/Warning.md
|
|
1037
1037
|
- docs/Webhook.md
|
|
1038
1038
|
- docs/WebhookApi.md
|
|
1039
|
+
- docs/WebhookEventCategoriesResponse.md
|
|
1039
1040
|
- docs/WebhookEventCategory.md
|
|
1040
1041
|
- docs/WebhookEventSubscription.md
|
|
1041
1042
|
- docs/WebhookLog.md
|
|
@@ -2047,6 +2048,7 @@ files:
|
|
|
2047
2048
|
- lib/ultracart_api/models/verification_record.rb
|
|
2048
2049
|
- lib/ultracart_api/models/warning.rb
|
|
2049
2050
|
- lib/ultracart_api/models/webhook.rb
|
|
2051
|
+
- lib/ultracart_api/models/webhook_event_categories_response.rb
|
|
2050
2052
|
- lib/ultracart_api/models/webhook_event_category.rb
|
|
2051
2053
|
- lib/ultracart_api/models/webhook_event_subscription.rb
|
|
2052
2054
|
- lib/ultracart_api/models/webhook_log.rb
|