ultracart_api 4.1.101 → 4.1.102

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: b0c7729cd8cce0aa31c5e610db0089f913d0c07f58c5764e9b284942af573e79
4
- data.tar.gz: b56629ffebfadf049f8e21bd77766a83315cc318e7db2352162ace4a12fca03a
3
+ metadata.gz: 1e184ae5eeb45aff50611924cb65b7dbd38f294c3e605d4264b063766d30e126
4
+ data.tar.gz: ba150f5a4d0f43f6eea1a35cdcec19482a47197cb7bff3331d7dffe98f104b6d
5
5
  SHA512:
6
- metadata.gz: fd80a1cb0fb6cbc5e2bd7e611aa29711837df3d8d4643eb452bd1ef48394efcb03dc2e6f876117fa25117b22136830fe746b6fa8d7e20d4d226a9d3f72c71f5d
7
- data.tar.gz: 9cc03da203bc501c68128e6c32b3678177d61e38742255afe9a71c44adb6e14abc4dc68635dbd504a704c80bf06085e91969c376b3229cf6e4f8fc559d47815b
6
+ metadata.gz: 42348e40659cecc10047f1f828ba071e126346a4c12889694bc873f70d232b01d47a233fdbec636f2ed3892869622930045fc976743a166ca02fc36974e8c128
7
+ data.tar.gz: e2931485d637b353c6af89f22fd3158bd01b2ce0386867283b8c702c738efa649ad9bec9ce3e804c73f36975a666605c67c3ca658194e6d883ab46882168ab88
data/README.md CHANGED
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.1.101
10
+ - Package version: 4.1.102
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  - For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
16
16
  gemfile:
17
17
 
18
18
  ```shell
19
- gem 'ultracart_api', '4.1.101'
19
+ gem 'ultracart_api', '4.1.102'
20
20
  ```
21
21
 
22
22
  install:
