ultracart_api 3.11.10 → 3.11.11

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: 90bf4b19fd1c3f9e8c47c98aef0e554dd36f50fa3e42b5b727d10326520566b2
4
- data.tar.gz: 78fef909b88a3fbe544b8a600bcabb61ccb77388755a6a05f6d99ca7ab57ec60
3
+ metadata.gz: cc09cf6002561dec52d2ee699501da07751a7a956ab09a7f92732553ab221a87
4
+ data.tar.gz: e051b886dcd6d5276c47ba9fc559b0aaf82d5ecb751376a4d883262d0d7e4081
5
5
  SHA512:
6
- metadata.gz: ae3a0f4f234d6ca26761724a046c6a92219a4c2c1ae67f690578cf0cdfaabd17bd546dc703df19a0806ef420fd4142735687a86941cbdfb4e1276d56df881db4
7
- data.tar.gz: bb6d3cbf3f2a36ca187f5703a9a85f7d5420eba6a78e881ce1b54136619be0b626fc3c1b1c6ce7b61f561746c1bd0a55a94949608ec7722bd429be8ea8cfd1ec
6
+ metadata.gz: d0459df2f93e959ed9614d760c7706f1f3520c6299b4fb7acd2e8ce8b2d3f17afb0b0fc0442b3164e614e48682c12d99151c093a09022c063fab3465b1b84b87
7
+ data.tar.gz: 495caa4256f20a94433b3ffb62591c772981bab0ce547decb3729dbe06a6e29ef1845f3d448a088c24c810b7e0b9492b2a8af7127d67c7abbb9cbc5e0d8cdfd2
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.11.10
10
+ - Package version: 3.11.11
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.11.10.gem
27
+ gem install ./ultracart_api-3.11.11.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.11.10.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.11.11.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.11.10'
35
+ gem 'ultracart_api', '~> 3.11.11'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -191,6 +191,7 @@ Class | Method | HTTP request | Description
191
191
  *UltracartClient::ConversationApi* | [**get_pbx_time_ranges**](docs/ConversationApi.md#get_pbx_time_ranges) | **GET** /conversation/pbx/time_range | Get pbx timeRanges
192
192
  *UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailbox**](docs/ConversationApi.md#get_pbx_voicemail_mailbox) | **GET** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Get pbx voicemailMailbox
193
193
  *UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailboxes**](docs/ConversationApi.md#get_pbx_voicemail_mailboxes) | **GET** /conversation/pbx/voicemail_mailbox | Get pbx voicemailMailboxes
194
+ *UltracartClient::ConversationApi* | [**get_virtual_agent_budget**](docs/ConversationApi.md#get_virtual_agent_budget) | **GET** /conversation/virtualagent/budget | Get virtual agent budget
194
195
  *UltracartClient::ConversationApi* | [**insert_conversation_canned_message**](docs/ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message
195
196
  *UltracartClient::ConversationApi* | [**insert_conversation_department**](docs/ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department
196
197
  *UltracartClient::ConversationApi* | [**insert_conversation_engagement**](docs/ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement
@@ -222,6 +223,7 @@ Class | Method | HTTP request | Description
222
223
  *UltracartClient::ConversationApi* | [**update_pbx_time_based**](docs/ConversationApi.md#update_pbx_time_based) | **PUT** /conversation/pbx/time_based/{conversationPbxTimeBasedUuid} | Update pbx timeBased
223
224
  *UltracartClient::ConversationApi* | [**update_pbx_time_range**](docs/ConversationApi.md#update_pbx_time_range) | **PUT** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Update pbx timeRange
224
225
  *UltracartClient::ConversationApi* | [**update_pbx_voicemail_mailbox**](docs/ConversationApi.md#update_pbx_voicemail_mailbox) | **PUT** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Update pbx voicemailMailbox
226
+ *UltracartClient::ConversationApi* | [**update_virtual_agent_budget**](docs/ConversationApi.md#update_virtual_agent_budget) | **PUT** /conversation/virtualagent/budget | Update virtual agent budget
225
227
  *UltracartClient::CouponApi* | [**delete_coupon**](docs/CouponApi.md#delete_coupon) | **DELETE** /coupon/coupons/{coupon_oid} | Delete a coupon
226
228
  *UltracartClient::CouponApi* | [**delete_coupons_by_code**](docs/CouponApi.md#delete_coupons_by_code) | **DELETE** /coupon/coupons/by_code | Deletes multiple coupons
227
229
  *UltracartClient::CouponApi* | [**delete_coupons_by_oid**](docs/CouponApi.md#delete_coupons_by_oid) | **DELETE** /coupon/coupons/by_oid | Deletes multiple coupons
@@ -813,6 +815,8 @@ Class | Method | HTTP request | Description
813
815
  - [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
814
816
  - [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
815
817
  - [UltracartClient::ConversationTwilioAccount](docs/ConversationTwilioAccount.md)
818
+ - [UltracartClient::ConversationVirtualAgentBudget](docs/ConversationVirtualAgentBudget.md)
819
+ - [UltracartClient::ConversationVirtualAgentBudgetResponse](docs/ConversationVirtualAgentBudgetResponse.md)
816
820
  - [UltracartClient::ConversationWebchatContext](docs/ConversationWebchatContext.md)
817
821
  - [UltracartClient::ConversationWebchatQueueStatus](docs/ConversationWebchatQueueStatus.md)
818
822
  - [UltracartClient::ConversationWebchatQueueStatusAgent](docs/ConversationWebchatQueueStatusAgent.md)
@@ -1524,6 +1528,7 @@ Not every change is committed to every SDK.
1524
1528
 
1525
1529
  | Version | Date | Comments |
1526
1530
  | --: | :-: | --- |
1531
+ | 3.11.11 | 05/19/2025 | conversations - virtual AI budgets |
1527
1532
  | 3.11.10 | 05/06/2025 | conversation - ConversationAgentProfile.user_id added for agent profiles call |
1528
1533
  | 3.11.9 | 05/05/2025 | conversations - method to fetch all agent profiles for admin screens |
1529
1534
  | 3.11.8 | 04/22/2025 | order property fields for created_by and created_dts |
@@ -57,6 +57,7 @@ Method | HTTP request | Description
57
57
  [**get_pbx_time_ranges**](ConversationApi.md#get_pbx_time_ranges) | **GET** /conversation/pbx/time_range | Get pbx timeRanges
58
58
  [**get_pbx_voicemail_mailbox**](ConversationApi.md#get_pbx_voicemail_mailbox) | **GET** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Get pbx voicemailMailbox
59
59
  [**get_pbx_voicemail_mailboxes**](ConversationApi.md#get_pbx_voicemail_mailboxes) | **GET** /conversation/pbx/voicemail_mailbox | Get pbx voicemailMailboxes
60
+ [**get_virtual_agent_budget**](ConversationApi.md#get_virtual_agent_budget) | **GET** /conversation/virtualagent/budget | Get virtual agent budget
60
61
  [**insert_conversation_canned_message**](ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message
61
62
  [**insert_conversation_department**](ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department
62
63
  [**insert_conversation_engagement**](ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement
@@ -88,6 +89,7 @@ Method | HTTP request | Description
88
89
  [**update_pbx_time_based**](ConversationApi.md#update_pbx_time_based) | **PUT** /conversation/pbx/time_based/{conversationPbxTimeBasedUuid} | Update pbx timeBased
89
90
  [**update_pbx_time_range**](ConversationApi.md#update_pbx_time_range) | **PUT** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Update pbx timeRange
90
91
  [**update_pbx_voicemail_mailbox**](ConversationApi.md#update_pbx_voicemail_mailbox) | **PUT** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Update pbx voicemailMailbox
92
+ [**update_virtual_agent_budget**](ConversationApi.md#update_virtual_agent_budget) | **PUT** /conversation/virtualagent/budget | Update virtual agent budget
91
93
 
92
94
 
93
95
  # **delete_conversation_canned_message**
@@ -2658,6 +2660,51 @@ This endpoint does not need any parameter.
2658
2660
 
2659
2661
 
2660
2662
 
2663
+ # **get_virtual_agent_budget**
2664
+ > ConversationVirtualAgentBudgetResponse get_virtual_agent_budget
2665
+
2666
+ Get virtual agent budget
2667
+
2668
+ Retrieve virtual agent budget
2669
+
2670
+ ### Example
2671
+ ```ruby
2672
+ # load the gem
2673
+ require 'ultracart_api'
2674
+
2675
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
2676
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
2677
+ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
2678
+
2679
+
2680
+
2681
+ begin
2682
+ #Get virtual agent budget
2683
+ result = api_instance.get_virtual_agent_budget
2684
+ p result
2685
+ rescue UltracartClient::ApiError => e
2686
+ puts "Exception when calling ConversationApi->get_virtual_agent_budget: #{e}"
2687
+ end
2688
+ ```
2689
+
2690
+ ### Parameters
2691
+ This endpoint does not need any parameter.
2692
+
2693
+ ### Return type
2694
+
2695
+ [**ConversationVirtualAgentBudgetResponse**](ConversationVirtualAgentBudgetResponse.md)
2696
+
2697
+ ### Authorization
2698
+
2699
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
2700
+
2701
+ ### HTTP request headers
2702
+
2703
+ - **Content-Type**: application/json
2704
+ - **Accept**: application/json
2705
+
2706
+
2707
+
2661
2708
  # **insert_conversation_canned_message**
2662
2709
  > ConversationCannedMessageResponse insert_conversation_canned_message(canned_message)
2663
2710
 
@@ -4243,3 +4290,53 @@ Name | Type | Description | Notes
4243
4290
 
4244
4291
 
4245
4292
 
4293
+ # **update_virtual_agent_budget**
4294
+ > ConversationVirtualAgentBudgetResponse update_virtual_agent_budget(virtual_agent_budget)
4295
+
4296
+ Update virtual agent budget
4297
+
4298
+ Update virtual agent budget
4299
+
4300
+ ### Example
4301
+ ```ruby
4302
+ # load the gem
4303
+ require 'ultracart_api'
4304
+
4305
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
4306
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
4307
+ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
4308
+
4309
+
4310
+ virtual_agent_budget = UltracartClient::ConversationVirtualAgentBudget.new # ConversationVirtualAgentBudget | Virtual Agent Budget
4311
+
4312
+
4313
+ begin
4314
+ #Update virtual agent budget
4315
+ result = api_instance.update_virtual_agent_budget(virtual_agent_budget)
4316
+ p result
4317
+ rescue UltracartClient::ApiError => e
4318
+ puts "Exception when calling ConversationApi->update_virtual_agent_budget: #{e}"
4319
+ end
4320
+ ```
4321
+
4322
+ ### Parameters
4323
+
4324
+ Name | Type | Description | Notes
4325
+ ------------- | ------------- | ------------- | -------------
4326
+ **virtual_agent_budget** | [**ConversationVirtualAgentBudget**](ConversationVirtualAgentBudget.md)| Virtual Agent Budget |
4327
+
4328
+ ### Return type
4329
+
4330
+ [**ConversationVirtualAgentBudgetResponse**](ConversationVirtualAgentBudgetResponse.md)
4331
+
4332
+ ### Authorization
4333
+
4334
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
4335
+
4336
+ ### HTTP request headers
4337
+
4338
+ - **Content-Type**: application/json
4339
+ - **Accept**: application/json
4340
+
4341
+
4342
+
@@ -0,0 +1,11 @@
1
+ # UltracartClient::ConversationVirtualAgentBudget
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **budget_daily** | **Float** | | [optional]
7
+ **budget_monthly** | **Float** | | [optional]
8
+ **used_daily** | **Float** | | [optional]
9
+ **used_monthly** | **Float** | | [optional]
10
+
11
+
@@ -0,0 +1,12 @@
1
+ # UltracartClient::ConversationVirtualAgentBudgetResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **budget** | [**ConversationVirtualAgentBudget**](ConversationVirtualAgentBudget.md) | | [optional]
7
+ **error** | [**Error**](Error.md) | | [optional]
8
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
9
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
10
+ **warning** | [**Warning**](Warning.md) | | [optional]
11
+
12
+
@@ -2851,6 +2851,55 @@ module UltracartClient
2851
2851
  end
2852
2852
  return data, status_code, headers
2853
2853
  end
2854
+ # Get virtual agent budget
2855
+ # Retrieve virtual agent budget
2856
+ # @param [Hash] opts the optional parameters
2857
+ # @return [ConversationVirtualAgentBudgetResponse]
2858
+ def get_virtual_agent_budget(opts = {})
2859
+ data, _status_code, _headers = get_virtual_agent_budget_with_http_info(opts)
2860
+ data
2861
+ end
2862
+
2863
+ # Get virtual agent budget
2864
+ # Retrieve virtual agent budget
2865
+ # @param [Hash] opts the optional parameters
2866
+ # @return [Array<(ConversationVirtualAgentBudgetResponse, Fixnum, Hash)>] ConversationVirtualAgentBudgetResponse data, response status code and response headers
2867
+ def get_virtual_agent_budget_with_http_info(opts = {})
2868
+ if @api_client.config.debugging
2869
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_virtual_agent_budget ...'
2870
+ end
2871
+ # resource path
2872
+ local_var_path = '/conversation/virtualagent/budget'
2873
+
2874
+ # query parameters
2875
+ query_params = {}
2876
+
2877
+ # header parameters
2878
+ header_params = {}
2879
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2880
+ # HTTP header 'Accept' (if needed)
2881
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2882
+ # HTTP header 'Content-Type'
2883
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2884
+
2885
+ # form parameters
2886
+ form_params = {}
2887
+
2888
+ # http body (model)
2889
+ post_body = nil
2890
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
2891
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2892
+ :header_params => header_params,
2893
+ :query_params => query_params,
2894
+ :form_params => form_params,
2895
+ :body => post_body,
2896
+ :auth_names => auth_names,
2897
+ :return_type => 'ConversationVirtualAgentBudgetResponse')
2898
+ if @api_client.config.debugging
2899
+ @api_client.config.logger.debug "API called: ConversationApi#get_virtual_agent_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2900
+ end
2901
+ return data, status_code, headers
2902
+ end
2854
2903
  # Insert a canned message
2855
2904
  # Insert a canned message
2856
2905
  # @param canned_message Canned message
@@ -4628,5 +4677,60 @@ module UltracartClient
4628
4677
  end
4629
4678
  return data, status_code, headers
4630
4679
  end
4680
+ # Update virtual agent budget
4681
+ # Update virtual agent budget
4682
+ # @param virtual_agent_budget Virtual Agent Budget
4683
+ # @param [Hash] opts the optional parameters
4684
+ # @return [ConversationVirtualAgentBudgetResponse]
4685
+ def update_virtual_agent_budget(virtual_agent_budget, opts = {})
4686
+ data, _status_code, _headers = update_virtual_agent_budget_with_http_info(virtual_agent_budget, opts)
4687
+ data
4688
+ end
4689
+
4690
+ # Update virtual agent budget
4691
+ # Update virtual agent budget
4692
+ # @param virtual_agent_budget Virtual Agent Budget
4693
+ # @param [Hash] opts the optional parameters
4694
+ # @return [Array<(ConversationVirtualAgentBudgetResponse, Fixnum, Hash)>] ConversationVirtualAgentBudgetResponse data, response status code and response headers
4695
+ def update_virtual_agent_budget_with_http_info(virtual_agent_budget, opts = {})
4696
+ if @api_client.config.debugging
4697
+ @api_client.config.logger.debug 'Calling API: ConversationApi.update_virtual_agent_budget ...'
4698
+ end
4699
+ # verify the required parameter 'virtual_agent_budget' is set
4700
+ if @api_client.config.client_side_validation && virtual_agent_budget.nil?
4701
+ fail ArgumentError, "Missing the required parameter 'virtual_agent_budget' when calling ConversationApi.update_virtual_agent_budget"
4702
+ end
4703
+ # resource path
4704
+ local_var_path = '/conversation/virtualagent/budget'
4705
+
4706
+ # query parameters
4707
+ query_params = {}
4708
+
4709
+ # header parameters
4710
+ header_params = {}
4711
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4712
+ # HTTP header 'Accept' (if needed)
4713
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4714
+ # HTTP header 'Content-Type'
4715
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
4716
+
4717
+ # form parameters
4718
+ form_params = {}
4719
+
4720
+ # http body (model)
4721
+ post_body = @api_client.object_to_http_body(virtual_agent_budget)
4722
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
4723
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
4724
+ :header_params => header_params,
4725
+ :query_params => query_params,
4726
+ :form_params => form_params,
4727
+ :body => post_body,
4728
+ :auth_names => auth_names,
4729
+ :return_type => 'ConversationVirtualAgentBudgetResponse')
4730
+ if @api_client.config.debugging
4731
+ @api_client.config.logger.debug "API called: ConversationApi#update_virtual_agent_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4732
+ end
4733
+ return data, status_code, headers
4734
+ end
4631
4735
  end
4632
4736
  end
@@ -0,0 +1,211 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationVirtualAgentBudget
17
+ attr_accessor :budget_daily
18
+
19
+ attr_accessor :budget_monthly
20
+
21
+ attr_accessor :used_daily
22
+
23
+ attr_accessor :used_monthly
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'budget_daily' => :'budget_daily',
29
+ :'budget_monthly' => :'budget_monthly',
30
+ :'used_daily' => :'used_daily',
31
+ :'used_monthly' => :'used_monthly'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'budget_daily' => :'Float',
39
+ :'budget_monthly' => :'Float',
40
+ :'used_daily' => :'Float',
41
+ :'used_monthly' => :'Float'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'budget_daily')
54
+ self.budget_daily = attributes[:'budget_daily']
55
+ end
56
+
57
+ if attributes.has_key?(:'budget_monthly')
58
+ self.budget_monthly = attributes[:'budget_monthly']
59
+ end
60
+
61
+ if attributes.has_key?(:'used_daily')
62
+ self.used_daily = attributes[:'used_daily']
63
+ end
64
+
65
+ if attributes.has_key?(:'used_monthly')
66
+ self.used_monthly = attributes[:'used_monthly']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ budget_daily == o.budget_daily &&
89
+ budget_monthly == o.budget_monthly &&
90
+ used_daily == o.used_daily &&
91
+ used_monthly == o.used_monthly
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [budget_daily, budget_monthly, used_daily, used_monthly].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :BOOLEAN
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ temp_model = UltracartClient.const_get(type).new
164
+ temp_model.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ next if value.nil?
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ # Outputs non-array value in the form of hash
193
+ # For object, use to_hash. Otherwise, just return the value
194
+ # @param [Object] value Any valid value
195
+ # @return [Hash] Returns the value in the form of hash
196
+ def _to_hash(value)
197
+ if value.is_a?(Array)
198
+ value.compact.map { |v| _to_hash(v) }
199
+ elsif value.is_a?(Hash)
200
+ {}.tap do |hash|
201
+ value.each { |k, v| hash[k] = _to_hash(v) }
202
+ end
203
+ elsif value.respond_to? :to_hash
204
+ value.to_hash
205
+ else
206
+ value
207
+ end
208
+ end
209
+
210
+ end
211
+ end
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationVirtualAgentBudgetResponse
17
+ attr_accessor :budget
18
+
19
+ attr_accessor :error
20
+
21
+ attr_accessor :metadata
22
+
23
+ # Indicates if API call was successful
24
+ attr_accessor :success
25
+
26
+ attr_accessor :warning
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'budget' => :'budget',
32
+ :'error' => :'error',
33
+ :'metadata' => :'metadata',
34
+ :'success' => :'success',
35
+ :'warning' => :'warning'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'budget' => :'ConversationVirtualAgentBudget',
43
+ :'error' => :'Error',
44
+ :'metadata' => :'ResponseMetadata',
45
+ :'success' => :'BOOLEAN',
46
+ :'warning' => :'Warning'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'budget')
59
+ self.budget = attributes[:'budget']
60
+ end
61
+
62
+ if attributes.has_key?(:'error')
63
+ self.error = attributes[:'error']
64
+ end
65
+
66
+ if attributes.has_key?(:'metadata')
67
+ self.metadata = attributes[:'metadata']
68
+ end
69
+
70
+ if attributes.has_key?(:'success')
71
+ self.success = attributes[:'success']
72
+ end
73
+
74
+ if attributes.has_key?(:'warning')
75
+ self.warning = attributes[:'warning']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ budget == o.budget &&
98
+ error == o.error &&
99
+ metadata == o.metadata &&
100
+ success == o.success &&
101
+ warning == o.warning
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 [Fixnum] Hash code
112
+ def hash
113
+ [budget, error, metadata, success, warning].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 build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = UltracartClient.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.11.10'
14
+ VERSION = '3.11.11'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -238,6 +238,8 @@ require 'ultracart_api/models/conversation_start_request'
238
238
  require 'ultracart_api/models/conversation_start_response'
239
239
  require 'ultracart_api/models/conversation_summary'
240
240
  require 'ultracart_api/models/conversation_twilio_account'
241
+ require 'ultracart_api/models/conversation_virtual_agent_budget'
242
+ require 'ultracart_api/models/conversation_virtual_agent_budget_response'
241
243
  require 'ultracart_api/models/conversation_webchat_context'
242
244
  require 'ultracart_api/models/conversation_webchat_queue_status'
243
245
  require 'ultracart_api/models/conversation_webchat_queue_status_agent'
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: 3.11.10
4
+ version: 3.11.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-06 00:00:00.000000000 Z
11
+ date: 2025-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -448,6 +448,8 @@ files:
448
448
  - docs/ConversationStartResponse.md
449
449
  - docs/ConversationSummary.md
450
450
  - docs/ConversationTwilioAccount.md
451
+ - docs/ConversationVirtualAgentBudget.md
452
+ - docs/ConversationVirtualAgentBudgetResponse.md
451
453
  - docs/ConversationWebchatContext.md
452
454
  - docs/ConversationWebchatQueueStatus.md
453
455
  - docs/ConversationWebchatQueueStatusAgent.md
@@ -1349,6 +1351,8 @@ files:
1349
1351
  - lib/ultracart_api/models/conversation_start_response.rb
1350
1352
  - lib/ultracart_api/models/conversation_summary.rb
1351
1353
  - lib/ultracart_api/models/conversation_twilio_account.rb
1354
+ - lib/ultracart_api/models/conversation_virtual_agent_budget.rb
1355
+ - lib/ultracart_api/models/conversation_virtual_agent_budget_response.rb
1352
1356
  - lib/ultracart_api/models/conversation_webchat_context.rb
1353
1357
  - lib/ultracart_api/models/conversation_webchat_queue_status.rb
1354
1358
  - lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb