ultracart_api 4.1.18 → 4.1.20

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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -10
  3. data/docs/ConversationVirtualAgentCapabilities.md +7 -1
  4. data/docs/ConversationVirtualAgentCapabilityZohoDeskDepartment.md +20 -0
  5. data/docs/CustomDashboard.md +3 -1
  6. data/docs/CustomDashboardExecutionParameter.md +24 -0
  7. data/docs/CustomDashboardSchedule.md +26 -0
  8. data/docs/{ChargebackDisputeResponse.md → CustomDashboardScheduleResponse.md} +4 -4
  9. data/docs/{ChargebackDisputesResponse.md → CustomDashboardSchedulesResponse.md} +4 -4
  10. data/docs/CustomReport.md +2 -0
  11. data/docs/CustomReportExecutionParameter.md +2 -0
  12. data/docs/DatawarehouseApi.md +220 -0
  13. data/docs/EmailCampaign.md +4 -0
  14. data/lib/ultracart_api/api/datawarehouse_api.rb +290 -0
  15. data/lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb +38 -6
  16. data/lib/ultracart_api/models/conversation_virtual_agent_capability_zoho_desk_department.rb +228 -0
  17. data/lib/ultracart_api/models/custom_dashboard.rb +15 -4
  18. data/lib/ultracart_api/models/custom_dashboard_execution_parameter.rb +246 -0
  19. data/lib/ultracart_api/models/custom_dashboard_schedule.rb +258 -0
  20. data/lib/ultracart_api/models/{chargeback_dispute_response.rb → custom_dashboard_schedule_response.rb} +13 -13
  21. data/lib/ultracart_api/models/{chargeback_disputes_response.rb → custom_dashboard_schedules_response.rb} +16 -15
  22. data/lib/ultracart_api/models/custom_report.rb +10 -1
  23. data/lib/ultracart_api/models/custom_report_execution_parameter.rb +10 -1
  24. data/lib/ultracart_api/models/email_campaign.rb +21 -1
  25. data/lib/ultracart_api/models/order_payment.rb +2 -2
  26. data/lib/ultracart_api/version.rb +1 -1
  27. data/lib/ultracart_api.rb +5 -4
  28. metadata +12 -10
  29. data/docs/ChargebackApi.md +0 -297
  30. data/docs/ChargebackDispute.md +0 -62
  31. data/lib/ultracart_api/api/chargeback_api.rb +0 -410
  32. data/lib/ultracart_api/models/chargeback_dispute.rb +0 -649
@@ -96,6 +96,76 @@ module UltracartClient
96
96
  return data, status_code, headers
97
97
  end
98
98
 
99
+ # Delete a custom dashboard schedule
100
+ # delete a custom dashboard schedule on the UltraCart account.
101
+ # @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to delete.
102
+ # @param custom_dashboard_oid [Integer] The dashboard oid that owns the schedule.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [nil]
105
+ def delete_custom_dashboard_schedule(custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
106
+ delete_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, opts)
107
+ nil
108
+ end
109
+
110
+ # Delete a custom dashboard schedule
111
+ # delete a custom dashboard schedule on the UltraCart account.
112
+ # @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to delete.
113
+ # @param custom_dashboard_oid [Integer] The dashboard oid that owns the schedule.
114
+ # @param [Hash] opts the optional parameters
115
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
116
+ def delete_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.delete_custom_dashboard_schedule ...'
119
+ end
120
+ # verify the required parameter 'custom_dashboard_schedule_oid' is set
121
+ if @api_client.config.client_side_validation && custom_dashboard_schedule_oid.nil?
122
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_schedule_oid' when calling DatawarehouseApi.delete_custom_dashboard_schedule"
123
+ end
124
+ # verify the required parameter 'custom_dashboard_oid' is set
125
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
126
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.delete_custom_dashboard_schedule"
127
+ end
128
+ # resource path
129
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules/{custom_dashboard_schedule_oid}'.sub('{' + 'custom_dashboard_schedule_oid' + '}', CGI.escape(custom_dashboard_schedule_oid.to_s)).sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
130
+
131
+ # query parameters
132
+ query_params = opts[:query_params] || {}
133
+
134
+ # header parameters
135
+ header_params = opts[:header_params] || {}
136
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
137
+ # HTTP header 'Accept' (if needed)
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
139
+
140
+ # form parameters
141
+ form_params = opts[:form_params] || {}
142
+
143
+ # http body (model)
144
+ post_body = opts[:debug_body]
145
+
146
+ # return_type
147
+ return_type = opts[:debug_return_type]
148
+
149
+ # auth_names
150
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
151
+
152
+ new_options = opts.merge(
153
+ :operation => :"DatawarehouseApi.delete_custom_dashboard_schedule",
154
+ :header_params => header_params,
155
+ :query_params => query_params,
156
+ :form_params => form_params,
157
+ :body => post_body,
158
+ :auth_names => auth_names,
159
+ :return_type => return_type
160
+ )
161
+
162
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug "API called: DatawarehouseApi#delete_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
165
+ end
166
+ return data, status_code, headers
167
+ end
168
+
99
169
  # Delete a custom report
