ultracart_api 4.1.14 → 4.1.16

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -3
  3. data/docs/CartUpsellAfter.md +6 -2
  4. data/docs/ConversationVirtualAgentCapabilities.md +4 -0
  5. data/docs/CustomReport.md +36 -0
  6. data/docs/CustomReportAccountConfig.md +34 -0
  7. data/docs/CustomReportAccountConfigResponse.md +26 -0
  8. data/docs/CustomReportExecutionParameter.md +22 -0
  9. data/docs/CustomReportExecutionRequest.md +18 -0
  10. data/docs/CustomReportParameter.md +28 -0
  11. data/docs/CustomReportParameterOption.md +20 -0
  12. data/docs/CustomReportQuery.md +28 -0
  13. data/docs/CustomReportResponse.md +26 -0
  14. data/docs/CustomReportTooltip.md +20 -0
  15. data/docs/CustomReportsResponse.md +26 -0
  16. data/docs/DatawarehouseApi.md +430 -0
  17. data/docs/Item.md +1 -1
  18. data/docs/OrderApi.md +137 -63
  19. data/docs/WebhookApi.md +0 -8
  20. data/lib/ultracart_api/api/datawarehouse_api.rb +532 -0
  21. data/lib/ultracart_api/api/order_api.rb +131 -91
  22. data/lib/ultracart_api/api/webhook_api.rb +0 -24
  23. data/lib/ultracart_api/models/cart_upsell_after.rb +25 -5
  24. data/lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb +55 -1
  25. data/lib/ultracart_api/models/custom_report.rb +306 -0
  26. data/lib/ultracart_api/models/custom_report_account_config.rb +296 -0
  27. data/lib/ultracart_api/models/custom_report_account_config_response.rb +256 -0
  28. data/lib/ultracart_api/models/custom_report_execution_parameter.rb +237 -0
  29. data/lib/ultracart_api/models/custom_report_execution_request.rb +221 -0
  30. data/lib/ultracart_api/models/custom_report_parameter.rb +266 -0
  31. data/lib/ultracart_api/models/custom_report_parameter_option.rb +228 -0
  32. data/lib/ultracart_api/models/custom_report_query.rb +266 -0
  33. data/lib/ultracart_api/models/custom_report_response.rb +256 -0
  34. data/lib/ultracart_api/models/custom_report_tooltip.rb +228 -0
  35. data/lib/ultracart_api/models/custom_reports_response.rb +259 -0
  36. data/lib/ultracart_api/models/item.rb +1 -1
  37. data/lib/ultracart_api/version.rb +1 -1
  38. data/lib/ultracart_api.rb +11 -0
  39. metadata +24 -2
@@ -102,6 +102,73 @@ module UltracartClient
102
102
  return data, status_code, headers
103
103
  end
104
104
 
105
+ # Set a refund block on an order
106
+ # Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
107
+ # @param order_id [String] The order id to block a refund on.
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [String] :block_reason Block reason code (optional)
110
+ # @return [nil]
111
+ def block_refund_on_order(order_id, opts = {})
112
+ block_refund_on_order_with_http_info(order_id, opts)
113
+ nil
114
+ end
115
+
116
+ # Set a refund block on an order
117
+ # Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
118
+ # @param order_id [String] The order id to block a refund on.
119
+ # @param [Hash] opts the optional parameters
120
+ # @option opts [String] :block_reason Block reason code (optional)
121
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
122
+ def block_refund_on_order_with_http_info(order_id, opts = {})
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug 'Calling API: OrderApi.block_refund_on_order ...'
125
+ end
126
+ # verify the required parameter 'order_id' is set
127
+ if @api_client.config.client_side_validation && order_id.nil?
128
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.block_refund_on_order"
129
+ end
130
+ # resource path
131
+ local_var_path = '/order/orders/{order_id}/refund_block'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
132
+
133
+ # query parameters
134
+ query_params = opts[:query_params] || {}
135
+ query_params[:'block_reason'] = opts[:'block_reason'] if !opts[:'block_reason'].nil?
136
+
137
+ # header parameters
138
+ header_params = opts[:header_params] || {}
139
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
140
+ # HTTP header 'Accept' (if needed)
141
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
142
+
143
+ # form parameters
144
+ form_params = opts[:form_params] || {}
145
+
146
+ # http body (model)
147
+ post_body = opts[:debug_body]
148
+
149
+ # return_type
150
+ return_type = opts[:debug_return_type]
151
+
152
+ # auth_names
153
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
154
+
155
+ new_options = opts.merge(
156
+ :operation => :"OrderApi.block_refund_on_order",
157
+ :header_params => header_params,
158
+ :query_params => query_params,
159
+ :form_params => form_params,
160
+ :body => post_body,
161
+ :auth_names => auth_names,
162
+ :return_type => return_type
163
+ )
164
+
165
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug "API called: OrderApi#block_refund_on_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
168
+ end
169
+ return data, status_code, headers
170
+ end
171
+
105
172
  # Cancel an order
