ultracart_api 4.0.116.rc → 4.0.118.rc

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: 35d4555afa704b016783a953bb059a498265026f368db51f6eeffe051fdeae19
4
- data.tar.gz: 88004aadcb2723d387927b90466d572bb13f401ff8bc3cc761e4d8742d8f99a9
3
+ metadata.gz: fd7cb0d43365ce14e0799ce1559f540b16da72363e8aa4620fc4d832f77c65b6
4
+ data.tar.gz: 73bf771472050a00cec69e87107dcc7e8e6d7160e0de596e6e4f8b076aedcb86
5
5
  SHA512:
6
- metadata.gz: 62a60c04dcf2f81b3e430477bd966011d172d8f4d061fef509780cfde38f7f62035ef52f79c3826857eb793a54c35326dfd5241bf43ff38c50af9a2c80e77551
7
- data.tar.gz: 6995a0c539ba0af06986e1398aa4c6f811901a0ffb836604ec13d918425261db22ded508a2d9b9f1152dee4ed69e64f7e00004c1a2df4b38497e255cb81149e0
6
+ metadata.gz: d9dd0ae5da2c0c9ed3932d06a1d3129ab29748495a1c821fc54f5a1eae7836ac976ea570d4b198146ab9c06423c41153a378d7798ebff119f489d45359af3db0
7
+ data.tar.gz: 57f0140f93a9c588d51ef339800c8f282f45d267ddab427e63aa3343d276c060731e281686ea6dbd683b52250323df06378beda01cd073887a3659d3e42913cd
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.116.rc
10
+ - Package version: 4.0.118.rc
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.116.rc.gem
27
+ gem install ./ultracart_api-4.0.118.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.116.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.118.rc.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.116.rc'
36
+ gem 'ultracart_api', '~> 4.0.118.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -145,6 +145,7 @@ Class | Method | HTTP request | Description
145
145
  *UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