100
170
  # Delete a custom report on the UltraCart account.
101
171
  # @param custom_report_oid [Integer] The report oid to delete.
@@ -570,6 +640,70 @@ module UltracartClient
570
640
  return data, status_code, headers
571
641
  end
572
642
 
643
+ # Get custom dashboards
644
+ # Retrieve a custom dashboards
645
+ # @param custom_dashboard_oid [Integer]
646
+ # @param [Hash] opts the optional parameters
647
+ # @return [CustomDashboardSchedulesResponse]
648
+ def get_custom_dashboard_schedules(custom_dashboard_oid, opts = {})
649
+ data, _status_code, _headers = get_custom_dashboard_schedules_with_http_info(custom_dashboard_oid, opts)
650
+ data
651
+ end
652
+
653
+ # Get custom dashboards
654
+ # Retrieve a custom dashboards
655
+ # @param custom_dashboard_oid [Integer]
656
+ # @param [Hash] opts the optional parameters
657
+ # @return [Array<(CustomDashboardSchedulesResponse, Integer, Hash)>] CustomDashboardSchedulesResponse data, response status code and response headers
658
+ def get_custom_dashboard_schedules_with_http_info(custom_dashboard_oid, opts = {})
659
+ if @api_client.config.debugging
660
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_dashboard_schedules ...'
661
+ end
662
+ # verify the required parameter 'custom_dashboard_oid' is set
663
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
664
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.get_custom_dashboard_schedules"
665
+ end
666
+ # resource path
667
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules'.sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
668
+
669
+ # query parameters
670
+ query_params = opts[:query_params] || {}
671
+
672
+ # header parameters
673
+ header_params = opts[:header_params] || {}
674
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
675
+ # HTTP header 'Accept' (if needed)
676
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
677
+
678
+ # form parameters
679
+ form_params = opts[:form_params] || {}
680
+
681
+ # http body (model)
682
+ post_body = opts[:debug_body]
683
+
684
+ # return_type
685
+ return_type = opts[:debug_return_type] || 'CustomDashboardSchedulesResponse'
686
+
687
+ # auth_names
688
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
689
+
690
+ new_options = opts.merge(
691
+ :operation => :"DatawarehouseApi.get_custom_dashboard_schedules",
692
+ :header_params => header_params,
693
+ :query_params => query_params,
694
+ :form_params => form_params,
695
+ :body => post_body,
696
+ :auth_names => auth_names,
697
+ :return_type => return_type
698
+ )
699
+
700
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
701
+ if @api_client.config.debugging
702
+ @api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_dashboard_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
703
+ end
704
+ return data, status_code, headers
705
+ end
706
+
573
707
  # Get custom dashboards