106
173
  # Cancel an order on the UltraCart account. If the success flag is false, then consult the error message for why it failed.
107
174
  # @param order_id [String] The order id to cancel.
@@ -1579,97 +1646,6 @@ module UltracartClient
1579
1646
  return data, status_code, headers
1580
1647
  end
1581
1648
 
1582
- # Refund an order completely
1583
- # Perform a refund operation on an order and then update the order if successful.
1584
- # @param order_id [String] The order id to refund.
1585
- # @param [Hash] opts the optional parameters
1586
- # @option opts [Boolean] :reject_after_refund Reject order after refund (default to false)
1587
- # @option opts [Boolean] :skip_customer_notification Skip customer email notification (default to false)
1588
- # @option opts [Boolean] :auto_order_cancel Cancel associated auto orders (default to false)
1589
- # @option opts [Boolean] :manual_refund Consider a manual refund done externally (default to false)
1590
- # @option opts [Boolean] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
1591
- # @option opts [Boolean] :issue_store_credit Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account (default to false)
1592
- # @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
1593
- # @option opts [String] :refund_reason Reason for refund
1594
- # @option opts [String] :reject_reason Reason for reject
1595
- # @return [OrderResponse]
1596
- def refund_order_completely(order_id, opts = {})
1597
- data, _status_code, _headers = refund_order_completely_with_http_info(order_id, opts)
1598
- data
1599
- end
1600
-
1601
- # Refund an order completely
1602
- # Perform a refund operation on an order and then update the order if successful.
1603
- # @param order_id [String] The order id to refund.
1604
- # @param [Hash] opts the optional parameters
1605
- # @option opts [Boolean] :reject_after_refund Reject order after refund (default to false)
1606
- # @option opts [Boolean] :skip_customer_notification Skip customer email notification (default to false)
1607
- # @option opts [Boolean] :auto_order_cancel Cancel associated auto orders (default to false)
1608
- # @option opts [Boolean] :manual_refund Consider a manual refund done externally (default to false)
1609
- # @option opts [Boolean] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
1610
- # @option opts [Boolean] :issue_store_credit Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account (default to false)
1611
- # @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
1612
- # @option opts [String] :refund_reason Reason for refund
1613
- # @option opts [String] :reject_reason Reason for reject
1614
- # @return [Array<(OrderResponse, Integer, Hash)>] OrderResponse data, response status code and response headers
1615
- def refund_order_completely_with_http_info(order_id, opts = {})
1616
- if @api_client.config.debugging
1617
- @api_client.config.logger.debug 'Calling API: OrderApi.refund_order_completely ...'
1618
- end
1619
- # verify the required parameter 'order_id' is set
1620
- if @api_client.config.client_side_validation && order_id.nil?
1621
- fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.refund_order_completely"
1622
- end
1623
- # resource path
1624
- local_var_path = '/order/orders/{order_id}/refund_completely'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
1625
-
1626
- # query parameters
1627
- query_params = opts[:query_params] || {}
1628
- query_params[:'reject_after_refund'] = opts[:'reject_after_refund'] if !opts[:'reject_after_refund'].nil?
1629
- query_params[:'skip_customer_notification'] = opts[:'skip_customer_notification'] if !opts[:'skip_customer_notification'].nil?
1630
- query_params[:'auto_order_cancel'] = opts[:'auto_order_cancel'] if !opts[:'auto_order_cancel'].nil?
1631
- query_params[:'manual_refund'] = opts[:'manual_refund'] if !opts[:'manual_refund'].nil?
1632
- query_params[:'reverse_affiliate_transactions'] = opts[:'reverse_affiliate_transactions'] if !opts[:'reverse_affiliate_transactions'].nil?
1633
- query_params[:'issue_store_credit'] = opts[:'issue_store_credit'] if !opts[:'issue_store_credit'].nil?
1634
- query_params[:'auto_order_cancel_reason'] = opts[:'auto_order_cancel_reason'] if !opts[:'auto_order_cancel_reason'].nil?
1635
- query_params[:'refund_reason'] = opts[:'refund_reason'] if !opts[:'refund_reason'].nil?
1636
- query_params[:'reject_reason'] = opts[:'reject_reason'] if !opts[:'reject_reason'].nil?
1637
-
1638
- # header parameters
1639
- header_params = opts[:header_params] || {}
1640
- header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1641
- # HTTP header 'Accept' (if needed)
1642
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1643
-
1644
- # form parameters
1645
- form_params = opts[:form_params] || {}
1646
-
1647
- # http body (model)
1648
- post_body = opts[:debug_body]
1649
-
1650
- # return_type
1651
- return_type = opts[:debug_return_type] || 'OrderResponse'
1652
-
1653
- # auth_names
1654
- auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1655
-
1656
- new_options = opts.merge(
1657
- :operation => :"OrderApi.refund_order_completely",
1658
- :header_params => header_params,
1659
- :query_params => query_params,
1660
- :form_params => form_params,
1661
- :body => post_body,
1662
- :auth_names => auth_names,
1663
- :return_type => return_type
1664
- )
1665
-
1666
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1667
- if @api_client.config.debugging
1668
- @api_client.config.logger.debug "API called: OrderApi#refund_order_completely\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1669
- end
1670
- return data, status_code, headers
1671
- end
1672
-
1673
1649
  # Replacement order