@@ -481,6 +481,7 @@ Class | Method | HTTP request | Description
481
481
  *UltracartClient::StorefrontApi* | [**delete_screen_recording_segment**](docs/StorefrontApi.md#delete_screen_recording_segment) | **DELETE** /storefront/{storefront_oid}/screen_recordings/segments/{screen_recording_segment_oid} | Delete screen recording segment
482
482
  *UltracartClient::StorefrontApi* | [**delete_twilio_account**](docs/StorefrontApi.md#delete_twilio_account) | **DELETE** /storefront/twilio/accounts/{esp_twilio_uuid} | delete Twilio account
483
483
  *UltracartClient::StorefrontApi* | [**duplicate_library_item**](docs/StorefrontApi.md#duplicate_library_item) | **POST** /storefront/code_library/{library_item_oid}/duplicate | Duplicate library item.
484
+ *UltracartClient::StorefrontApi* | [**enroll_commseq_customer**](docs/StorefrontApi.md#enroll_commseq_customer) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/enroll | Enroll a customer into a communication sequence
484
485
  *UltracartClient::StorefrontApi* | [**favorite_screen_recording**](docs/StorefrontApi.md#favorite_screen_recording) | **POST** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite | Update favorite flag on screen recording
485
486
  *UltracartClient::StorefrontApi* | [**geocode_address**](docs/StorefrontApi.md#geocode_address) | **POST** /storefront/{storefront_oid}/email/geocode | Obtain lat/long for an address
486
487
  *UltracartClient::StorefrontApi* | [**get_countries**](docs/StorefrontApi.md#get_countries) | **GET** /storefront/{storefront_oid}/email/countries | Get countries
@@ -1162,6 +1163,8 @@ Class | Method | HTTP request | Description
1162
1163
  - [UltracartClient::EmailCommseqEmailSendTestResponse](docs/EmailCommseqEmailSendTestResponse.md)
1163
1164
  - [UltracartClient::EmailCommseqEmailsRequest](docs/EmailCommseqEmailsRequest.md)
1164
1165
  - [UltracartClient::EmailCommseqEmailsResponse](docs/EmailCommseqEmailsResponse.md)
1166
+ - [UltracartClient::EmailCommseqEnrollmentRequest](docs/EmailCommseqEnrollmentRequest.md)
1167
+ - [UltracartClient::EmailCommseqEnrollmentResponse](docs/EmailCommseqEnrollmentResponse.md)
1165
1168
  - [UltracartClient::EmailCommseqPostcard](docs/EmailCommseqPostcard.md)
1166
1169
  - [UltracartClient::EmailCommseqPostcardResponse](docs/EmailCommseqPostcardResponse.md)
1167
1170
  - [UltracartClient::EmailCommseqPostcardSendTestRequest](docs/EmailCommseqPostcardSendTestRequest.md)
@@ -1777,6 +1780,7 @@ Not every change is committed to every SDK.
1777
1780
 
1778
1781
  | Version | Date | Comments |
1779
1782
  | --: | :-: | --- |
1783
+ | 4.1.102 | 06/17/2026 | storefront communications - new single email enrollment method |
1780
1784
  | 4.1.101 | 06/10/2026 | conversation pbx call notes fields |
1781
1785
  | 4.1.100 | 06/05/2026 | webhook log summary filtering |
1782
1786
  | 4.1.99 | 06/05/2026 | added webhook name and merchant_comments |
@@ -13,6 +13,8 @@
13
13
  | **arbitrary_unit_cost_remaining_orders** | **Integer** | The number of rebills to give the arbitrary unit cost on before reverting to normal pricing. | [optional] |
14
14
  | **auto_order_item_oid** | **Integer** | Primary key of AutoOrderItem | [optional] |
15
15
  | **calculated_next_shipment_dts** | **String** | Calculated Date/time that this item is scheduled to rebill. Will be null if no more shipments are going to occur on this item | [optional] |
16
+ | **cancel_dts** | **String** | Date/time this item was cancelled (companion to cancel_reason). On update, null leaves the existing value unchanged; pass an empty string to clear it. | [optional] |
17
+ | **cancel_reason** | **String** | Reason this item was cancelled, captured when the item was cancelled by the customer or merchant. On update, null leaves the existing value unchanged; pass an empty string to clear it. | [optional] |
16
18
  | **first_order_dts** | **String** | Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet. | [optional] |
17
19
  | **frequency** | **String** | Frequency of the rebill if not a fixed schedule | [optional] |
18
20
  | **future_schedules** | [**Array<AutoOrderItemFutureSchedule>**](AutoOrderItemFutureSchedule.md) | The future rebill schedule for this item up to the next ten rebills | [optional] |
@@ -50,6 +52,8 @@ instance = UltracartClient::AutoOrderItem.new(
50
52
  arbitrary_unit_cost_remaining_orders: null,
51
53
  auto_order_item_oid: null,
52
54
  calculated_next_shipment_dts: null,
55
+ cancel_dts: null,
56
+ cancel_reason: null,
53
57
  first_order_dts: null,
54
58
  frequency: null,
55
59
  future_schedules: null,
@@ -0,0 +1,22 @@
1
+ # UltracartClient::EmailCommseqEnrollmentRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | Email address of the customer to enroll | [optional] |
8
+ | **esp_commseq_uuid** | **String** | Communication sequence UUID | [optional] |
9
+ | **name** | **String** | Optional name of the customer to enroll | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::EmailCommseqEnrollmentRequest.new(
17
+ email: null,
18
+ esp_commseq_uuid: null,
19
+ name: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,30 @@
1
+ # UltracartClient::EmailCommseqEnrollmentResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **already_enrolled** | **Boolean** | True if the customer was already enrolled and therefore not enrolled again | [optional] |
8
+ | **enrolled** | **Boolean** | True if the customer was newly enrolled into the sequence | [optional] |
9
+ | **error** | [**Error**](Error.md) | | [optional] |
10
+ | **esp_customer_uuid** | **String** | The resolved ESP customer UUID for the enrolled email | [optional] |
11
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
12
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
13
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'ultracart_api'
19
+
20
+ instance = UltracartClient::EmailCommseqEnrollmentResponse.new(
21
+ already_enrolled: null,
22
+ enrolled: null,
23
+ error: null,
24
+ esp_customer_uuid: null,
25
+ metadata: null,
26
+ success: null,
27
+ warning: null
28
+ )
29
+ ```
30
+
@@ -32,6 +32,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
32
32
  | [**delete_screen_recording_segment**](StorefrontApi.md#delete_screen_recording_segment) | **DELETE** /storefront/{storefront_oid}/screen_recordings/segments/{screen_recording_segment_oid} | Delete screen recording segment |
33
33
  | [**delete_twilio_account**](StorefrontApi.md#delete_twilio_account) | **DELETE** /storefront/twilio/accounts/{esp_twilio_uuid} | delete Twilio account |
34
34
  | [**duplicate_library_item**](StorefrontApi.md#duplicate_library_item) | **POST** /storefront/code_library/{library_item_oid}/duplicate | Duplicate library item. |
35
+ | [**enroll_commseq_customer**](StorefrontApi.md#enroll_commseq_customer) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/enroll | Enroll a customer into a communication sequence |
35
36
  | [**favorite_screen_recording**](StorefrontApi.md#favorite_screen_recording) | **POST** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite | Update favorite flag on screen recording |
36
37
  | [**geocode_address**](StorefrontApi.md#geocode_address) | **POST** /storefront/{storefront_oid}/email/geocode | Obtain lat/long for an address |
37
38
  | [**get_countries**](StorefrontApi.md#get_countries) | **GET** /storefront/{storefront_oid}/email/countries | Get countries |
@@ -1667,6 +1668,61 @@ end
1667
1668
  - **Accept**: application/json
1668
1669
 
1669
1670
 
1671
+ ## enroll_commseq_customer
1672
+
1673
+ > <EmailCommseqEnrollmentResponse> enroll_commseq_customer(storefront_oid, commseq_uuid, email_commseq_enrollment_request)
1674
+
1675
+ Enroll a customer into a communication sequence
1676
+
1677
+ Enrolls a single real customer (by email) into the communication sequence. A customer who is already enrolled will not be enrolled a second time.
1678
+
1679
+
1680
+ ### Examples
1681
+
1682
+
1683
+ (No example for this operation).
1684
+
1685
+
1686
+ #### Using the enroll_commseq_customer_with_http_info variant
1687
+
1688
+ This returns an Array which contains the response data, status code and headers.
1689
+
1690
+ > <Array(<EmailCommseqEnrollmentResponse>, Integer, Hash)> enroll_commseq_customer_with_http_info(storefront_oid, commseq_uuid, email_commseq_enrollment_request)
1691
+
1692
+ ```ruby
1693
+ begin
1694
+ # Enroll a customer into a communication sequence
1695
+ data, status_code, headers = api_instance.enroll_commseq_customer_with_http_info(storefront_oid, commseq_uuid, email_commseq_enrollment_request)
1696
+ p status_code # => 2xx
1697
+ p headers # => { ... }
1698
+ p data # => <EmailCommseqEnrollmentResponse>
1699
+ rescue UltracartClient::ApiError => e
1700
+ puts "Error when calling StorefrontApi->enroll_commseq_customer_with_http_info: #{e}"
1701
+ end
1702
+ ```
1703
+
1704
+ ### Parameters
1705
+
1706
+ | Name | Type | Description | Notes |
1707
+ | ---- | ---- | ----------- | ----- |
1708
+ | **storefront_oid** | **Integer** | | |
1709
+ | **commseq_uuid** | **String** | | |
1710
+ | **email_commseq_enrollment_request** | [**EmailCommseqEnrollmentRequest**](EmailCommseqEnrollmentRequest.md) | Commseq enrollment request | |
1711
+
1712
+ ### Return type
1713
+
1714
+ [**EmailCommseqEnrollmentResponse**](EmailCommseqEnrollmentResponse.md)
1715
+
1716
+ ### Authorization
1717
+
1718
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
1719
+
1720
+ ### HTTP request headers
1721
+
1722
+ - **Content-Type**: application/json
1723
+ - **Accept**: application/json
1724
+
1725
+
1670
1726
  ## favorite_screen_recording
1671
1727
 
1672
1728
  > favorite_screen_recording(storefront_oid, screen_recording_uuid)
@@ -1932,6 +1932,87 @@ module UltracartClient
1932
1932
  return data, status_code, headers
1933
1933
  end
1934
1934
 
1935
+ # Enroll a customer into a communication sequence
1936
+ # Enrolls a single real customer (by email) into the communication sequence. A customer who is already enrolled will not be enrolled a second time.
1937
+ # @param storefront_oid [Integer]
1938
+ # @param commseq_uuid [String]
1939
+ # @param email_commseq_enrollment_request [EmailCommseqEnrollmentRequest] Commseq enrollment request
1940
+ # @param [Hash] opts the optional parameters
1941
+ # @return [EmailCommseqEnrollmentResponse]
1942
+ def enroll_commseq_customer(storefront_oid, commseq_uuid, email_commseq_enrollment_request, opts = {})
1943
+ data, _status_code, _headers = enroll_commseq_customer_with_http_info(storefront_oid, commseq_uuid, email_commseq_enrollment_request, opts)
1944
+ data
1945
+ end
1946
+
1947
+ # Enroll a customer into a communication sequence
1948
+ # Enrolls a single real customer (by email) into the communication sequence. A customer who is already enrolled will not be enrolled a second time.
1949
+ # @param storefront_oid [Integer]
1950
+ # @param commseq_uuid [String]
1951
+ # @param email_commseq_enrollment_request [EmailCommseqEnrollmentRequest] Commseq enrollment request
1952
+ # @param [Hash] opts the optional parameters
1953
+ # @return [Array<(EmailCommseqEnrollmentResponse, Integer, Hash)>] EmailCommseqEnrollmentResponse data, response status code and response headers
1954
+ def enroll_commseq_customer_with_http_info(storefront_oid, commseq_uuid, email_commseq_enrollment_request, opts = {})
1955
+ if @api_client.config.debugging
1956
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.enroll_commseq_customer ...'
1957
+ end
1958
+ # verify the required parameter 'storefront_oid' is set
1959
+ if @api_client.config.client_side_validation && storefront_oid.nil?
1960
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.enroll_commseq_customer"
1961
+ end
1962
+ # verify the required parameter 'commseq_uuid' is set
1963
+ if @api_client.config.client_side_validation && commseq_uuid.nil?
1964
+ fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.enroll_commseq_customer"
1965
+ end
1966
+ # verify the required parameter 'email_commseq_enrollment_request' is set
1967
+ if @api_client.config.client_side_validation && email_commseq_enrollment_request.nil?
1968
+ fail ArgumentError, "Missing the required parameter 'email_commseq_enrollment_request' when calling StorefrontApi.enroll_commseq_customer"
1969
+ end
1970
+ # resource path
1971
+ local_var_path = '/storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/enroll'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'commseq_uuid' + '}', CGI.escape(commseq_uuid.to_s))
1972
+
1973
+ # query parameters
1974
+ query_params = opts[:query_params] || {}
1975
+
1976
+ # header parameters
1977
+ header_params = opts[:header_params] || {}
1978
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1979
+ # HTTP header 'Accept' (if needed)
1980
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1981
+ # HTTP header 'Content-Type'
1982
+ content_type = @api_client.select_header_content_type(['application/json'])
1983
+ if !content_type.nil?
1984
+ header_params['Content-Type'] = content_type
1985
+ end
1986
+
1987
+ # form parameters
1988
+ form_params = opts[:form_params] || {}
1989
+
1990
+ # http body (model)
1991
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(email_commseq_enrollment_request)
1992
+
1993
+ # return_type
1994
+ return_type = opts[:debug_return_type] || 'EmailCommseqEnrollmentResponse'
1995
+
1996
+ # auth_names
1997
+ auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
1998
+
1999
+ new_options = opts.merge(
2000
+ :operation => :"StorefrontApi.enroll_commseq_customer",
2001
+ :header_params => header_params,
2002
+ :query_params => query_params,
2003
+ :form_params => form_params,
2004
+ :body => post_body,
2005
+ :auth_names => auth_names,
2006
+ :return_type => return_type
2007
+ )
2008
+
2009
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2010
+ if @api_client.config.debugging
2011
+ @api_client.config.logger.debug "API called: StorefrontApi#enroll_commseq_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2012
+ end
2013
+ return data, status_code, headers
2014
+ end
2015
+
1935
2016
  # Update favorite flag on screen recording
1936
2017
  # Update favorite flag on screen recording
1937
2018
  # @param storefront_oid [Integer]
@@ -42,6 +42,12 @@ module UltracartClient
42
42
  # Calculated Date/time that this item is scheduled to rebill. Will be null if no more shipments are going to occur on this item
43
43
  attr_accessor :calculated_next_shipment_dts
44
44
 
45
+ # Date/time this item was cancelled (companion to cancel_reason). On update, null leaves the existing value unchanged; pass an empty string to clear it.
46
+ attr_accessor :cancel_dts
47
+
48
+ # Reason this item was cancelled, captured when the item was cancelled by the customer or merchant. On update, null leaves the existing value unchanged; pass an empty string to clear it.
49
+ attr_accessor :cancel_reason
50
+
45
51
  # Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet.
46
52
  attr_accessor :first_order_dts
47
53
 
@@ -138,6 +144,8 @@ module UltracartClient
138
144
  :'arbitrary_unit_cost_remaining_orders' => :'arbitrary_unit_cost_remaining_orders',
139
145
  :'auto_order_item_oid' => :'auto_order_item_oid',
140
146
  :'calculated_next_shipment_dts' => :'calculated_next_shipment_dts',
147
+ :'cancel_dts' => :'cancel_dts',
148
+ :'cancel_reason' => :'cancel_reason',
141
149
  :'first_order_dts' => :'first_order_dts',
142
150
  :'frequency' => :'frequency',
143
151
  :'future_schedules' => :'future_schedules',
@@ -179,6 +187,8 @@ module UltracartClient
179
187
  :'arbitrary_unit_cost_remaining_orders' => :'Integer',
180
188
  :'auto_order_item_oid' => :'Integer',
181
189
  :'calculated_next_shipment_dts' => :'String',
190
+ :'cancel_dts' => :'String',
191
+ :'cancel_reason' => :'String',
182
192
  :'first_order_dts' => :'String',
183
193
  :'frequency' => :'String',
184
194
  :'future_schedules' => :'Array<AutoOrderItemFutureSchedule>',
@@ -262,6 +272,14 @@ module UltracartClient
262
272
  self.calculated_next_shipment_dts = attributes[:'calculated_next_shipment_dts']
263
273
  end
264
274
 
275
+ if attributes.key?(:'cancel_dts')
276
+ self.cancel_dts = attributes[:'cancel_dts']
277
+ end
278
+
279
+ if attributes.key?(:'cancel_reason')
280
+ self.cancel_reason = attributes[:'cancel_reason']
281
+ end
282
+
265
283
  if attributes.key?(:'first_order_dts')
266
284
  self.first_order_dts = attributes[:'first_order_dts']
267
285
  end
@@ -392,6 +410,8 @@ module UltracartClient
392
410
  arbitrary_unit_cost_remaining_orders == o.arbitrary_unit_cost_remaining_orders &&
393
411
  auto_order_item_oid == o.auto_order_item_oid &&
394
412
  calculated_next_shipment_dts == o.calculated_next_shipment_dts &&
413
+ cancel_dts == o.cancel_dts &&
414
+ cancel_reason == o.cancel_reason &&
395
415
  first_order_dts == o.first_order_dts &&
396
416
  frequency == o.frequency &&
397
417
  future_schedules == o.future_schedules &&
@@ -424,7 +444,7 @@ module UltracartClient
424
444
  # Calculates hash code according to all attributes.
425
445
  # @return [Integer] Hash code
426
446
  def hash
427
- [add_ons, arbitrary_item_id, arbitrary_percentage_discount, arbitrary_quantity, arbitrary_schedule_days, arbitrary_unit_cost, arbitrary_unit_cost_remaining_orders, auto_order_item_oid, calculated_next_shipment_dts, first_order_dts, frequency, future_schedules, last_order_dts, life_time_value, next_item_id, next_preshipment_notice_dts, next_shipment_dts, no_order_after_dts, number_of_rebills, options, original_item_id, original_quantity, paused, paypal_payer_id, paypal_recurring_payment_profile_id, preshipment_notice_sent, properties, rebill_value, remaining_repeat_count, simple_schedule].hash
447
+ [add_ons, arbitrary_item_id, arbitrary_percentage_discount, arbitrary_quantity, arbitrary_schedule_days, arbitrary_unit_cost, arbitrary_unit_cost_remaining_orders, auto_order_item_oid, calculated_next_shipment_dts, cancel_dts, cancel_reason, first_order_dts, frequency, future_schedules, last_order_dts, life_time_value, next_item_id, next_preshipment_notice_dts, next_shipment_dts, no_order_after_dts, number_of_rebills, options, original_item_id, original_quantity, paused, paypal_payer_id, paypal_recurring_payment_profile_id, preshipment_notice_sent, properties, rebill_value, remaining_repeat_count, simple_schedule].hash
428
448
  end
429
449
 
430
450
  # Builds the object from hash
@@ -0,0 +1,240 @@
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 EmailCommseqEnrollmentRequest
18
+ # Email address of the customer to enroll
19
+ attr_accessor :email
20
+
21
+ # Communication sequence UUID
22
+ attr_accessor :esp_commseq_uuid
23
+
24
+ # Optional name of the customer to enroll
25
+ attr_accessor :name
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'email' => :'email',
31
+ :'esp_commseq_uuid' => :'esp_commseq_uuid',
32
+ :'name' => :'name'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'email' => :'String',
45
+ :'esp_commseq_uuid' => :'String',
46
+ :'name' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqEnrollmentRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqEnrollmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'email')
72
+ self.email = attributes[:'email']
73
+ end
74
+
75
+ if attributes.key?(:'esp_commseq_uuid')
76
+ self.esp_commseq_uuid = attributes[:'esp_commseq_uuid']
77
+ end
78
+
79
+ if attributes.key?(:'name')
80
+ self.name = attributes[:'name']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ email == o.email &&
103
+ esp_commseq_uuid == o.esp_commseq_uuid &&
104
+ name == o.name
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [email, esp_commseq_uuid, name].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = UltracartClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -0,0 +1,277 @@
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 EmailCommseqEnrollmentResponse
18
+ # True if the customer was already enrolled and therefore not enrolled again
19
+ attr_accessor :already_enrolled
20
+
21
+ # True if the customer was newly enrolled into the sequence
22
+ attr_accessor :enrolled
23
+
24
+ attr_accessor :error
25
+
26
+ # The resolved ESP customer UUID for the enrolled email
27
+ attr_accessor :esp_customer_uuid
28
+
29
+ attr_accessor :metadata
30
+
31
+ # Indicates if API call was successful
32
+ attr_accessor :success
33
+
34
+ attr_accessor :warning
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'already_enrolled' => :'already_enrolled',
40
+ :'enrolled' => :'enrolled',
41
+ :'error' => :'error',
42
+ :'esp_customer_uuid' => :'esp_customer_uuid',
43
+ :'metadata' => :'metadata',
44
+ :'success' => :'success',
45
+ :'warning' => :'warning'
46
+ }
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'already_enrolled' => :'Boolean',
58
+ :'enrolled' => :'Boolean',
59
+ :'error' => :'Error',
60
+ :'esp_customer_uuid' => :'String',
61
+ :'metadata' => :'ResponseMetadata',
62
+ :'success' => :'Boolean',
63
+ :'warning' => :'Warning'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqEnrollmentResponse` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!self.class.attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqEnrollmentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'already_enrolled')
89
+ self.already_enrolled = attributes[:'already_enrolled']
90
+ end
91
+
92
+ if attributes.key?(:'enrolled')
93
+ self.enrolled = attributes[:'enrolled']
94
+ end
95
+
96
+ if attributes.key?(:'error')
97
+ self.error = attributes[:'error']
98
+ end
99
+
100
+ if attributes.key?(:'esp_customer_uuid')
101
+ self.esp_customer_uuid = attributes[:'esp_customer_uuid']
102
+ end
103
+
104
+ if attributes.key?(:'metadata')
105
+ self.metadata = attributes[:'metadata']
106
+ end
107
+
108
+ if attributes.key?(:'success')
109
+ self.success = attributes[:'success']
110
+ end
111
+
112
+ if attributes.key?(:'warning')
113
+ self.warning = attributes[:'warning']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ true
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ already_enrolled == o.already_enrolled &&
136
+ enrolled == o.enrolled &&
137
+ error == o.error &&
138
+ esp_customer_uuid == o.esp_customer_uuid &&
139
+ metadata == o.metadata &&
140
+ success == o.success &&
141
+ warning == o.warning
142
+ end
143
+
144
+ # @see the `==` method
145
+ # @param [Object] Object to be compared
146
+ def eql?(o)
147
+ self == o
148
+ end
149
+
150
+ # Calculates hash code according to all attributes.
151
+ # @return [Integer] Hash code
152
+ def hash
153
+ [already_enrolled, enrolled, error, esp_customer_uuid, metadata, success, warning].hash
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def self.build_from_hash(attributes)
160
+ new.build_from_hash(attributes)
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def build_from_hash(attributes)
167
+ return nil unless attributes.is_a?(Hash)
168
+ attributes = attributes.transform_keys(&:to_sym)
169
+ self.class.openapi_types.each_pair do |key, type|
170
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
+ self.send("#{key}=", nil)
172
+ elsif type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
176
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
177
+ end
178
+ elsif !attributes[self.class.attribute_map[key]].nil?
179
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
180
+ end
181
+ end
182
+
183
+ self
184
+ end
185
+
186
+ # Deserializes the data based on type
187
+ # @param string type Data type
188
+ # @param string value Value to be deserialized
189
+ # @return [Object] Deserialized data
190
+ def _deserialize(type, value)
191
+ case type.to_sym
192
+ when :Time
193
+ Time.parse(value)
194
+ when :Date
195
+ Date.parse(value)
196
+ when :String
197
+ value.to_s
198
+ when :Integer
199
+ value.to_i
200
+ when :Float
201
+ value.to_f
202
+ when :Boolean
203
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
204
+ true
205
+ else
206
+ false
207
+ end
208
+ when :Object
209
+ # generic object (usually a Hash), return directly
210
+ value
211
+ when /\AArray<(?<inner_type>.+)>\z/
212
+ inner_type = Regexp.last_match[:inner_type]
213
+ value.map { |v| _deserialize(inner_type, v) }
214
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
215
+ k_type = Regexp.last_match[:k_type]
216
+ v_type = Regexp.last_match[:v_type]
217
+ {}.tap do |hash|
218
+ value.each do |k, v|
219
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
220
+ end
221
+ end
222
+ else # model
223
+ # models (e.g. Pet) or oneOf
224
+ klass = UltracartClient.const_get(type)
225
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
226
+ end
227
+ end
228
+
229
+ # Returns the string representation of the object
230
+ # @return [String] String presentation of the object
231
+ def to_s
232
+ to_hash.to_s
233
+ end
234
+
235
+ # to_body is an alias to to_hash (backward compatibility)
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_body
238
+ to_hash
239
+ end
240
+
241
+ # Returns the object in the form of hash
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_hash
244
+ hash = {}
245
+ self.class.attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ # Outputs non-array value in the form of hash
258
+ # For object, use to_hash. Otherwise, just return the value
259
+ # @param [Object] value Any valid value
260
+ # @return [Hash] Returns the value in the form of hash
261
+ def _to_hash(value)
262
+ if value.is_a?(Array)
263
+ value.compact.map { |v| _to_hash(v) }
264
+ elsif value.is_a?(Hash)
265
+ {}.tap do |hash|
266
+ value.each { |k, v| hash[k] = _to_hash(v) }
267
+ end
268
+ elsif value.respond_to? :to_hash
269
+ value.to_hash
270
+ else
271
+ value
272
+ end
273
+ end
274
+
275
+ end
276
+
277
+ end
@@ -270,6 +270,14 @@ module UltracartClient
270
270
  # @return Array for valid properties with the reasons
271
271
  def list_invalid_properties
272
272
  invalid_properties = Array.new
273
+ if !@merchant_comments.nil? && @merchant_comments.to_s.length > 2000
274
+ invalid_properties.push('invalid value for "merchant_comments", the character length must be smaller than or equal to 2000.')
275
+ end
276
+
277
+ if !@name.nil? && @name.to_s.length > 80
278
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 80.')
279
+ end
280
+
273
281
  invalid_properties
274
282
  end
275
283
 
@@ -280,6 +288,8 @@ module UltracartClient
280
288
  return false unless api_version_validator.valid?(@api_version)
281
289
  authentication_type_validator = EnumAttributeValidator.new('String', ["none", "basic", "api user", "aws iam"])
282
290
  return false unless authentication_type_validator.valid?(@authentication_type)
291
+ return false if !@merchant_comments.nil? && @merchant_comments.to_s.length > 2000
292
+ return false if !@name.nil? && @name.to_s.length > 80
283
293
  true
284
294
  end
285
295
 
@@ -303,6 +313,26 @@ module UltracartClient
303
313
  @authentication_type = authentication_type
304
314
  end
305
315
 
316
+ # Custom attribute writer method with validation
317
+ # @param [Object] merchant_comments Value to be assigned
318
+ def merchant_comments=(merchant_comments)
319
+ if !merchant_comments.nil? && merchant_comments.to_s.length > 2000
320
+ fail ArgumentError, 'invalid value for "merchant_comments", the character length must be smaller than or equal to 2000.'
321
+ end
322
+
323
+ @merchant_comments = merchant_comments
324
+ end
325
+
326
+ # Custom attribute writer method with validation
327
+ # @param [Object] name Value to be assigned
328
+ def name=(name)
329
+ if !name.nil? && name.to_s.length > 80
330
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 80.'
331
+ end
332
+
333
+ @name = name
334
+ end
335
+
306
336
  # Checks equality by comparing each attribute.
307
337
  # @param [Object] Object to be compared
308
338
  def ==(o)
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.101'
14
+ VERSION = '4.1.102'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -483,6 +483,8 @@ require 'ultracart_api/models/email_commseq_email_send_test_request'
483
483
  require 'ultracart_api/models/email_commseq_email_send_test_response'
484
484
  require 'ultracart_api/models/email_commseq_emails_request'
485
485
  require 'ultracart_api/models/email_commseq_emails_response'
486
+ require 'ultracart_api/models/email_commseq_enrollment_request'
487
+ require 'ultracart_api/models/email_commseq_enrollment_response'
486
488
  require 'ultracart_api/models/email_commseq_postcard'
487
489
  require 'ultracart_api/models/email_commseq_postcard_response'
488
490
  require 'ultracart_api/models/email_commseq_postcard_send_test_request'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.101
4
+ version: 4.1.102
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-10 00:00:00.000000000 Z
11
+ date: 2026-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -536,6 +536,8 @@ files:
536
536
  - docs/EmailCommseqEmailSendTestResponse.md
537
537
  - docs/EmailCommseqEmailsRequest.md
538
538
  - docs/EmailCommseqEmailsResponse.md
539
+ - docs/EmailCommseqEnrollmentRequest.md
540
+ - docs/EmailCommseqEnrollmentResponse.md
539
541
  - docs/EmailCommseqPostcard.md
540
542
  - docs/EmailCommseqPostcardResponse.md
541
543
  - docs/EmailCommseqPostcardSendTestRequest.md
@@ -1580,6 +1582,8 @@ files:
1580
1582
  - lib/ultracart_api/models/email_commseq_email_send_test_response.rb
1581
1583
  - lib/ultracart_api/models/email_commseq_emails_request.rb
1582
1584
  - lib/ultracart_api/models/email_commseq_emails_response.rb
1585
+ - lib/ultracart_api/models/email_commseq_enrollment_request.rb
1586
+ - lib/ultracart_api/models/email_commseq_enrollment_response.rb
1583
1587
  - lib/ultracart_api/models/email_commseq_postcard.rb
1584
1588
  - lib/ultracart_api/models/email_commseq_postcard_response.rb
1585
1589
  - lib/ultracart_api/models/email_commseq_postcard_send_test_request.rb