574
708
  # Retrieve a custom dashboards
575
709
  # @param [Hash] opts the optional parameters
@@ -1191,6 +1325,81 @@ module UltracartClient
1191
1325
  return data, status_code, headers
1192
1326
  end
1193
1327
 
1328
+ # Create a custom dashboard schedule
1329
+ # Create a new custom dashboard schedule on the UltraCart account.
1330
+ # @param custom_dashboard_oid [Integer]
1331
+ # @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to create
1332
+ # @param [Hash] opts the optional parameters
1333
+ # @return [CustomDashboardScheduleResponse]
1334
+ def insert_custom_dashboard_schedule(custom_dashboard_oid, dashboard_schedule, opts = {})
1335
+ data, _status_code, _headers = insert_custom_dashboard_schedule_with_http_info(custom_dashboard_oid, dashboard_schedule, opts)
1336
+ data
1337
+ end
1338
+
1339
+ # Create a custom dashboard schedule
1340
+ # Create a new custom dashboard schedule on the UltraCart account.
1341
+ # @param custom_dashboard_oid [Integer]
1342
+ # @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to create
1343
+ # @param [Hash] opts the optional parameters
1344
+ # @return [Array<(CustomDashboardScheduleResponse, Integer, Hash)>] CustomDashboardScheduleResponse data, response status code and response headers
1345
+ def insert_custom_dashboard_schedule_with_http_info(custom_dashboard_oid, dashboard_schedule, opts = {})
1346
+ if @api_client.config.debugging
1347
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.insert_custom_dashboard_schedule ...'
1348
+ end
1349
+ # verify the required parameter 'custom_dashboard_oid' is set
1350
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
1351
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.insert_custom_dashboard_schedule"
1352
+ end
1353
+ # verify the required parameter 'dashboard_schedule' is set
1354
+ if @api_client.config.client_side_validation && dashboard_schedule.nil?
1355
+ fail ArgumentError, "Missing the required parameter 'dashboard_schedule' when calling DatawarehouseApi.insert_custom_dashboard_schedule"
1356
+ end
1357
+ # resource path
1358
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules'.sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
1359
+
1360
+ # query parameters
1361
+ query_params = opts[:query_params] || {}
1362
+
1363
+ # header parameters
1364
+ header_params = opts[:header_params] || {}
1365
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1366
+ # HTTP header 'Accept' (if needed)
1367
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1368
+ # HTTP header 'Content-Type'
1369
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1370
+ if !content_type.nil?
1371
+ header_params['Content-Type'] = content_type
1372
+ end
1373
+
1374
+ # form parameters
1375
+ form_params = opts[:form_params] || {}
1376
+
1377
+ # http body (model)
1378
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(dashboard_schedule)
1379
+
1380
+ # return_type
1381
+ return_type = opts[:debug_return_type] || 'CustomDashboardScheduleResponse'
1382
+
1383
+ # auth_names
1384
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1385
+
1386
+ new_options = opts.merge(
1387
+ :operation => :"DatawarehouseApi.insert_custom_dashboard_schedule",
1388
+ :header_params => header_params,
1389
+ :query_params => query_params,
1390
+ :form_params => form_params,
1391
+ :body => post_body,
1392
+ :auth_names => auth_names,
1393
+ :return_type => return_type
1394
+ )
1395
+
1396
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1397
+ if @api_client.config.debugging
1398
+ @api_client.config.logger.debug "API called: DatawarehouseApi#insert_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1399
+ end
1400
+ return data, status_code, headers
1401
+ end
1402
+
1194
1403
  # Create a custom report
1195
1404
  # Create a new custom report on the UltraCart account.
1196
1405
  # @param report [CustomReport] Report to create
@@ -1404,6 +1613,87 @@ module UltracartClient
1404
1613
  return data, status_code, headers
1405
1614
  end
1406
1615
 