1674
1650
  # Create a replacement order based upon a previous order
1675
1651
  # @param order_id [String] The order id to generate a replacement for.
@@ -1873,6 +1849,70 @@ module UltracartClient
1873
1849
  return data, status_code, headers
1874
1850
  end
1875
1851
 
1852
+ # Remove a refund block on an order
1853
+ # Removes a refund block on an order to prevent a user from performing a refund.
1854
+ # @param order_id [String] The order id to unblock a refund on.
1855
+ # @param [Hash] opts the optional parameters
1856
+ # @return [nil]
1857
+ def unblock_refund_on_order(order_id, opts = {})
1858
+ unblock_refund_on_order_with_http_info(order_id, opts)
1859
+ nil
1860
+ end
1861
+
1862
+ # Remove a refund block on an order
1863
+ # Removes a refund block on an order to prevent a user from performing a refund.
1864
+ # @param order_id [String] The order id to unblock a refund on.
1865
+ # @param [Hash] opts the optional parameters
1866
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1867
+ def unblock_refund_on_order_with_http_info(order_id, opts = {})
1868
+ if @api_client.config.debugging
1869
+ @api_client.config.logger.debug 'Calling API: OrderApi.unblock_refund_on_order ...'
1870
+ end
1871
+ # verify the required parameter 'order_id' is set
1872
+ if @api_client.config.client_side_validation && order_id.nil?
1873
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.unblock_refund_on_order"
1874
+ end
1875
+ # resource path
1876
+ local_var_path = '/order/orders/{order_id}/refund_unblock'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
1877
+
1878
+ # query parameters
1879
+ query_params = opts[:query_params] || {}
1880
+
1881
+ # header parameters
1882
+ header_params = opts[:header_params] || {}
1883
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1884
+ # HTTP header 'Accept' (if needed)
1885
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1886
+
1887
+ # form parameters
1888
+ form_params = opts[:form_params] || {}
1889
+
1890
+ # http body (model)
1891
+ post_body = opts[:debug_body]
1892
+
1893
+ # return_type
1894
+ return_type = opts[:debug_return_type]
1895
+
1896
+ # auth_names
1897
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1898
+
1899
+ new_options = opts.merge(
1900
+ :operation => :"OrderApi.unblock_refund_on_order",
1901
+ :header_params => header_params,
1902
+ :query_params => query_params,
1903
+ :form_params => form_params,
1904
+ :body => post_body,
1905
+ :auth_names => auth_names,
1906
+ :return_type => return_type
1907
+ )
1908
+
1909
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1910
+ if @api_client.config.debugging
1911
+ @api_client.config.logger.debug "API called: OrderApi#unblock_refund_on_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1912
+ end
1913
+ return data, status_code, headers
1914
+ end
1915
+
1876
1916
  # Update A/R Retry Configuration
