ultracart_api 3.11.27 → 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: 1e0974216f56310e0cb0191b1ca87bd7ac4afc5955357929666aa76e85650787
4
- data.tar.gz: 4c0ecbded1164a3d001b3fd617859fe9380e26a10f84c975cb9567c5ddfde286
3
+ metadata.gz: 2e2b4677a03b2103fa194b40ebb76de6d6a3e1f73f8fdba966fb3933746d7be4
4
+ data.tar.gz: e8e4d31945bfd34d06c080aad8fa06a441f2d4f2c9818bd7ec094815676d97ea
5
5
  SHA512:
6
- metadata.gz: 74bf842cb8d67ab5fd58255a9d6387ad119ffe987d2f772698c2363863379f8acd378f58a746bd3070291e5a1a16be4f97fd8531cf04ef7aefa11d82b38a6487
7
- data.tar.gz: 63788204c264bc77dcaaece2136b8c3306defb614a6f807a5c5976b39551a296ff38805a19c50b4d26c1e00a0a38a4da552ac4c699e9957127573f4827158377
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.27
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.27.gem
27
+ gem install ./ultracart_api-3.11.28.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.11.27.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.27'
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,7 @@ 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 |
1592
1595
  | 3.11.27 | 11/06/2025 | conversation ai knowledge base changes |
1593
1596
  | 3.11.26 | 10/20/2025 | conversation api bug fixes |
1594
1597
  | 3.11.25 | 10/20/2025 | conversation api bug fix for bad url on agent profile kb upload |
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.
@@ -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
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.11.27'
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.27
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-11-06 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