1616
+ # Update a custom dashboard schedule
1617
+ # Update a custom dashboard schedule on the UltraCart account.
1618
+ # @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to update.
1619
+ # @param custom_dashboard_oid [Integer] The dashboard oid to update.
1620
+ # @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to update
1621
+ # @param [Hash] opts the optional parameters
1622
+ # @return [CustomDashboardResponse]
1623
+ def update_custom_dashboard_schedule(custom_dashboard_schedule_oid, custom_dashboard_oid, dashboard_schedule, opts = {})
1624
+ data, _status_code, _headers = update_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, dashboard_schedule, opts)
1625
+ data
1626
+ end
1627
+
1628
+ # Update a custom dashboard schedule
1629
+ # Update a custom dashboard schedule on the UltraCart account.
1630
+ # @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to update.
1631
+ # @param custom_dashboard_oid [Integer] The dashboard oid to update.
1632
+ # @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to update
1633
+ # @param [Hash] opts the optional parameters
1634
+ # @return [Array<(CustomDashboardResponse, Integer, Hash)>] CustomDashboardResponse data, response status code and response headers
1635
+ def update_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, dashboard_schedule, opts = {})
1636
+ if @api_client.config.debugging
1637
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.update_custom_dashboard_schedule ...'
1638
+ end
1639
+ # verify the required parameter 'custom_dashboard_schedule_oid' is set
1640
+ if @api_client.config.client_side_validation && custom_dashboard_schedule_oid.nil?
1641
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_schedule_oid' when calling DatawarehouseApi.update_custom_dashboard_schedule"
1642
+ end
1643
+ # verify the required parameter 'custom_dashboard_oid' is set
1644
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
1645
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.update_custom_dashboard_schedule"
1646
+ end
1647
+ # verify the required parameter 'dashboard_schedule' is set
1648
+ if @api_client.config.client_side_validation && dashboard_schedule.nil?
1649
+ fail ArgumentError, "Missing the required parameter 'dashboard_schedule' when calling DatawarehouseApi.update_custom_dashboard_schedule"
1650
+ end
1651
+ # resource path
1652
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules/{custom_dashboard_schedule_oid}'.sub('{' + 'custom_dashboard_schedule_oid' + '}', CGI.escape(custom_dashboard_schedule_oid.to_s)).sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
1653
+
1654
+ # query parameters
1655
+ query_params = opts[:query_params] || {}
1656
+
1657
+ # header parameters
1658
+ header_params = opts[:header_params] || {}
1659
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1660
+ # HTTP header 'Accept' (if needed)
1661
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1662
+ # HTTP header 'Content-Type'
1663
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1664
+ if !content_type.nil?
1665
+ header_params['Content-Type'] = content_type
1666
+ end
1667
+
1668
+ # form parameters
1669
+ form_params = opts[:form_params] || {}
1670
+
1671
+ # http body (model)
1672
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(dashboard_schedule)
1673
+
1674
+ # return_type
1675
+ return_type = opts[:debug_return_type] || 'CustomDashboardResponse'
1676
+
1677
+ # auth_names
1678
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1679
+
1680
+ new_options = opts.merge(
1681
+ :operation => :"DatawarehouseApi.update_custom_dashboard_schedule",
1682
+ :header_params => header_params,
1683
+ :query_params => query_params,
1684
+ :form_params => form_params,
1685
+ :body => post_body,
1686
+ :auth_names => auth_names,
1687
+ :return_type => return_type
1688
+ )
1689
+
1690
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1691
+ if @api_client.config.debugging
1692
+ @api_client.config.logger.debug "API called: DatawarehouseApi#update_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1693
+ end
1694
+ return data, status_code, headers
1695
+ end
1696
+
1407
1697
  # Update a custom report
1408
1698
  # Update a custom report on the UltraCart account.
1409
1699
  # @param custom_report_oid [Integer] The report oid to custom update.