1877
1917
  # Update A/R Retry Configuration. This is primarily an internal API call. It is doubtful you would ever need to use it.
1878
1918
  # @param retry_config [AccountsReceivableRetryConfig] AccountsReceivableRetryConfig object
@@ -239,14 +239,6 @@ module UltracartClient
239
239
  # Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
240
240
  # @param webhook_oid [Integer] The webhook oid to retrieve log summaries for.
241
241
  # @param [Hash] opts the optional parameters
242
- # @option opts [String] :request_id
243
- # @option opts [String] :begin_date
244
- # @option opts [String] :end_date
245
- # @option opts [String] :status
246
- # @option opts [String] :event
247
- # @option opts [String] :order_id
248
- # @option opts [String] :request
249
- # @option opts [Integer] :duration
250
242
  # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (default to 100)
251
243
  # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
252
244
  # @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
@@ -260,14 +252,6 @@ module UltracartClient
260
252
  # Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
261
253
  # @param webhook_oid [Integer] The webhook oid to retrieve log summaries for.
262
254
  # @param [Hash] opts the optional parameters
263
- # @option opts [String] :request_id
264
- # @option opts [String] :begin_date
265
- # @option opts [String] :end_date
266
- # @option opts [String] :status
267
- # @option opts [String] :event
268
- # @option opts [String] :order_id
269
- # @option opts [String] :request
270
- # @option opts [Integer] :duration
271
255
  # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (default to 100)
272
256
  # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
273
257
  # @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
@@ -285,14 +269,6 @@ module UltracartClient
285
269
 
286
270
  # query parameters
287
271
  query_params = opts[:query_params] || {}
288
- query_params[:'requestId'] = opts[:'request_id'] if !opts[:'request_id'].nil?
289
- query_params[:'beginDate'] = opts[:'begin_date'] if !opts[:'begin_date'].nil?
290
- query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
291
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
292
- query_params[:'event'] = opts[:'event'] if !opts[:'event'].nil?
293
- query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
294
- query_params[:'request'] = opts[:'request'] if !opts[:'request'].nil?
295
- query_params[:'duration'] = opts[:'duration'] if !opts[:'duration'].nil?
296
272
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
297
273
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
298
274
  query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
@@ -21,15 +21,23 @@ module UltracartClient
21
21
  # The amount of inactivity in minutes after which the cart should be finalized into an order. This will calculate the finalize_after_dts field.
22
22
  attr_accessor :finalize_after_minutes
23
23
 
24
- # Upsell path code
24
+ # Upsell path code (this is for legacy upsells only)
25
25
  attr_accessor :upsell_path_code
26
26
 