146
146
  *UltracartClient::ConversationApi* | [**get_conversation_canned_messages**](docs/ConversationApi.md#get_conversation_canned_messages) | **GET** /conversation/canned_messages | Retrieve a list of canned messages ordered by short_code
147
147
  *UltracartClient::ConversationApi* | [**get_conversation_context**](docs/ConversationApi.md#get_conversation_context) | **PUT** /conversation/conversations/{conversation_uuid}/context | Get a webchat conversation context
148
+ *UltracartClient::ConversationApi* | [**get_conversation_department_member_list**](docs/ConversationApi.md#get_conversation_department_member_list) | **GET** /conversation/department_members | Retrieve a list of possible department members
148
149
  *UltracartClient::ConversationApi* | [**get_conversation_departments**](docs/ConversationApi.md#get_conversation_departments) | **GET** /conversation/departments | Retrieve a list of departments ordered by name
149
150
  *UltracartClient::ConversationApi* | [**get_conversation_engagements**](docs/ConversationApi.md#get_conversation_engagements) | **GET** /conversation/engagements | Retrieve a list of engagements ordered by name
150
151
  *UltracartClient::ConversationApi* | [**get_conversation_messages**](docs/ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages
@@ -625,6 +626,8 @@ Class | Method | HTTP request | Description
625
626
  - [UltracartClient::ConversationCannedMessagesResponse](docs/ConversationCannedMessagesResponse.md)
626
627
  - [UltracartClient::ConversationCannedMessagesSearch](docs/ConversationCannedMessagesSearch.md)
627
628
  - [UltracartClient::ConversationDepartment](docs/ConversationDepartment.md)
629
+ - [UltracartClient::ConversationDepartmentMember](docs/ConversationDepartmentMember.md)
630
+ - [UltracartClient::ConversationDepartmentMembersResponse](docs/ConversationDepartmentMembersResponse.md)
628
631
  - [UltracartClient::ConversationDepartmentResponse](docs/ConversationDepartmentResponse.md)
629
632
  - [UltracartClient::ConversationDepartmentsResponse](docs/ConversationDepartmentsResponse.md)
630
633
  - [UltracartClient::ConversationEngagement](docs/ConversationEngagement.md)
@@ -1290,6 +1293,8 @@ Not every change is committed to every SDK.
1290
1293
 
1291
1294
  | Version | Date | Comments |
1292
1295
  | --: | :-: | --- |
1296
+ | 4.0.118-RC | 01/18/2023 | conversation get dept member list method added |
1297
+ | 4.0.117-RC | 01/18/2023 | conversation dept members |
1293
1298
  | 4.0.116-RC | 01/18/2023 | channel partner ship to pref desc field |
1294
1299
  | 4.0.115-RC | 01/17/2023 | changed convo webchat constant |
1295
1300
  | 4.0.114-RC | 01/17/2023 | support for checkout item properties |
@@ -12,6 +12,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
12
12
  | [**get_conversation**](ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation |
13
13
  | [**get_conversation_canned_messages**](ConversationApi.md#get_conversation_canned_messages) | **GET** /conversation/canned_messages | Retrieve a list of canned messages ordered by short_code |
14
14
  | [**get_conversation_context**](ConversationApi.md#get_conversation_context) | **PUT** /conversation/conversations/{conversation_uuid}/context | Get a webchat conversation context |
15
+ | [**get_conversation_department_member_list**](ConversationApi.md#get_conversation_department_member_list) | **GET** /conversation/department_members | Retrieve a list of possible department members |
15
16
  | [**get_conversation_departments**](ConversationApi.md#get_conversation_departments) | **GET** /conversation/departments | Retrieve a list of departments ordered by name |
16
17
  | [**get_conversation_engagements**](ConversationApi.md#get_conversation_engagements) | **GET** /conversation/engagements | Retrieve a list of engagements ordered by name |
17
18
  | [**get_conversation_messages**](ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages |
@@ -593,6 +594,74 @@ end
593
594
  - **Accept**: application/json
594
595
 
595
596
 
597
+ ## get_conversation_department_member_list
598
+
599
+ > <ConversationDepartmentMembersResponse> get_conversation_department_member_list
600
+
601
+ Retrieve a list of possible department members
602
+
603
+ Retrieve a list of possible department members
604
+
605
+ ### Examples
606
+
607
+ ```ruby
608
+ require 'time'
609
+ require 'ultracart_api'
610
+ require 'json'
611
+ require 'yaml'
612
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
613
+
614
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
615
+ # As such, this might not be the best way to use this object.
616
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
617
+
618
+ api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
619
+
620
+ begin
621
+ # Retrieve a list of possible department members
622
+ result = api_instance.get_conversation_department_member_list
623
+ p result
624
+ rescue UltracartClient::ApiError => e
625
+ puts "Error when calling ConversationApi->get_conversation_department_member_list: #{e}"
626
+ end
627
+ ```
628
+
629
+ #### Using the get_conversation_department_member_list_with_http_info variant
630
+
631
+ This returns an Array which contains the response data, status code and headers.
632
+
633
+ > <Array(<ConversationDepartmentMembersResponse>, Integer, Hash)> get_conversation_department_member_list_with_http_info
634
+
635
+ ```ruby
636
+ begin
637
+ # Retrieve a list of possible department members
638
+ data, status_code, headers = api_instance.get_conversation_department_member_list_with_http_info
639
+ p status_code # => 2xx
640
+ p headers # => { ... }
641
+ p data # => <ConversationDepartmentMembersResponse>
642
+ rescue UltracartClient::ApiError => e
643
+ puts "Error when calling ConversationApi->get_conversation_department_member_list_with_http_info: #{e}"
644
+ end
645
+ ```
646
+
647
+ ### Parameters
648
+
649
+ This endpoint does not need any parameter.
650
+
651
+ ### Return type
652
+
653
+ [**ConversationDepartmentMembersResponse**](ConversationDepartmentMembersResponse.md)
654
+
655
+ ### Authorization
656
+
657
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
658
+
659
+ ### HTTP request headers
660
+
661
+ - **Content-Type**: Not defined
662
+ - **Accept**: application/json
663
+
664
+
596
665
  ## get_conversation_departments
597
666
 
598
667
  > <ConversationDepartmentsResponse> get_conversation_departments
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **conversation_department_oid** | **Integer** | | [optional] |
8
8
  | **department_name** | **String** | | [optional] |
9
+ | **members** | [**Array&lt;ConversationDepartmentMember&gt;**](ConversationDepartmentMember.md) | | [optional] |
9
10
  | **merchant_id** | **String** | | [optional] |
10
11
  | **settings** | **Object** | | [optional] |
11
12
 
@@ -17,6 +18,7 @@ require 'ultracart_api'
17
18
  instance = UltracartClient::ConversationDepartment.new(
18
19
  conversation_department_oid: null,
19
20
  department_name: null,
21
+ members: null,
20
22
  merchant_id: null,
21
23
  settings: null
22
24
  )
@@ -0,0 +1,22 @@
1
+ # UltracartClient::ConversationDepartmentMember
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **member** | **Boolean** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **user_id** | **Integer** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::ConversationDepartmentMember.new(
17
+ member: null,
18
+ name: null,
19
+ user_id: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::ConversationDepartmentMembersResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_department_members** | [**Array&lt;ConversationDepartmentMember&gt;**](ConversationDepartmentMember.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::ConversationDepartmentMembersResponse.new(
19
+ conversation_department_members: null,
20
+ error: null,
21
+ metadata: null,
22
+ success: null,
23
+ warning: null
24
+ )
25
+ ```
26
+
@@ -7,6 +7,7 @@
7
7
  | **conversation_departments** | [**Array&lt;ConversationDepartment&gt;**](ConversationDepartment.md) | | [optional] |
8
8
  | **error** | [**Error**](Error.md) | | [optional] |
9
9
  | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
10
+ | **read_only** | **Boolean** | | [optional] |
10
11
  | **success** | **Boolean** | Indicates if API call was successful | [optional] |
11
12
  | **warning** | [**Warning**](Warning.md) | | [optional] |
12
13
 
@@ -19,6 +20,7 @@ instance = UltracartClient::ConversationDepartmentsResponse.new(
19
20
  conversation_departments: null,
20
21
  error: null,
21
22
  metadata: null,
23
+ read_only: null,
22
24
  success: null,
23
25
  warning: null
24
26
  )
@@ -529,6 +529,64 @@ module UltracartClient
529
529
  return data, status_code, headers
530
530
  end
531
531
 
532
+ # Retrieve a list of possible department members
533
+ # Retrieve a list of possible department members
534
+ # @param [Hash] opts the optional parameters
535
+ # @return [ConversationDepartmentMembersResponse]
536
+ def get_conversation_department_member_list(opts = {})
537
+ data, _status_code, _headers = get_conversation_department_member_list_with_http_info(opts)
538
+ data
539
+ end
540
+
541
+ # Retrieve a list of possible department members
542
+ # Retrieve a list of possible department members
543
+ # @param [Hash] opts the optional parameters
544
+ # @return [Array<(ConversationDepartmentMembersResponse, Integer, Hash)>] ConversationDepartmentMembersResponse data, response status code and response headers
545
+ def get_conversation_department_member_list_with_http_info(opts = {})
546
+ if @api_client.config.debugging
547
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_department_member_list ...'
548
+ end
549
+ # resource path
550
+ local_var_path = '/conversation/department_members'
551
+
552
+ # query parameters
553
+ query_params = opts[:query_params] || {}
554
+
555
+ # header parameters
556
+ header_params = opts[:header_params] || {}
557
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
558
+ # HTTP header 'Accept' (if needed)
559
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
560
+
561
+ # form parameters
562
+ form_params = opts[:form_params] || {}
563
+
564
+ # http body (model)
565
+ post_body = opts[:debug_body]
566
+
567
+ # return_type
568
+ return_type = opts[:debug_return_type] || 'ConversationDepartmentMembersResponse'
569
+
570
+ # auth_names
571
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
572
+
573
+ new_options = opts.merge(
574
+ :operation => :"ConversationApi.get_conversation_department_member_list",
575
+ :header_params => header_params,
576
+ :query_params => query_params,
577
+ :form_params => form_params,
578
+ :body => post_body,
579
+ :auth_names => auth_names,
580
+ :return_type => return_type
581
+ )
582
+
583
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
584
+ if @api_client.config.debugging
585
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversation_department_member_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
586
+ end
587
+ return data, status_code, headers
588
+ end
589
+
532
590
  # Retrieve a list of departments ordered by name
533
591
  # Retrieve a list of departments ordered by name
534
592
  # @param [Hash] opts the optional parameters
@@ -19,6 +19,8 @@ module UltracartClient
19
19
 
20
20
  attr_accessor :department_name
21
21
 
22
+ attr_accessor :members
23
+
22
24
  attr_accessor :merchant_id
23
25
 
24
26
  attr_accessor :settings
@@ -28,6 +30,7 @@ module UltracartClient
28
30
  {
29
31
  :'conversation_department_oid' => :'conversation_department_oid',
30
32
  :'department_name' => :'department_name',
33
+ :'members' => :'members',
31
34
  :'merchant_id' => :'merchant_id',
32
35
  :'settings' => :'settings'
33
36
  }
@@ -43,6 +46,7 @@ module UltracartClient
43
46
  {
44
47
  :'conversation_department_oid' => :'Integer',
45
48
  :'department_name' => :'String',
49
+ :'members' => :'Array<ConversationDepartmentMember>',
46
50
  :'merchant_id' => :'String',
47
51
  :'settings' => :'Object'
48
52
  }
@@ -77,6 +81,12 @@ module UltracartClient
77
81
  self.department_name = attributes[:'department_name']
78
82
  end
79
83
 
84
+ if attributes.key?(:'members')
85
+ if (value = attributes[:'members']).is_a?(Array)
86
+ self.members = value
87
+ end
88
+ end
89
+
80
90
  if attributes.key?(:'merchant_id')
81
91
  self.merchant_id = attributes[:'merchant_id']
82
92
  end
@@ -106,6 +116,7 @@ module UltracartClient
106
116
  self.class == o.class &&
107
117
  conversation_department_oid == o.conversation_department_oid &&
108
118
  department_name == o.department_name &&
119
+ members == o.members &&
109
120
  merchant_id == o.merchant_id &&
110
121
  settings == o.settings
111
122
  end
@@ -119,7 +130,7 @@ module UltracartClient
119
130
  # Calculates hash code according to all attributes.
120
131
  # @return [Integer] Hash code
121
132
  def hash
122
- [conversation_department_oid, department_name, merchant_id, settings].hash
133
+ [conversation_department_oid, department_name, members, merchant_id, settings].hash
123
134
  end
124
135
 
125
136
  # 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 ConversationDepartmentMember
18
+ attr_accessor :member
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :user_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'member' => :'member',
28
+ :'name' => :'name',
29
+ :'user_id' => :'user_id'
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
+ :'member' => :'Boolean',
42
+ :'name' => :'String',
43
+ :'user_id' => :'Integer'
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::ConversationDepartmentMember` 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::ConversationDepartmentMember`. 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?(:'member')
69
+ self.member = attributes[:'member']
70
+ end
71
+
72
+ if attributes.key?(:'name')
73
+ self.name = attributes[:'name']
74
+ end
75
+
76
+ if attributes.key?(:'user_id')
77
+ self.user_id = attributes[:'user_id']
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
+ member == o.member &&
100
+ name == o.name &&
101
+ user_id == o.user_id
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
+ [member, name, user_id].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,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 ConversationDepartmentMembersResponse
18
+ attr_accessor :conversation_department_members
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
+ :'conversation_department_members' => :'conversation_department_members',
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
+ :'conversation_department_members' => :'Array<ConversationDepartmentMember>',
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::ConversationDepartmentMembersResponse` 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::ConversationDepartmentMembersResponse`. 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?(:'conversation_department_members')
78
+ if (value = attributes[:'conversation_department_members']).is_a?(Array)
79
+ self.conversation_department_members = value
80
+ end
81
+ end
82
+
83
+ if attributes.key?(:'error')
84
+ self.error = attributes[:'error']
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
+ conversation_department_members == o.conversation_department_members &&
119
+ error == o.error &&
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
+ [conversation_department_members, error, 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
@@ -21,6 +21,8 @@ module UltracartClient
21
21
 
22
22
  attr_accessor :metadata
23
23
 
24
+ attr_accessor :read_only
25
+
24
26
  # Indicates if API call was successful
25
27
  attr_accessor :success
26
28
 
@@ -32,6 +34,7 @@ module UltracartClient
32
34
  :'conversation_departments' => :'conversation_departments',
33
35
  :'error' => :'error',
34
36
  :'metadata' => :'metadata',
37
+ :'read_only' => :'read_only',
35
38
  :'success' => :'success',
36
39
  :'warning' => :'warning'
37
40
  }
@@ -48,6 +51,7 @@ module UltracartClient
48
51
  :'conversation_departments' => :'Array<ConversationDepartment>',
49
52
  :'error' => :'Error',
50
53
  :'metadata' => :'ResponseMetadata',
54
+ :'read_only' => :'Boolean',
51
55
  :'success' => :'Boolean',
52
56
  :'warning' => :'Warning'
53
57
  }
@@ -88,6 +92,10 @@ module UltracartClient
88
92
  self.metadata = attributes[:'metadata']
89
93
  end
90
94
 
95
+ if attributes.key?(:'read_only')
96
+ self.read_only = attributes[:'read_only']
97
+ end
98
+
91
99
  if attributes.key?(:'success')
92
100
  self.success = attributes[:'success']
93
101
  end
@@ -118,6 +126,7 @@ module UltracartClient
118
126
  conversation_departments == o.conversation_departments &&
119
127
  error == o.error &&
120
128
  metadata == o.metadata &&
129
+ read_only == o.read_only &&
121
130
  success == o.success &&
122
131
  warning == o.warning
123
132
  end
@@ -131,7 +140,7 @@ module UltracartClient
131
140
  # Calculates hash code according to all attributes.
132
141
  # @return [Integer] Hash code
133
142
  def hash
134
- [conversation_departments, error, metadata, success, warning].hash
143
+ [conversation_departments, error, metadata, read_only, success, warning].hash
135
144
  end
136
145
 
137
146
  # 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.0.116.rc'
14
+ VERSION = '4.0.118.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -151,6 +151,8 @@ require 'ultracart_api/models/conversation_canned_message_response'
151
151
  require 'ultracart_api/models/conversation_canned_messages_response'
152
152
  require 'ultracart_api/models/conversation_canned_messages_search'
153
153
  require 'ultracart_api/models/conversation_department'
154
+ require 'ultracart_api/models/conversation_department_member'
155
+ require 'ultracart_api/models/conversation_department_members_response'
154
156
  require 'ultracart_api/models/conversation_department_response'
155
157
  require 'ultracart_api/models/conversation_departments_response'
156
158
  require 'ultracart_api/models/conversation_engagement'
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.0.116.rc
4
+ version: 4.0.118.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -201,6 +201,8 @@ files:
201
201
  - docs/ConversationCannedMessagesResponse.md
202
202
  - docs/ConversationCannedMessagesSearch.md
203
203
  - docs/ConversationDepartment.md
204
+ - docs/ConversationDepartmentMember.md
205
+ - docs/ConversationDepartmentMembersResponse.md
204
206
  - docs/ConversationDepartmentResponse.md
205
207
  - docs/ConversationDepartmentsResponse.md
206
208
  - docs/ConversationEngagement.md
@@ -964,6 +966,8 @@ files:
964
966
  - lib/ultracart_api/models/conversation_canned_messages_response.rb
965
967
  - lib/ultracart_api/models/conversation_canned_messages_search.rb
966
968
  - lib/ultracart_api/models/conversation_department.rb
969
+ - lib/ultracart_api/models/conversation_department_member.rb
970
+ - lib/ultracart_api/models/conversation_department_members_response.rb
967
971
  - lib/ultracart_api/models/conversation_department_response.rb
968
972
  - lib/ultracart_api/models/conversation_departments_response.rb
969
973
  - lib/ultracart_api/models/conversation_engagement.rb