@@ -31,6 +31,9 @@ module UltracartClient
31
31
  # Email to send support ticket to
32
32
  attr_accessor :open_support_ticket_channel_email
33
33
 
34
+ # Department ID to open a Zoho Desk ticket for
35
+ attr_accessor :open_support_ticket_zoho_desk_department_id
36
+
34
37
  attr_accessor :pause_subscription
35
38
 
36
39
  attr_accessor :resume_subscription
@@ -39,6 +42,12 @@ module UltracartClient
39
42
 
40
43
  attr_accessor :update_subscription_credit_card
41
44
 
45
+ # True if Zoho Desk is connected to UltraCart
46
+ attr_accessor :zoho_desk_available
47
+
48
+ # Array of Zoho Desk Department if zoho desk is connected to UltraCart
49
+ attr_accessor :zoho_desk_departments
50
+
42
51
  class EnumAttributeValidator
43
52
  attr_reader :datatype
44
53
  attr_reader :allowable_values
@@ -71,10 +80,13 @@ module UltracartClient
71
80
  :'open_support_ticket' => :'open_support_ticket',
72
81
  :'open_support_ticket_channel' => :'open_support_ticket_channel',
73
82
  :'open_support_ticket_channel_email' => :'open_support_ticket_channel_email',
83
+ :'open_support_ticket_zoho_desk_department_id' => :'open_support_ticket_zoho_desk_department_id',
74
84
  :'pause_subscription' => :'pause_subscription',
75
85
  :'resume_subscription' => :'resume_subscription',
76
86
  :'transfer_chat_to_live_agent' => :'transfer_chat_to_live_agent',
77
- :'update_subscription_credit_card' => :'update_subscription_credit_card'
87
+ :'update_subscription_credit_card' => :'update_subscription_credit_card',
88
+ :'zoho_desk_available' => :'zoho_desk_available',
89
+ :'zoho_desk_departments' => :'zoho_desk_departments'
78
90
  }
79
91
  end
80
92
 
@@ -93,10 +105,13 @@ module UltracartClient
93
105
  :'open_support_ticket' => :'Boolean',
94
106
  :'open_support_ticket_channel' => :'String',
95
107
  :'open_support_ticket_channel_email' => :'String',
108
+ :'open_support_ticket_zoho_desk_department_id' => :'String',
96
109
  :'pause_subscription' => :'Boolean',
97
110
  :'resume_subscription' => :'Boolean',
98
111
  :'transfer_chat_to_live_agent' => :'Boolean',
99
- :'update_subscription_credit_card' => :'Boolean'
112
+ :'update_subscription_credit_card' => :'Boolean',
113
+ :'zoho_desk_available' => :'Boolean',
114
+ :'zoho_desk_departments' => :'Array<ConversationVirtualAgentCapabilityZohoDeskDepartment>'
100
115
  }
101
116
  end
102
117
 
@@ -149,6 +164,10 @@ module UltracartClient
149
164
  self.open_support_ticket_channel_email = attributes[:'open_support_ticket_channel_email']
150
165
  end
151
166
 
167
+ if attributes.key?(:'open_support_ticket_zoho_desk_department_id')
168
+ self.open_support_ticket_zoho_desk_department_id = attributes[:'open_support_ticket_zoho_desk_department_id']
169
+ end
170
+
152
171
  if attributes.key?(:'pause_subscription')
153
172
  self.pause_subscription = attributes[:'pause_subscription']
154
173
  end
@@ -164,6 +183,16 @@ module UltracartClient
164
183
  if attributes.key?(:'update_subscription_credit_card')
165
184
  self.update_subscription_credit_card = attributes[:'update_subscription_credit_card']
166
185
  end
