ultracart_api 3.11.26 → 3.11.28

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: 659d4acdfd97dd1c82fe9a03a5fb238a788ab934ef51a7b636f5c3107a99d477
4
- data.tar.gz: 67b4ab1bc436cac4a6340270fbc92d1ffbebcce2a01a544da4e61fa3f0a741b5
3
+ metadata.gz: 2e2b4677a03b2103fa194b40ebb76de6d6a3e1f73f8fdba966fb3933746d7be4
4
+ data.tar.gz: e8e4d31945bfd34d06c080aad8fa06a441f2d4f2c9818bd7ec094815676d97ea
5
5
  SHA512:
6
- metadata.gz: f685e32edeeb6281d0aa8b391cba3540fc01808e49284369dde83317f71988e05c455d2da8b157643af701c738db305095bc1894222fc01d907850834461c789
7
- data.tar.gz: 53ddb1604a233e13ed2fe86763ffd12b7b3bf5159e8198d94a61bf05b653b8b2ba48dda5a46f8e0b2438aa35ac427d85b92349ea3f06918991f962af1bd0ee29
6
+ metadata.gz: 9186c2fe6a2abf34ca8e44c79486d50c19273158b0a72cbdda7e484a8aae6bc1a3c5a84c2004580c23532aba8e1c02051880551ac4ee7c33a606eb08ff2145c7
7
+ data.tar.gz: 600e0b573b33e0116ddf9a7d7e963dcdbb5f0bd070123b6141870db6c8d2b6f45f0f7d22bd11ab557ab7833f7fb613d0cf1cb40bb5f2a961fd3665f8b3f67936
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.11.26
10
+ - Package version: 3.11.28
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.11.26.gem
27
+ gem install ./ultracart_api-3.11.28.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.11.26.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.11.28.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.11.26'
35
+ gem 'ultracart_api', '~> 3.11.28'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -343,6 +343,7 @@ Class | Method | HTTP request | Description
343
343
  *UltracartClient::OauthApi* | [**oauth_access_token**](docs/OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token.
344
344
  *UltracartClient::OauthApi* | [**oauth_revoke**](docs/OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application.
345
345
  *UltracartClient::OrderApi* | [**adjust_order_total**](docs/OrderApi.md#adjust_order_total) | **POST** /order/orders/{order_id}/adjust_order_total/{desired_total} | Adjusts an order total
346
+ *UltracartClient::OrderApi* | [**assign_to_affiliate**](docs/OrderApi.md#assign_to_affiliate) | **POST** /order/orders/{order_id}/assignToAffiliate | Assigns an order to an affiliate
346
347
  *UltracartClient::OrderApi* | [**block_refund_on_order**](docs/OrderApi.md#block_refund_on_order) | **GET** /order/orders/{order_id}/refund_block | Set a refund block on an order
347
348
  *UltracartClient::OrderApi* | [**cancel_order**](docs/OrderApi.md#cancel_order) | **POST** /order/orders/{order_id}/cancel | Cancel an order
348
349
  *UltracartClient::OrderApi* | [**delete_order**](docs/OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
@@ -1270,6 +1271,7 @@ Class | Method | HTTP request | Description
1270
1271
  - [UltracartClient::Order](docs/Order.md)
1271
1272
  - [UltracartClient::OrderAffiliate](docs/OrderAffiliate.md)
1272
1273
  - [UltracartClient::OrderAffiliateLedger](docs/OrderAffiliateLedger.md)
1274
+ - [UltracartClient::OrderAssignToAffiliateRequest](docs/OrderAssignToAffiliateRequest.md)
1273
1275
  - [UltracartClient::OrderAutoOrder](docs/OrderAutoOrder.md)
1274
1276
  - [UltracartClient::OrderBilling](docs/OrderBilling.md)
1275
1277
  - [UltracartClient::OrderBuysafe](docs/OrderBuysafe.md)
@@ -1589,6 +1591,8 @@ Not every change is committed to every SDK.
1589
1591
 
1590
1592
  | Version | Date | Comments |
1591
1593
  | --: | :-: | --- |
1594
+ | 3.11.28 | 11/07/2025 | OrderApi.assignToAffiliate |
1595
+ | 3.11.27 | 11/06/2025 | conversation ai knowledge base changes |
1592
1596
  | 3.11.26 | 10/20/2025 | conversation api bug fixes |
1593
1597
  | 3.11.25 | 10/20/2025 | conversation api bug fix for bad url on agent profile kb upload |
1594
1598
  | 3.11.24 | 10/20/2025 | new perm flag on conversation virtual agent capabilities |
@@ -3,6 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
+ **original_file_name** | **String** | | [optional]
6
7
  **presigned_url** | **String** | | [optional]
7
8
 
8
9
 
@@ -10,5 +10,6 @@ Name | Type | Description | Notes
10
10
  **metadata** | **String** | | [optional]
11
11
  **mime_type** | **String** | | [optional]
12
12
  **s3_key** | **String** | | [optional]
13
+ **s3_url** | **String** | | [optional]
13
14
 
14
15
 
data/docs/OrderApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**adjust_order_total**](OrderApi.md#adjust_order_total) | **POST** /order/orders/{order_id}/adjust_order_total/{desired_total} | Adjusts an order total
8
+ [**assign_to_affiliate**](OrderApi.md#assign_to_affiliate) | **POST** /order/orders/{order_id}/assignToAffiliate | Assigns an order to an affiliate
8
9
  [**block_refund_on_order**](OrderApi.md#block_refund_on_order) | **GET** /order/orders/{order_id}/refund_block | Set a refund block on an order
9
10
  [**cancel_order**](OrderApi.md#cancel_order) | **POST** /order/orders/{order_id}/cancel | Cancel an order
10
11
  [**delete_order**](OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
@@ -89,6 +90,63 @@ Name | Type | Description | Notes
89
90
 
90
91
 
91
92
 
93
+ # **assign_to_affiliate**
94
+ > OrderResponse assign_to_affiliate(order_id, assign_to_affiliate_request, opts)
95
+
96
+ Assigns an order to an affiliate
97
+
98
+ Assigns an order to an affiliate.
99
+
100
+ ### Example
101
+ ```ruby
102
+ # load the gem
103
+ require 'ultracart_api'
104
+
105
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
106
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
107
+ api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
108
+
109
+
110
+ order_id = 'order_id_example' # String | The order id to assign to the affiliate.
111
+
112
+ assign_to_affiliate_request = UltracartClient::OrderAssignToAffiliateRequest.new # OrderAssignToAffiliateRequest | Assign to affiliate request
113
+
114
+ opts = {
115
+ _expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
116
+ }
117
+
118
+ begin
119
+ #Assigns an order to an affiliate
120
+ result = api_instance.assign_to_affiliate(order_id, assign_to_affiliate_request, opts)
121
+ p result
122
+ rescue UltracartClient::ApiError => e
123
+ puts "Exception when calling OrderApi->assign_to_affiliate: #{e}"
124
+ end
125
+ ```
126
+
127
+ ### Parameters
128
+
129
+ Name | Type | Description | Notes
130
+ ------------- | ------------- | ------------- | -------------
131
+ **order_id** | **String**| The order id to assign to the affiliate. |
132
+ **assign_to_affiliate_request** | [**OrderAssignToAffiliateRequest**](OrderAssignToAffiliateRequest.md)| Assign to affiliate request |
133
+ **_expand** | **String**| The object expansion to perform on the result. See documentation for examples | [optional]
134
+
135
+ ### Return type
136
+
137
+ [**OrderResponse**](OrderResponse.md)
138
+
139
+ ### Authorization
140
+
141
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: application/json
146
+ - **Accept**: application/json
147
+
148
+
149
+
92
150
  # **block_refund_on_order**
93
151
  > block_refund_on_order(order_id, opts)
94
152
 
@@ -0,0 +1,10 @@
1
+ # UltracartClient::OrderAssignToAffiliateRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **affiliate_email** | **String** | Affiliate email to associate with the order | [optional]
7
+ **affiliate_id** | **Integer** | Affiliate id to associate with the order | [optional]
8
+ **affiliate_sub_id** | **String** | Affiliate sub id to associate with the order | [optional]
9
+
10
+
@@ -93,6 +93,70 @@ module UltracartClient
93
93
  end
94
94
  return data, status_code, headers
95
95
  end
96
+ # Assigns an order to an affiliate
97
+ # Assigns an order to an affiliate.
98
+ # @param order_id The order id to assign to the affiliate.
99
+ # @param assign_to_affiliate_request Assign to affiliate request
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
102
+ # @return [OrderResponse]
103
+ def assign_to_affiliate(order_id, assign_to_affiliate_request, opts = {})
104
+ data, _status_code, _headers = assign_to_affiliate_with_http_info(order_id, assign_to_affiliate_request, opts)
105
+ data
106
+ end
107
+
108
+ # Assigns an order to an affiliate
109
+ # Assigns an order to an affiliate.
110
+ # @param order_id The order id to assign to the affiliate.
111
+ # @param assign_to_affiliate_request Assign to affiliate request
112
+ # @param [Hash] opts the optional parameters
113
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
114
+ # @return [Array<(OrderResponse, Fixnum, Hash)>] OrderResponse data, response status code and response headers
115
+ def assign_to_affiliate_with_http_info(order_id, assign_to_affiliate_request, opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug 'Calling API: OrderApi.assign_to_affiliate ...'
118
+ end
119
+ # verify the required parameter 'order_id' is set
120
+ if @api_client.config.client_side_validation && order_id.nil?
121
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.assign_to_affiliate"
122
+ end
123
+ # verify the required parameter 'assign_to_affiliate_request' is set
124
+ if @api_client.config.client_side_validation && assign_to_affiliate_request.nil?
125
+ fail ArgumentError, "Missing the required parameter 'assign_to_affiliate_request' when calling OrderApi.assign_to_affiliate"
126
+ end
127
+ # resource path
128
+ local_var_path = '/order/orders/{order_id}/assignToAffiliate'.sub('{' + 'order_id' + '}', order_id.to_s)
129
+
130
+ # query parameters
131
+ query_params = {}
132
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
133
+
134
+ # header parameters
135
+ 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
+ # HTTP header 'Content-Type'
140
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
141
+
142
+ # form parameters
143
+ form_params = {}
144
+
145
+ # http body (model)
146
+ post_body = @api_client.object_to_http_body(assign_to_affiliate_request)
147
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
148
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => 'OrderResponse')
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug "API called: OrderApi#assign_to_affiliate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
157
+ end
158
+ return data, status_code, headers
159
+ end
96
160
  # Set a refund block on an order
97
161
  # Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
98
162
  # @param order_id The order id to block a refund on.
@@ -14,11 +14,14 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ConversationInsertKnowledgeBaseDocumentRequest
17
+ attr_accessor :original_file_name
18
+
17
19
  attr_accessor :presigned_url
18
20
 
19
21
  # Attribute mapping from ruby-style variable name to JSON key.
20
22
  def self.attribute_map
21
23
  {
24
+ :'original_file_name' => :'original_file_name',
22
25
  :'presigned_url' => :'presigned_url'
23
26
  }
24
27
  end
@@ -26,6 +29,7 @@ module UltracartClient
26
29
  # Attribute type mapping.
27
30
  def self.swagger_types
28
31
  {
32
+ :'original_file_name' => :'String',
29
33
  :'presigned_url' => :'String'
30
34
  }
31
35
  end
@@ -38,6 +42,10 @@ module UltracartClient
38
42
  # convert string to symbol for hash key
39
43
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
44
 
45
+ if attributes.has_key?(:'original_file_name')
46
+ self.original_file_name = attributes[:'original_file_name']
47
+ end
48
+
41
49
  if attributes.has_key?(:'presigned_url')
42
50
  self.presigned_url = attributes[:'presigned_url']
43
51
  end
@@ -61,6 +69,7 @@ module UltracartClient
61
69
  def ==(o)
62
70
  return true if self.equal?(o)
63
71
  self.class == o.class &&
72
+ original_file_name == o.original_file_name &&
64
73
  presigned_url == o.presigned_url
65
74
  end
66
75
 
@@ -73,7 +82,7 @@ module UltracartClient
73
82
  # Calculates hash code according to all attributes.
74
83
  # @return [Fixnum] Hash code
75
84
  def hash
76
- [presigned_url].hash
85
+ [original_file_name, presigned_url].hash
77
86
  end
78
87
 
79
88
  # Builds the object from hash
@@ -29,6 +29,8 @@ module UltracartClient
29
29
 
30
30
  attr_accessor :s3_key
31
31
 
32
+ attr_accessor :s3_url
33
+
32
34
  # Attribute mapping from ruby-style variable name to JSON key.
33
35
  def self.attribute_map
34
36
  {
@@ -38,7 +40,8 @@ module UltracartClient
38
40
  :'document_uuid' => :'document_uuid',
39
41
  :'metadata' => :'metadata',
40
42
  :'mime_type' => :'mime_type',
41
- :'s3_key' => :'s3_key'
43
+ :'s3_key' => :'s3_key',
44
+ :'s3_url' => :'s3_url'
42
45
  }
43
46
  end
44
47
 
@@ -51,7 +54,8 @@ module UltracartClient
51
54
  :'document_uuid' => :'String',
52
55
  :'metadata' => :'String',
53
56
  :'mime_type' => :'String',
54
- :'s3_key' => :'String'
57
+ :'s3_key' => :'String',
58
+ :'s3_url' => :'String'
55
59
  }
56
60
  end
57
61
 
@@ -90,6 +94,10 @@ module UltracartClient
90
94
  if attributes.has_key?(:'s3_key')
91
95
  self.s3_key = attributes[:'s3_key']
92
96
  end
97
+
98
+ if attributes.has_key?(:'s3_url')
99
+ self.s3_url = attributes[:'s3_url']
100
+ end
93
101
  end
94
102
 
95
103
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -116,7 +124,8 @@ module UltracartClient
116
124
  document_uuid == o.document_uuid &&
117
125
  metadata == o.metadata &&
118
126
  mime_type == o.mime_type &&
119
- s3_key == o.s3_key
127
+ s3_key == o.s3_key &&
128
+ s3_url == o.s3_url
120
129
  end
121
130
 
122
131
  # @see the `==` method
@@ -128,7 +137,7 @@ module UltracartClient
128
137
  # Calculates hash code according to all attributes.
129
138
  # @return [Fixnum] Hash code
130
139
  def hash
131
- [chunk_count, description, document_id, document_uuid, metadata, mime_type, s3_key].hash
140
+ [chunk_count, description, document_id, document_uuid, metadata, mime_type, s3_key, s3_url].hash
132
141
  end
133
142
 
134
143
  # Builds the object from hash
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class OrderAssignToAffiliateRequest
17
+ # Affiliate email to associate with the order
18
+ attr_accessor :affiliate_email
19
+
20
+ # Affiliate id to associate with the order
21
+ attr_accessor :affiliate_id
22
+
23
+ # Affiliate sub id to associate with the order
24
+ attr_accessor :affiliate_sub_id
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'affiliate_email' => :'affiliate_email',
30
+ :'affiliate_id' => :'affiliate_id',
31
+ :'affiliate_sub_id' => :'affiliate_sub_id'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'affiliate_email' => :'String',
39
+ :'affiliate_id' => :'Integer',
40
+ :'affiliate_sub_id' => :'String'
41
+ }
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
+
52
+ if attributes.has_key?(:'affiliate_email')
53
+ self.affiliate_email = attributes[:'affiliate_email']
54
+ end
55
+
56
+ if attributes.has_key?(:'affiliate_id')
57
+ self.affiliate_id = attributes[:'affiliate_id']
58
+ end
59
+
60
+ if attributes.has_key?(:'affiliate_sub_id')
61
+ self.affiliate_sub_id = attributes[:'affiliate_sub_id']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ if !@affiliate_sub_id.nil? && @affiliate_sub_id.to_s.length > 50
70
+ invalid_properties.push('invalid value for "affiliate_sub_id", the character length must be smaller than or equal to 50.')
71
+ end
72
+
73
+ invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ return false if !@affiliate_sub_id.nil? && @affiliate_sub_id.to_s.length > 50
80
+ true
81
+ end
82
+
83
+ # Custom attribute writer method with validation
84
+ # @param [Object] affiliate_sub_id Value to be assigned
85
+ def affiliate_sub_id=(affiliate_sub_id)
86
+ if !affiliate_sub_id.nil? && affiliate_sub_id.to_s.length > 50
87
+ fail ArgumentError, 'invalid value for "affiliate_sub_id", the character length must be smaller than or equal to 50.'
88
+ end
89
+
90
+ @affiliate_sub_id = affiliate_sub_id
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ affiliate_email == o.affiliate_email &&
99
+ affiliate_id == o.affiliate_id &&
100
+ affiliate_sub_id == o.affiliate_sub_id
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Fixnum] Hash code
111
+ def hash
112
+ [affiliate_email, affiliate_id, affiliate_sub_id].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ self.class.swagger_types.each_pair do |key, type|
121
+ if type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :DateTime
142
+ DateTime.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value.to_s
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :BOOLEAN
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ temp_model = UltracartClient.const_get(type).new
173
+ temp_model.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ next if value.nil?
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+ end
@@ -241,7 +241,7 @@ module UltracartClient
241
241
  # Check to see if the all the properties in the model are valid
242
242
  # @return true if the model is valid
243
243
  def valid?
244
- payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'Crypto', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane'])
244
+ payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'Crypto', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane', 'Klarna'])
245
245
  return false unless payment_method_validator.valid?(@payment_method)
246
246
  payment_status_validator = EnumAttributeValidator.new('String', ['Unprocessed', 'Authorized', 'Capture Failed', 'Processed', 'Declined', 'Voided', 'Refunded', 'Skipped'])
247
247
  return false unless payment_status_validator.valid?(@payment_status)
@@ -251,7 +251,7 @@ module UltracartClient
251
251
  # Custom attribute writer method checking allowed values (enum).
252
252
  # @param [Object] payment_method Object to be assigned
253
253
  def payment_method=(payment_method)
254
- validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'Crypto', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane'])
254
+ validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'Crypto', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane', 'Klarna'])
255
255
  unless validator.valid?(payment_method)
256
256
  fail ArgumentError, 'invalid value for "payment_method", must be one of #{validator.allowable_values}.'
257
257
  end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.11.26'
14
+ VERSION = '3.11.28'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -669,6 +669,7 @@ require 'ultracart_api/models/oauth_token_response'
669
669
  require 'ultracart_api/models/order'
670
670
  require 'ultracart_api/models/order_affiliate'
671
671
  require 'ultracart_api/models/order_affiliate_ledger'
672
+ require 'ultracart_api/models/order_assign_to_affiliate_request'
672
673
  require 'ultracart_api/models/order_auto_order'
673
674
  require 'ultracart_api/models/order_billing'
674
675
  require 'ultracart_api/models/order_buysafe'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.26
4
+ version: 3.11.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-20 00:00:00.000000000 Z
11
+ date: 2025-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -887,6 +887,7 @@ files:
887
887
  - docs/OrderAffiliate.md
888
888
  - docs/OrderAffiliateLedger.md
889
889
  - docs/OrderApi.md
890
+ - docs/OrderAssignToAffiliateRequest.md
890
891
  - docs/OrderAutoOrder.md
891
892
  - docs/OrderBilling.md
892
893
  - docs/OrderBuysafe.md
@@ -1817,6 +1818,7 @@ files:
1817
1818
  - lib/ultracart_api/models/order.rb
1818
1819
  - lib/ultracart_api/models/order_affiliate.rb
1819
1820
  - lib/ultracart_api/models/order_affiliate_ledger.rb
1821
+ - lib/ultracart_api/models/order_assign_to_affiliate_request.rb
1820
1822
  - lib/ultracart_api/models/order_auto_order.rb
1821
1823
  - lib/ultracart_api/models/order_billing.rb
1822
1824
  - lib/ultracart_api/models/order_buysafe.rb