27
+ # Upsell path name to start on (StoreFront Upsells). Will only be respected on a handoff API call.
28
+ attr_accessor :upsell_path_name
29
+
30
+ # Upsell path variation to start on (StoreFront Upsells). Will only be respected on a handoff API call.
31
+ attr_accessor :upsell_path_variation
32
+
27
33
  # Attribute mapping from ruby-style variable name to JSON key.
28
34
  def self.attribute_map
29
35
  {
30
36
  :'finalize_after_dts' => :'finalize_after_dts',
31
37
  :'finalize_after_minutes' => :'finalize_after_minutes',
32
- :'upsell_path_code' => :'upsell_path_code'
38
+ :'upsell_path_code' => :'upsell_path_code',
39
+ :'upsell_path_name' => :'upsell_path_name',
40
+ :'upsell_path_variation' => :'upsell_path_variation'
33
41
  }
34
42
  end
35
43
 
@@ -43,7 +51,9 @@ module UltracartClient
43
51
  {
44
52
  :'finalize_after_dts' => :'String',
45
53
  :'finalize_after_minutes' => :'Integer',
46
- :'upsell_path_code' => :'String'
54
+ :'upsell_path_code' => :'String',
55
+ :'upsell_path_name' => :'String',
56
+ :'upsell_path_variation' => :'String'
47
57
  }
48
58
  end
49
59
 
@@ -79,6 +89,14 @@ module UltracartClient
79
89
  if attributes.key?(:'upsell_path_code')
80
90
  self.upsell_path_code = attributes[:'upsell_path_code']
81
91
  end
92
+
93
+ if attributes.key?(:'upsell_path_name')
94
+ self.upsell_path_name = attributes[:'upsell_path_name']
95
+ end
96
+
97
+ if attributes.key?(:'upsell_path_variation')
98
+ self.upsell_path_variation = attributes[:'upsell_path_variation']
99
+ end
82
100
  end
83
101
 
84
102
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -116,7 +134,9 @@ module UltracartClient
116
134
  self.class == o.class &&
117
135
  finalize_after_dts == o.finalize_after_dts &&
118
136
  finalize_after_minutes == o.finalize_after_minutes &&
119
- upsell_path_code == o.upsell_path_code
137
+ upsell_path_code == o.upsell_path_code &&
138
+ upsell_path_name == o.upsell_path_name &&
139
+ upsell_path_variation == o.upsell_path_variation
120
140
  end
121
141
 
122
142
  # @see the `==` method
@@ -128,7 +148,7 @@ module UltracartClient
128
148
  # Calculates hash code according to all attributes.
129
149
  # @return [Integer] Hash code
130
150
  def hash
131
- [finalize_after_dts, finalize_after_minutes, upsell_path_code].hash
151
+ [finalize_after_dts, finalize_after_minutes, upsell_path_code, upsell_path_name, upsell_path_variation].hash
132
152
  end
133
153
 
134
154
  # Builds the object from hash
@@ -25,6 +25,12 @@ module UltracartClient
25
25
 
26
26
  attr_accessor :open_support_ticket
27
27
 
28
+ # Channel to use to open the support ticket
29
+ attr_accessor :open_support_ticket_channel
30
+
31
+ # Email to send support ticket to
32
+ attr_accessor :open_support_ticket_channel_email
33
+
28
34
  attr_accessor :pause_subscription
29
35
 
30
36
  attr_accessor :resume_subscription
@@ -33,6 +39,28 @@ module UltracartClient
33
39
 
34
40
  attr_accessor :update_subscription_credit_card
35
41
 
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
36
64
  # Attribute mapping from ruby-style variable name to JSON key.
37
65
  def self.attribute_map