186
+
187
+ if attributes.key?(:'zoho_desk_available')
188
+ self.zoho_desk_available = attributes[:'zoho_desk_available']
189
+ end
190
+
191
+ if attributes.key?(:'zoho_desk_departments')
192
+ if (value = attributes[:'zoho_desk_departments']).is_a?(Array)
193
+ self.zoho_desk_departments = value
194
+ end
195
+ end
167
196
  end
168
197
 
169
198
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -176,7 +205,7 @@ module UltracartClient
176
205
  # Check to see if the all the properties in the model are valid
177
206
  # @return true if the model is valid
178
207
  def valid?
179
- open_support_ticket_channel_validator = EnumAttributeValidator.new('String', ["none", "email", "UltraCart Task", "Zoho Desk Ticket"])
208
+ open_support_ticket_channel_validator = EnumAttributeValidator.new('String', ["none", "email", "ultracart_task", "zoho_desk_ticket"])
180
209
  return false unless open_support_ticket_channel_validator.valid?(@open_support_ticket_channel)
181
210
  true
182
211
  end
@@ -184,7 +213,7 @@ module UltracartClient
184
213
  # Custom attribute writer method checking allowed values (enum).
185
214
  # @param [Object] open_support_ticket_channel Object to be assigned
186
215
  def open_support_ticket_channel=(open_support_ticket_channel)
187
- validator = EnumAttributeValidator.new('String', ["none", "email", "UltraCart Task", "Zoho Desk Ticket"])
216
+ validator = EnumAttributeValidator.new('String', ["none", "email", "ultracart_task", "zoho_desk_ticket"])
188
217
  unless validator.valid?(open_support_ticket_channel)
189
218
  fail ArgumentError, "invalid value for \"open_support_ticket_channel\", must be one of #{validator.allowable_values}."
190
219
  end
@@ -203,10 +232,13 @@ module UltracartClient
203
232
  open_support_ticket == o.open_support_ticket &&
204
233
  open_support_ticket_channel == o.open_support_ticket_channel &&
205
234
  open_support_ticket_channel_email == o.open_support_ticket_channel_email &&
235
+ open_support_ticket_zoho_desk_department_id == o.open_support_ticket_zoho_desk_department_id &&
206
236
  pause_subscription == o.pause_subscription &&
207
237
  resume_subscription == o.resume_subscription &&
208
238
  transfer_chat_to_live_agent == o.transfer_chat_to_live_agent &&
209
- update_subscription_credit_card == o.update_subscription_credit_card
239
+ update_subscription_credit_card == o.update_subscription_credit_card &&
240
+ zoho_desk_available == o.zoho_desk_available &&
241
+ zoho_desk_departments == o.zoho_desk_departments
210
242
  end
211
243
 
212
244
  # @see the `==` method
@@ -218,7 +250,7 @@ module UltracartClient
218
250
  # Calculates hash code according to all attributes.
219
251
  # @return [Integer] Hash code
220
252
  def hash
221
- [cancel_subscription, delay_subscription, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card].hash
253
+ [cancel_subscription, delay_subscription, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, open_support_ticket_zoho_desk_department_id, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card, zoho_desk_available, zoho_desk_departments].hash
222
254
  end
223
255
 
224
256
  # Builds the object from hash
@@ -0,0 +1,228 @@
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 ConversationVirtualAgentCapabilityZohoDeskDepartment
18
+ attr_accessor :department_id
19
+
20
+ attr_accessor :department_name
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'department_id' => :'department_id',
26
+ :'department_name' => :'department_name'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'department_id' => :'String',
39
+ :'department_name' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationVirtualAgentCapabilityZohoDeskDepartment` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationVirtualAgentCapabilityZohoDeskDepartment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'department_id')
65
+ self.department_id = attributes[:'department_id']
66
+ end
67
+
68
+ if attributes.key?(:'department_name')
69
+ self.department_name = attributes[:'department_name']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ department_id == o.department_id &&
92
+ department_name == o.department_name
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [department_id, department_name].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ # models (e.g. Pet) or oneOf
175
+ klass = UltracartClient.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end