ultracart_api 4.0.202 → 4.0.203

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: 0e939a6711a94c20f3f4210b4c3a327d16fd53c492226a2bb7d12956d416e5a7
4
- data.tar.gz: dd888c02f5c6df31e4f711ea06e87643a4899a1fa6a6889a922fb8136f3c97e6
3
+ metadata.gz: 2741f3ab5cd18a9833cadc8808fba3d863b042f81b7f5c681c838691c53239c6
4
+ data.tar.gz: b0ef5867ded4987ffd1df0286c5a33f21e1396c39444877a14b1bcb1e954140c
5
5
  SHA512:
6
- metadata.gz: 7d6f11387fe4b45c7714eda8c849f56ebe8cb9f4ce55c376b5e53b01f50ee2e884a7c5aee881cbf3889fa40e1c8c37736451f855f4871cc3ab0029035c7f434f
7
- data.tar.gz: c829fb8296b79c36e0aff60a6031b7827279fcaeb3a7c58c35aff565648bf44a3b9ff437c7ce18dd4d2d0226d1ebaab1c38196f04453df428bdb378de3d4372f
6
+ metadata.gz: 907343341ebb75dbf1292d6833886ba79d0340c23fcebfb0011595c9c2cc87689852e5367721de2604d160834f83b11b94a9c8f7421009c71d84038d0496e57b
7
+ data.tar.gz: 9a49b85125ae2377508cdcc2627bdf74191d91998ce2dab74f5fa4e1b62c3444817d2b048db46abf7ac275a616b0b9f7682fbc547ea19c119c8cf0c4db027ca1
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.202
10
+ - Package version: 4.0.203
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.202.gem
27
+ gem install ./ultracart_api-4.0.203.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.202.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.203.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.202'
36
+ gem 'ultracart_api', '~> 4.0.203'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -562,6 +562,7 @@ Class | Method | HTTP request | Description
562
562
  *UltracartClient::WebhookApi* | [**insert_webhook**](docs/WebhookApi.md#insert_webhook) | **POST** /webhook/webhooks | Add a webhook
563
563
  *UltracartClient::WebhookApi* | [**resend_event**](docs/WebhookApi.md#resend_event) | **POST** /webhook/webhooks/{webhookOid}/reflow/{eventName} | Resend events to the webhook endpoint.
564
564
  *UltracartClient::WebhookApi* | [**update_webhook**](docs/WebhookApi.md#update_webhook) | **PUT** /webhook/webhooks/{webhookOid} | Update a webhook
565
+ *UltracartClient::WorkflowApi* | [**get_workflow_agent_websocket_authorization**](docs/WorkflowApi.md#get_workflow_agent_websocket_authorization) | **PUT** /workflow/agent/auth | Get agent websocket authorization
565
566
  *UltracartClient::WorkflowApi* | [**get_workflow_assignment_groups**](docs/WorkflowApi.md#get_workflow_assignment_groups) | **GET** /workflow/assignment_groups | Retrieve a list of groups that workflow tasks can be assigned to
566
567
  *UltracartClient::WorkflowApi* | [**get_workflow_assignment_users**](docs/WorkflowApi.md#get_workflow_assignment_users) | **GET** /workflow/assignment_users | Retrieve a list of users that workflow tasks can be assigned to
567
568
  *UltracartClient::WorkflowApi* | [**get_workflow_me**](docs/WorkflowApi.md#get_workflow_me) | **GET** /workflow/me | Retrieve a user object for myself
@@ -1398,6 +1399,8 @@ Class | Method | HTTP request | Description
1398
1399
  - [UltracartClient::WebhookSampleRequestResponse](docs/WebhookSampleRequestResponse.md)
1399
1400
  - [UltracartClient::WebhooksResponse](docs/WebhooksResponse.md)
1400
1401
  - [UltracartClient::Weight](docs/Weight.md)
1402
+ - [UltracartClient::WorkflowAgentAuth](docs/WorkflowAgentAuth.md)
1403
+ - [UltracartClient::WorkflowAgentAuthResponse](docs/WorkflowAgentAuthResponse.md)
1401
1404
  - [UltracartClient::WorkflowAttachment](docs/WorkflowAttachment.md)
1402
1405
  - [UltracartClient::WorkflowAttachmentUploadUrl](docs/WorkflowAttachmentUploadUrl.md)
1403
1406
  - [UltracartClient::WorkflowAttachmentUploadUrlResponse](docs/WorkflowAttachmentUploadUrlResponse.md)
@@ -1488,6 +1491,7 @@ Not every change is committed to every SDK.
1488
1491
 
1489
1492
  | Version | Date | Comments |
1490
1493
  | --: | :-: | --- |
1494
+ | 4.0.203 | 03/15/2024 | workflow - getWorkflowAgentWebsocketAuthorization method added |
1491
1495
  | 4.0.202 | 03/08/2024 | added getWorkflowTaskTags method |
1492
1496
  | 4.0.201 | 02/27/2024 | esp - sms statistic layer |
1493
1497
  | 4.0.200 | 02/20/2024 | Add tag support to CouponAmountOffItems, CouponBuyOneGetOneLimit, CouponDiscountItemWithItemPurchase, CouponFreeItemWithItemPurchase, CouponPercentOffItemsWithItemsPurchase |
@@ -22,6 +22,8 @@
22
22
  | **twilio_taskrouter_workflow_sid** | **String** | Twilio taskrouter workflow sid | [optional] |
23
23
  | **twilio_workspace_queue_sid** | **String** | Twilio workspace queue sid | [optional] |
24
24
  | **voicemail** | **Boolean** | If true, this queue has a voicemail associated with it | [optional] |
25
+ | **wait_critical_seconds** | **Integer** | Wait time in seconds before critical | [optional] |
26
+ | **wait_warning_seconds** | **Integer** | Wait time in seconds before warning | [optional] |
25
27
 
26
28
  ## Example
27
29
 
@@ -46,7 +48,9 @@ instance = UltracartClient::ConversationPbxQueue.new(
46
48
  say_voice: null,
47
49
  twilio_taskrouter_workflow_sid: null,
48
50
  twilio_workspace_queue_sid: null,
49
- voicemail: null
51
+ voicemail: null,
52
+ wait_critical_seconds: null,
53
+ wait_warning_seconds: null
50
54
  )
51
55
  ```
52
56
 
@@ -0,0 +1,22 @@
1
+ # UltracartClient::WorkflowAgentAuth
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **jwt** | **String** | | [optional] |
8
+ | **merchant_id** | **String** | | [optional] |
9
+ | **websocket_url** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::WorkflowAgentAuth.new(
17
+ jwt: null,
18
+ merchant_id: null,
19
+ websocket_url: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::WorkflowAgentAuthResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **agent_auth** | [**WorkflowAgentAuth**](WorkflowAgentAuth.md) | | [optional] |
8
+ | **error** | [**Error**](Error.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::WorkflowAgentAuthResponse.new(
19
+ agent_auth: null,
20
+ error: null,
21
+ metadata: null,
22
+ success: null,
23
+ warning: null
24
+ )
25
+ ```
26
+
data/docs/WorkflowApi.md CHANGED
@@ -4,6 +4,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
+ | [**get_workflow_agent_websocket_authorization**](WorkflowApi.md#get_workflow_agent_websocket_authorization) | **PUT** /workflow/agent/auth | Get agent websocket authorization |
7
8
  | [**get_workflow_assignment_groups**](WorkflowApi.md#get_workflow_assignment_groups) | **GET** /workflow/assignment_groups | Retrieve a list of groups that workflow tasks can be assigned to |
8
9
  | [**get_workflow_assignment_users**](WorkflowApi.md#get_workflow_assignment_users) | **GET** /workflow/assignment_users | Retrieve a list of users that workflow tasks can be assigned to |
9
10
  | [**get_workflow_me**](WorkflowApi.md#get_workflow_me) | **GET** /workflow/me | Retrieve a user object for myself |
@@ -16,6 +17,74 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
16
17
  | [**update_workflow_task**](WorkflowApi.md#update_workflow_task) | **PUT** /workflow/tasks/{task_uuid} | Update a workflow task |
17
18
 
18
19
 
20
+ ## get_workflow_agent_websocket_authorization
21
+
22
+ > <WorkflowAgentAuthResponse> get_workflow_agent_websocket_authorization
23
+
24
+ Get agent websocket authorization
25
+
26
+ Retrieve a JWT to authorize an agent to make a websocket connection.
27
+
28
+ ### Examples
29
+
30
+ ```ruby
31
+ require 'time'
32
+ require 'ultracart_api'
33
+ require 'json'
34
+ require 'yaml'
35
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
36
+
37
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
38
+ # As such, this might not be the best way to use this object.
39
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
40
+
41
+ api = UltracartClient::WorkflowApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
42
+
43
+ begin
44
+ # Get agent websocket authorization
45
+ result = api_instance.get_workflow_agent_websocket_authorization
46
+ p result
47
+ rescue UltracartClient::ApiError => e
48
+ puts "Error when calling WorkflowApi->get_workflow_agent_websocket_authorization: #{e}"
49
+ end
50
+ ```
51
+
52
+ #### Using the get_workflow_agent_websocket_authorization_with_http_info variant
53
+
54
+ This returns an Array which contains the response data, status code and headers.
55
+
56
+ > <Array(<WorkflowAgentAuthResponse>, Integer, Hash)> get_workflow_agent_websocket_authorization_with_http_info
57
+
58
+ ```ruby
59
+ begin
60
+ # Get agent websocket authorization
61
+ data, status_code, headers = api_instance.get_workflow_agent_websocket_authorization_with_http_info
62
+ p status_code # => 2xx
63
+ p headers # => { ... }
64
+ p data # => <WorkflowAgentAuthResponse>
65
+ rescue UltracartClient::ApiError => e
66
+ puts "Error when calling WorkflowApi->get_workflow_agent_websocket_authorization_with_http_info: #{e}"
67
+ end
68
+ ```
69
+
70
+ ### Parameters
71
+
72
+ This endpoint does not need any parameter.
73
+
74
+ ### Return type
75
+
76
+ [**WorkflowAgentAuthResponse**](WorkflowAgentAuthResponse.md)
77
+
78
+ ### Authorization
79
+
80
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
81
+
82
+ ### HTTP request headers
83
+
84
+ - **Content-Type**: Not defined
85
+ - **Accept**: application/json
86
+
87
+
19
88
  ## get_workflow_assignment_groups
20
89
 
21
90
  > <WorkflowGroupsResponse> get_workflow_assignment_groups(opts)
@@ -32,6 +32,64 @@ module UltracartClient
32
32
  UltracartClient::WorkflowApi.new(api_client)
33
33
  end
34
34
 
35
+ # Get agent websocket authorization
36
+ # Retrieve a JWT to authorize an agent to make a websocket connection.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [WorkflowAgentAuthResponse]
39
+ def get_workflow_agent_websocket_authorization(opts = {})
40
+ data, _status_code, _headers = get_workflow_agent_websocket_authorization_with_http_info(opts)
41
+ data
42
+ end
43
+
44
+ # Get agent websocket authorization
45
+ # Retrieve a JWT to authorize an agent to make a websocket connection.
46
+ # @param [Hash] opts the optional parameters
47
+ # @return [Array<(WorkflowAgentAuthResponse, Integer, Hash)>] WorkflowAgentAuthResponse data, response status code and response headers
48
+ def get_workflow_agent_websocket_authorization_with_http_info(opts = {})
49
+ if @api_client.config.debugging
50
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_agent_websocket_authorization ...'
51
+ end
52
+ # resource path
53
+ local_var_path = '/workflow/agent/auth'
54
+
55
+ # query parameters
56
+ query_params = opts[:query_params] || {}
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body]
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type] || 'WorkflowAgentAuthResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"WorkflowApi.get_workflow_agent_websocket_authorization",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_agent_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
35
93
  # Retrieve a list of groups that workflow tasks can be assigned to
36
94
  # Retrieve a list of groups that workflow tasks can be assigned to
37
95
  # @param [Hash] opts the optional parameters
@@ -68,6 +68,12 @@ module UltracartClient
68
68
  # If true, this queue has a voicemail associated with it
69
69
  attr_accessor :voicemail
70
70
 
71
+ # Wait time in seconds before critical
72
+ attr_accessor :wait_critical_seconds
73
+
74
+ # Wait time in seconds before warning
75
+ attr_accessor :wait_warning_seconds
76
+
71
77
  # Attribute mapping from ruby-style variable name to JSON key.
72
78
  def self.attribute_map
73
79
  {
@@ -88,7 +94,9 @@ module UltracartClient
88
94
  :'say_voice' => :'say_voice',
89
95
  :'twilio_taskrouter_workflow_sid' => :'twilio_taskrouter_workflow_sid',
90
96
  :'twilio_workspace_queue_sid' => :'twilio_workspace_queue_sid',
91
- :'voicemail' => :'voicemail'
97
+ :'voicemail' => :'voicemail',
98
+ :'wait_critical_seconds' => :'wait_critical_seconds',
99
+ :'wait_warning_seconds' => :'wait_warning_seconds'
92
100
  }
93
101
  end
94
102
 
@@ -117,7 +125,9 @@ module UltracartClient
117
125
  :'say_voice' => :'String',
118
126
  :'twilio_taskrouter_workflow_sid' => :'String',
119
127
  :'twilio_workspace_queue_sid' => :'String',
120
- :'voicemail' => :'Boolean'
128
+ :'voicemail' => :'Boolean',
129
+ :'wait_critical_seconds' => :'Integer',
130
+ :'wait_warning_seconds' => :'Integer'
121
131
  }
122
132
  end
123
133
 
@@ -213,6 +223,14 @@ module UltracartClient
213
223
  if attributes.key?(:'voicemail')
214
224
  self.voicemail = attributes[:'voicemail']
215
225
  end
226
+
227
+ if attributes.key?(:'wait_critical_seconds')
228
+ self.wait_critical_seconds = attributes[:'wait_critical_seconds']
229
+ end
230
+
231
+ if attributes.key?(:'wait_warning_seconds')
232
+ self.wait_warning_seconds = attributes[:'wait_warning_seconds']
233
+ end
216
234
  end
217
235
 
218
236
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -400,7 +418,9 @@ module UltracartClient
400
418
  say_voice == o.say_voice &&
401
419
  twilio_taskrouter_workflow_sid == o.twilio_taskrouter_workflow_sid &&
402
420
  twilio_workspace_queue_sid == o.twilio_workspace_queue_sid &&
403
- voicemail == o.voicemail
421
+ voicemail == o.voicemail &&
422
+ wait_critical_seconds == o.wait_critical_seconds &&
423
+ wait_warning_seconds == o.wait_warning_seconds
404
424
  end
405
425
 
406
426
  # @see the `==` method
@@ -412,7 +432,7 @@ module UltracartClient
412
432
  # Calculates hash code according to all attributes.
413
433
  # @return [Integer] Hash code
414
434
  def hash
415
- [announce_queue_position, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail].hash
435
+ [announce_queue_position, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail, wait_critical_seconds, wait_warning_seconds].hash
416
436
  end
417
437
 
418
438
  # Builds the object from hash
@@ -0,0 +1,237 @@
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 WorkflowAgentAuth
18
+ attr_accessor :jwt
19
+
20
+ attr_accessor :merchant_id
21
+
22
+ attr_accessor :websocket_url
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'jwt' => :'jwt',
28
+ :'merchant_id' => :'merchant_id',
29
+ :'websocket_url' => :'websocket_url'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'jwt' => :'String',
42
+ :'merchant_id' => :'String',
43
+ :'websocket_url' => :'String'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::WorkflowAgentAuth` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::WorkflowAgentAuth`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'jwt')
69
+ self.jwt = attributes[:'jwt']
70
+ end
71
+
72
+ if attributes.key?(:'merchant_id')
73
+ self.merchant_id = attributes[:'merchant_id']
74
+ end
75
+
76
+ if attributes.key?(:'websocket_url')
77
+ self.websocket_url = attributes[:'websocket_url']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ jwt == o.jwt &&
100
+ merchant_id == o.merchant_id &&
101
+ websocket_url == o.websocket_url
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [jwt, merchant_id, websocket_url].hash
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 self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = UltracartClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -0,0 +1,256 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class WorkflowAgentAuthResponse
18
+ attr_accessor :agent_auth
19
+
20
+ attr_accessor :error
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
+ :'agent_auth' => :'agent_auth',
33
+ :'error' => :'error',
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
+ :'agent_auth' => :'WorkflowAgentAuth',
49
+ :'error' => :'Error',
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::WorkflowAgentAuthResponse` 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::WorkflowAgentAuthResponse`. 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?(:'agent_auth')
78
+ self.agent_auth = attributes[:'agent_auth']
79
+ end
80
+
81
+ if attributes.key?(:'error')
82
+ self.error = attributes[:'error']
83
+ end
84
+
85
+ if attributes.key?(:'metadata')
86
+ self.metadata = attributes[:'metadata']
87
+ end
88
+
89
+ if attributes.key?(:'success')
90
+ self.success = attributes[:'success']
91
+ end
92
+
93
+ if attributes.key?(:'warning')
94
+ self.warning = attributes[:'warning']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ agent_auth == o.agent_auth &&
117
+ error == o.error &&
118
+ metadata == o.metadata &&
119
+ success == o.success &&
120
+ warning == o.warning
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [agent_auth, error, metadata, success, warning].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ new.build_from_hash(attributes)
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ self.class.openapi_types.each_pair do |key, type|
149
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
150
+ self.send("#{key}=", nil)
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
155
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
156
+ end
157
+ elsif !attributes[self.class.attribute_map[key]].nil?
158
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
+ end
160
+ end
161
+
162
+ self
163
+ end
164
+
165
+ # Deserializes the data based on type
166
+ # @param string type Data type
167
+ # @param string value Value to be deserialized
168
+ # @return [Object] Deserialized data
169
+ def _deserialize(type, value)
170
+ case type.to_sym
171
+ when :Time
172
+ Time.parse(value)
173
+ when :Date
174
+ Date.parse(value)
175
+ when :String
176
+ value.to_s
177
+ when :Integer
178
+ value.to_i
179
+ when :Float
180
+ value.to_f
181
+ when :Boolean
182
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
+ true
184
+ else
185
+ false
186
+ end
187
+ when :Object
188
+ # generic object (usually a Hash), return directly
189
+ value
190
+ when /\AArray<(?<inner_type>.+)>\z/
191
+ inner_type = Regexp.last_match[:inner_type]
192
+ value.map { |v| _deserialize(inner_type, v) }
193
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
+ k_type = Regexp.last_match[:k_type]
195
+ v_type = Regexp.last_match[:v_type]
196
+ {}.tap do |hash|
197
+ value.each do |k, v|
198
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
+ end
200
+ end
201
+ else # model
202
+ # models (e.g. Pet) or oneOf
203
+ klass = UltracartClient.const_get(type)
204
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
+ end
206
+ end
207
+
208
+ # Returns the string representation of the object
209
+ # @return [String] String presentation of the object
210
+ def to_s
211
+ to_hash.to_s
212
+ end
213
+
214
+ # to_body is an alias to to_hash (backward compatibility)
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_body
217
+ to_hash
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ self.class.attribute_map.each_pair do |attr, param|
225
+ value = self.send(attr)
226
+ if value.nil?
227
+ is_nullable = self.class.openapi_nullable.include?(attr)
228
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
+ end
230
+
231
+ hash[param] = _to_hash(value)
232
+ end
233
+ hash
234
+ end
235
+
236
+ # Outputs non-array value in the form of hash
237
+ # For object, use to_hash. Otherwise, just return the value
238
+ # @param [Object] value Any valid value
239
+ # @return [Hash] Returns the value in the form of hash
240
+ def _to_hash(value)
241
+ if value.is_a?(Array)
242
+ value.compact.map { |v| _to_hash(v) }
243
+ elsif value.is_a?(Hash)
244
+ {}.tap do |hash|
245
+ value.each { |k, v| hash[k] = _to_hash(v) }
246
+ end
247
+ elsif value.respond_to? :to_hash
248
+ value.to_hash
249
+ else
250
+ value
251
+ end
252
+ end
253
+
254
+ end
255
+
256
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.202'
14
+ VERSION = '4.0.203'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -839,6 +839,8 @@ require 'ultracart_api/models/webhook_sample_request'
839
839
  require 'ultracart_api/models/webhook_sample_request_response'
840
840
  require 'ultracart_api/models/webhooks_response'
841
841
  require 'ultracart_api/models/weight'
842
+ require 'ultracart_api/models/workflow_agent_auth'
843
+ require 'ultracart_api/models/workflow_agent_auth_response'
842
844
  require 'ultracart_api/models/workflow_attachment'
843
845
  require 'ultracart_api/models/workflow_attachment_upload_url'
844
846
  require 'ultracart_api/models/workflow_attachment_upload_url_response'
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.0.202
4
+ version: 4.0.203
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-08 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -903,6 +903,8 @@ files:
903
903
  - docs/WebhookSampleRequestResponse.md
904
904
  - docs/WebhooksResponse.md
905
905
  - docs/Weight.md
906
+ - docs/WorkflowAgentAuth.md
907
+ - docs/WorkflowAgentAuthResponse.md
906
908
  - docs/WorkflowApi.md
907
909
  - docs/WorkflowAttachment.md
908
910
  - docs/WorkflowAttachmentUploadUrl.md
@@ -1767,6 +1769,8 @@ files:
1767
1769
  - lib/ultracart_api/models/webhook_sample_request_response.rb
1768
1770
  - lib/ultracart_api/models/webhooks_response.rb
1769
1771
  - lib/ultracart_api/models/weight.rb
1772
+ - lib/ultracart_api/models/workflow_agent_auth.rb
1773
+ - lib/ultracart_api/models/workflow_agent_auth_response.rb
1770
1774
  - lib/ultracart_api/models/workflow_attachment.rb
1771
1775
  - lib/ultracart_api/models/workflow_attachment_upload_url.rb
1772
1776
  - lib/ultracart_api/models/workflow_attachment_upload_url_response.rb