38
66
  {
@@ -41,6 +69,8 @@ module UltracartClient
41
69
  :'lookup_order_information' => :'lookup_order_information',
42
70
  :'lookup_subscription_information' => :'lookup_subscription_information',
43
71
  :'open_support_ticket' => :'open_support_ticket',
72
+ :'open_support_ticket_channel' => :'open_support_ticket_channel',
73
+ :'open_support_ticket_channel_email' => :'open_support_ticket_channel_email',
44
74
  :'pause_subscription' => :'pause_subscription',
45
75
  :'resume_subscription' => :'resume_subscription',
46
76
  :'transfer_chat_to_live_agent' => :'transfer_chat_to_live_agent',
@@ -61,6 +91,8 @@ module UltracartClient
61
91
  :'lookup_order_information' => :'Boolean',
62
92
  :'lookup_subscription_information' => :'Boolean',
63
93
  :'open_support_ticket' => :'Boolean',
94
+ :'open_support_ticket_channel' => :'String',
95
+ :'open_support_ticket_channel_email' => :'String',
64
96
  :'pause_subscription' => :'Boolean',
65
97
  :'resume_subscription' => :'Boolean',
66
98
  :'transfer_chat_to_live_agent' => :'Boolean',
@@ -109,6 +141,14 @@ module UltracartClient
109
141
  self.open_support_ticket = attributes[:'open_support_ticket']
110
142
  end
111
143
 
144
+ if attributes.key?(:'open_support_ticket_channel')
145
+ self.open_support_ticket_channel = attributes[:'open_support_ticket_channel']
146
+ end
147
+
148
+ if attributes.key?(:'open_support_ticket_channel_email')
149
+ self.open_support_ticket_channel_email = attributes[:'open_support_ticket_channel_email']
150
+ end
151
+
112
152
  if attributes.key?(:'pause_subscription')
113
153
  self.pause_subscription = attributes[:'pause_subscription']
114
154
  end
@@ -136,9 +176,21 @@ module UltracartClient
136
176
  # Check to see if the all the properties in the model are valid
137
177
  # @return true if the model is valid
138
178
  def valid?
179
+ open_support_ticket_channel_validator = EnumAttributeValidator.new('String', ["none", "email", "UltraCart Task", "Zoho Desk Ticket"])
180
+ return false unless open_support_ticket_channel_validator.valid?(@open_support_ticket_channel)
139
181
  true
140
182
  end
141
183
 
184
+ # Custom attribute writer method checking allowed values (enum).
185
+ # @param [Object] open_support_ticket_channel Object to be assigned
186
+ def open_support_ticket_channel=(open_support_ticket_channel)
187
+ validator = EnumAttributeValidator.new('String', ["none", "email", "UltraCart Task", "Zoho Desk Ticket"])
188
+ unless validator.valid?(open_support_ticket_channel)
189
+ fail ArgumentError, "invalid value for \"open_support_ticket_channel\", must be one of #{validator.allowable_values}."
190
+ end
191
+ @open_support_ticket_channel = open_support_ticket_channel
192
+ end
193
+
142
194
  # Checks equality by comparing each attribute.
143
195
  # @param [Object] Object to be compared
144
196
  def ==(o)
@@ -149,6 +201,8 @@ module UltracartClient
149
201
  lookup_order_information == o.lookup_order_information &&
150
202
  lookup_subscription_information == o.lookup_subscription_information &&
151
203
  open_support_ticket == o.open_support_ticket &&
204
+ open_support_ticket_channel == o.open_support_ticket_channel &&
205
+ open_support_ticket_channel_email == o.open_support_ticket_channel_email &&
152
206
  pause_subscription == o.pause_subscription &&
153
207
  resume_subscription == o.resume_subscription &&
154
208
  transfer_chat_to_live_agent == o.transfer_chat_to_live_agent &&
@@ -164,7 +218,7 @@ module UltracartClient
164
218
  # Calculates hash code according to all attributes.
165
219
  # @return [Integer] Hash code
166
220
  def hash
167
- [cancel_subscription, delay_subscription, lookup_order_information, lookup_subscription_information, open_support_ticket, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card].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
168
222
  end
169
223
 
170
224
  # Builds the object from hash