ultracart_api 3.11.4 → 3.11.6

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: '0128f0e1e8a52d214a55e7669f94758183456690d6a099d365cbc3be3e36891a'
4
- data.tar.gz: 184b12d5264111c222a000389dc6802011ac0a8f51a6318eb0740062b1ba7dab
3
+ metadata.gz: d4abdc7e5b093e8a1c637244f5dce39a273739cd77ce2a53f986745275cac407
4
+ data.tar.gz: ba2bdb531687551152f5d84f2c0a288ab9aab1cb1e1b9df263182530285472d4
5
5
  SHA512:
6
- metadata.gz: 9ea1a2403109802b7f6c632c6ddfbeba2c8f8682437f16bdbd78945429bf23347f560c3bd1b7b54fa7d923b7571b538f8a827a0cce07e043f997a0c14f4101a4
7
- data.tar.gz: 95087a8d99a51ffb8550d2a48615bac059f51c3b74ca524c7c88e286ff4e3dfaee0021edbd937c75e3e1935653336fb96163feeee0182a6e210995f95f47df48
6
+ metadata.gz: ac5fc4ed40a4d1b383bc372e1d25e428fc7406f3bf524da2a008ee7ba42f8af32934057c4109938fc0ee9803937c2f19d6c6d893a564a168964d15f35eb98efd
7
+ data.tar.gz: f8537f7bc0d77602d8cf12867f21c4155603bf6d32f221a9b608962b69d234147939dd0da2858e9cc013f160d1034ad290ddea7220b8deca3c04a06462d7cebd
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.4
10
+ - Package version: 3.11.6
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.4.gem
27
+ gem install ./ultracart_api-3.11.6.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.11.4.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.11.6.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.4'
35
+ gem 'ultracart_api', '~> 3.11.6'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -338,6 +338,7 @@ Class | Method | HTTP request | Description
338
338
  *UltracartClient::OrderApi* | [**is_refundable_order**](docs/OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
339
339
  *UltracartClient::OrderApi* | [**process_payment**](docs/OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
340
340
  *UltracartClient::OrderApi* | [**refund_order**](docs/OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
341
+ *UltracartClient::OrderApi* | [**refund_order_completely**](docs/OrderApi.md#refund_order_completely) | **PUT** /order/orders/{order_id}/refund_completely | Refund an order completely
341
342
  *UltracartClient::OrderApi* | [**replacement**](docs/OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
342
343
  *UltracartClient::OrderApi* | [**resend_receipt**](docs/OrderApi.md#resend_receipt) | **POST** /order/orders/{order_id}/resend_receipt | Resend receipt
343
344
  *UltracartClient::OrderApi* | [**resend_shipment_confirmation**](docs/OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation
@@ -700,6 +701,7 @@ Class | Method | HTTP request | Description
700
701
  - [UltracartClient::ChannelPartnerOrder](docs/ChannelPartnerOrder.md)
701
702
  - [UltracartClient::ChannelPartnerOrderItem](docs/ChannelPartnerOrderItem.md)
702
703
  - [UltracartClient::ChannelPartnerOrderItemOption](docs/ChannelPartnerOrderItemOption.md)
704
+ - [UltracartClient::ChannelPartnerOrderItemProperty](docs/ChannelPartnerOrderItemProperty.md)
703
705
  - [UltracartClient::ChannelPartnerOrderTransaction](docs/ChannelPartnerOrderTransaction.md)
704
706
  - [UltracartClient::ChannelPartnerOrderTransactionDetail](docs/ChannelPartnerOrderTransactionDetail.md)
705
707
  - [UltracartClient::ChannelPartnerShipToPreference](docs/ChannelPartnerShipToPreference.md)
@@ -1518,6 +1520,8 @@ Not every change is committed to every SDK.
1518
1520
 
1519
1521
  | Version | Date | Comments |
1520
1522
  | --: | :-: | --- |
1523
+ | 3.11.6 | 04/16/2025 | added channel partner order item properties |
1524
+ | 3.11.5 | 03/28/2025 | added paypal fastlane constants for payments |
1521
1525
  | 3.11.4 | 03/07/2025 | updated github readme.md |
1522
1526
  | 3.11.3 | 03/07/2025 | updated github readme.md files |
1523
1527
  | 3.11.2 | 03/05/2025 | added ChannelPartnerOrder.use_prior_payment_information_from_order_id |
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
8
8
  **auto_order_schedule** | **String** | The frequency schedule for this item if this item is part of an auto (recurring) order | [optional]
9
9
  **merchant_item_id** | **String** | Item ID | [optional]
10
10
  **options** | [**Array<ChannelPartnerOrderItemOption>**](ChannelPartnerOrderItemOption.md) | Item options | [optional]
11
+ **properties** | [**Array<ChannelPartnerOrderItemProperty>**](ChannelPartnerOrderItemProperty.md) | Properties | [optional]
11
12
  **quantity** | **Float** | Quantity | [optional]
12
13
  **upsell** | **BOOLEAN** | True if this item was an upsell item. | [optional]
13
14
 
@@ -0,0 +1,11 @@
1
+ # UltracartClient::ChannelPartnerOrderItemProperty
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **display** | **BOOLEAN** | True if this property is displayed to the customer | [optional]
7
+ **expiration_dts** | **String** | The date/time that the property expires and is deleted | [optional]
8
+ **name** | **String** | Name | [optional]
9
+ **value** | **String** | Value | [optional]
10
+
11
+
data/docs/OrderApi.md CHANGED
@@ -25,6 +25,7 @@ Method | HTTP request | Description
25
25
  [**is_refundable_order**](OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
26
26
  [**process_payment**](OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
27
27
  [**refund_order**](OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
28
+ [**refund_order_completely**](OrderApi.md#refund_order_completely) | **PUT** /order/orders/{order_id}/refund_completely | Refund an order completely
28
29
  [**replacement**](OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
29
30
  [**resend_receipt**](OrderApi.md#resend_receipt) | **POST** /order/orders/{order_id}/resend_receipt | Resend receipt
30
31
  [**resend_shipment_confirmation**](OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation
@@ -1210,6 +1211,76 @@ Name | Type | Description | Notes
1210
1211
 
1211
1212
 
1212
1213
 
1214
+ # **refund_order_completely**
1215
+ > OrderResponse refund_order_completely(order_id, opts)
1216
+
1217
+ Refund an order completely
1218
+
1219
+ Perform a refund operation on an order and then update the order if successful.
1220
+
1221
+ ### Example
1222
+ ```ruby
1223
+ # load the gem
1224
+ require 'ultracart_api'
1225
+
1226
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
1227
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
1228
+ api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
1229
+
1230
+
1231
+ order_id = 'order_id_example' # String | The order id to refund.
1232
+
1233
+ opts = {
1234
+ reject_after_refund: false, # BOOLEAN | Reject order after refund
1235
+ skip_customer_notification: false, # BOOLEAN | Skip customer email notification
1236
+ auto_order_cancel: false, # BOOLEAN | Cancel associated auto orders
1237
+ manual_refund: false, # BOOLEAN | Consider a manual refund done externally
1238
+ reverse_affiliate_transactions: true, # BOOLEAN | Reverse affiliate transactions
1239
+ issue_store_credit: false, # BOOLEAN | Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
1240
+ auto_order_cancel_reason: 'auto_order_cancel_reason_example', # String | Reason for auto orders cancellation
1241
+ refund_reason: 'refund_reason_example', # String | Reason for refund
1242
+ reject_reason: 'reject_reason_example' # String | Reason for reject
1243
+ }
1244
+
1245
+ begin
1246
+ #Refund an order completely
1247
+ result = api_instance.refund_order_completely(order_id, opts)
1248
+ p result
1249
+ rescue UltracartClient::ApiError => e
1250
+ puts "Exception when calling OrderApi->refund_order_completely: #{e}"
1251
+ end
1252
+ ```
1253
+
1254
+ ### Parameters
1255
+
1256
+ Name | Type | Description | Notes
1257
+ ------------- | ------------- | ------------- | -------------
1258
+ **order_id** | **String**| The order id to refund. |
1259
+ **reject_after_refund** | **BOOLEAN**| Reject order after refund | [optional] [default to false]
1260
+ **skip_customer_notification** | **BOOLEAN**| Skip customer email notification | [optional] [default to false]
1261
+ **auto_order_cancel** | **BOOLEAN**| Cancel associated auto orders | [optional] [default to false]
1262
+ **manual_refund** | **BOOLEAN**| Consider a manual refund done externally | [optional] [default to false]
1263
+ **reverse_affiliate_transactions** | **BOOLEAN**| Reverse affiliate transactions | [optional] [default to true]
1264
+ **issue_store_credit** | **BOOLEAN**| Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account | [optional] [default to false]
1265
+ **auto_order_cancel_reason** | **String**| Reason for auto orders cancellation | [optional]
1266
+ **refund_reason** | **String**| Reason for refund | [optional]
1267
+ **reject_reason** | **String**| Reason for reject | [optional]
1268
+
1269
+ ### Return type
1270
+
1271
+ [**OrderResponse**](OrderResponse.md)
1272
+
1273
+ ### Authorization
1274
+
1275
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
1276
+
1277
+ ### HTTP request headers
1278
+
1279
+ - **Content-Type**: application/json; charset=UTF-8
1280
+ - **Accept**: application/json
1281
+
1282
+
1283
+
1213
1284
  # **replacement**
1214
1285
  > OrderReplacementResponse replacement(order_id, replacement)
1215
1286
 
@@ -1354,6 +1354,88 @@ module UltracartClient
1354
1354
  end
1355
1355
  return data, status_code, headers
1356
1356
  end
1357
+ # Refund an order completely
1358
+ # Perform a refund operation on an order and then update the order if successful.
1359
+ # @param order_id The order id to refund.
1360
+ # @param [Hash] opts the optional parameters
1361
+ # @option opts [BOOLEAN] :reject_after_refund Reject order after refund (default to false)
1362
+ # @option opts [BOOLEAN] :skip_customer_notification Skip customer email notification (default to false)
1363
+ # @option opts [BOOLEAN] :auto_order_cancel Cancel associated auto orders (default to false)
1364
+ # @option opts [BOOLEAN] :manual_refund Consider a manual refund done externally (default to false)
1365
+ # @option opts [BOOLEAN] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
1366
+ # @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)
1367
+ # @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
1368
+ # @option opts [String] :refund_reason Reason for refund
1369
+ # @option opts [String] :reject_reason Reason for reject
1370
+ # @return [OrderResponse]
1371
+ def refund_order_completely(order_id, opts = {})
1372
+ data, _status_code, _headers = refund_order_completely_with_http_info(order_id, opts)
1373
+ data
1374
+ end
1375
+
1376
+ # Refund an order completely
1377
+ # Perform a refund operation on an order and then update the order if successful.
1378
+ # @param order_id The order id to refund.
1379
+ # @param [Hash] opts the optional parameters
1380
+ # @option opts [BOOLEAN] :reject_after_refund Reject order after refund
1381
+ # @option opts [BOOLEAN] :skip_customer_notification Skip customer email notification
1382
+ # @option opts [BOOLEAN] :auto_order_cancel Cancel associated auto orders
1383
+ # @option opts [BOOLEAN] :manual_refund Consider a manual refund done externally
1384
+ # @option opts [BOOLEAN] :reverse_affiliate_transactions Reverse affiliate transactions
1385
+ # @option opts [BOOLEAN] :issue_store_credit Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
1386
+ # @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
1387
+ # @option opts [String] :refund_reason Reason for refund
1388
+ # @option opts [String] :reject_reason Reason for reject
1389
+ # @return [Array<(OrderResponse, Fixnum, Hash)>] OrderResponse data, response status code and response headers
1390
+ def refund_order_completely_with_http_info(order_id, opts = {})
1391
+ if @api_client.config.debugging
1392
+ @api_client.config.logger.debug 'Calling API: OrderApi.refund_order_completely ...'
1393
+ end
1394
+ # verify the required parameter 'order_id' is set
1395
+ if @api_client.config.client_side_validation && order_id.nil?
1396
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.refund_order_completely"
1397
+ end
1398
+ # resource path
1399
+ local_var_path = '/order/orders/{order_id}/refund_completely'.sub('{' + 'order_id' + '}', order_id.to_s)
1400
+
1401
+ # query parameters
1402
+ query_params = {}
1403
+ query_params[:'reject_after_refund'] = opts[:'reject_after_refund'] if !opts[:'reject_after_refund'].nil?
1404
+ query_params[:'skip_customer_notification'] = opts[:'skip_customer_notification'] if !opts[:'skip_customer_notification'].nil?
1405
+ query_params[:'auto_order_cancel'] = opts[:'auto_order_cancel'] if !opts[:'auto_order_cancel'].nil?
1406
+ query_params[:'manual_refund'] = opts[:'manual_refund'] if !opts[:'manual_refund'].nil?
1407
+ query_params[:'reverse_affiliate_transactions'] = opts[:'reverse_affiliate_transactions'] if !opts[:'reverse_affiliate_transactions'].nil?
1408
+ query_params[:'issue_store_credit'] = opts[:'issue_store_credit'] if !opts[:'issue_store_credit'].nil?
1409
+ query_params[:'auto_order_cancel_reason'] = opts[:'auto_order_cancel_reason'] if !opts[:'auto_order_cancel_reason'].nil?
1410
+ query_params[:'refund_reason'] = opts[:'refund_reason'] if !opts[:'refund_reason'].nil?
1411
+ query_params[:'reject_reason'] = opts[:'reject_reason'] if !opts[:'reject_reason'].nil?
1412
+
1413
+ # header parameters
1414
+ header_params = {}
1415
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1416
+ # HTTP header 'Accept' (if needed)
1417
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1418
+ # HTTP header 'Content-Type'
1419
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1420
+
1421
+ # form parameters
1422
+ form_params = {}
1423
+
1424
+ # http body (model)
1425
+ post_body = nil
1426
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
1427
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1428
+ :header_params => header_params,
1429
+ :query_params => query_params,
1430
+ :form_params => form_params,
1431
+ :body => post_body,
1432
+ :auth_names => auth_names,
1433
+ :return_type => 'OrderResponse')
1434
+ if @api_client.config.debugging
1435
+ @api_client.config.logger.debug "API called: OrderApi#refund_order_completely\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1436
+ end
1437
+ return data, status_code, headers
1438
+ end
1357
1439
  # Replacement order
1358
1440
  # Create a replacement order based upon a previous order
1359
1441
  # @param order_id The order id to generate a replacement for.
@@ -1084,7 +1084,7 @@ module UltracartClient
1084
1084
  return false if !@email.nil? && @email.to_s.length > 100
1085
1085
  return false if !@gift_email.nil? && @gift_email.to_s.length > 100
1086
1086
  return false if !@gift_message.nil? && @gift_message.to_s.length > 10000
1087
- payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Wire Transfer'])
1087
+ payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Wire Transfer', 'PayPal Fastlane'])
1088
1088
  return false unless payment_method_validator.valid?(@payment_method)
1089
1089
  return false if !@screen_branding_theme_code.nil? && @screen_branding_theme_code.to_s.length > 10
1090
1090
  return false if !@shipto_address1.nil? && @shipto_address1.to_s.length > 50
@@ -1356,7 +1356,7 @@ module UltracartClient
1356
1356
  # Custom attribute writer method checking allowed values (enum).
1357
1357
  # @param [Object] payment_method Object to be assigned
1358
1358
  def payment_method=(payment_method)
1359
- validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Wire Transfer'])
1359
+ validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Wire Transfer', 'PayPal Fastlane'])
1360
1360
  unless validator.valid?(payment_method)
1361
1361
  fail ArgumentError, 'invalid value for "payment_method", must be one of #{validator.allowable_values}.'
1362
1362
  end
@@ -29,6 +29,9 @@ module UltracartClient
29
29
  # Item options
30
30
  attr_accessor :options
31
31
 
32
+ # Properties
33
+ attr_accessor :properties
34
+
32
35
  # Quantity
33
36
  attr_accessor :quantity
34
37
 
@@ -65,6 +68,7 @@ module UltracartClient
65
68
  :'auto_order_schedule' => :'auto_order_schedule',
66
69
  :'merchant_item_id' => :'merchant_item_id',
67
70
  :'options' => :'options',
71
+ :'properties' => :'properties',
68
72
  :'quantity' => :'quantity',
69
73
  :'upsell' => :'upsell'
70
74
  }
@@ -78,6 +82,7 @@ module UltracartClient
78
82
  :'auto_order_schedule' => :'String',
79
83
  :'merchant_item_id' => :'String',
80
84
  :'options' => :'Array<ChannelPartnerOrderItemOption>',
85
+ :'properties' => :'Array<ChannelPartnerOrderItemProperty>',
81
86
  :'quantity' => :'Float',
82
87
  :'upsell' => :'BOOLEAN'
83
88
  }
@@ -113,6 +118,12 @@ module UltracartClient
113
118
  end
114
119
  end
115
120
 
121
+ if attributes.has_key?(:'properties')
122
+ if (value = attributes[:'properties']).is_a?(Array)
123
+ self.properties = value
124
+ end
125
+ end
126
+
116
127
  if attributes.has_key?(:'quantity')
117
128
  self.quantity = attributes[:'quantity']
118
129
  end
@@ -172,6 +183,7 @@ module UltracartClient
172
183
  auto_order_schedule == o.auto_order_schedule &&
173
184
  merchant_item_id == o.merchant_item_id &&
174
185
  options == o.options &&
186
+ properties == o.properties &&
175
187
  quantity == o.quantity &&
176
188
  upsell == o.upsell
177
189
  end
@@ -185,7 +197,7 @@ module UltracartClient
185
197
  # Calculates hash code according to all attributes.
186
198
  # @return [Fixnum] Hash code
187
199
  def hash
188
- [arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, merchant_item_id, options, quantity, upsell].hash
200
+ [arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, merchant_item_id, options, properties, quantity, upsell].hash
189
201
  end
190
202
 
191
203
  # Builds the object from hash
@@ -0,0 +1,245 @@
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 ChannelPartnerOrderItemProperty
17
+ # True if this property is displayed to the customer
18
+ attr_accessor :display
19
+
20
+ # The date/time that the property expires and is deleted
21
+ attr_accessor :expiration_dts
22
+
23
+ # Name
24
+ attr_accessor :name
25
+
26
+ # Value
27
+ attr_accessor :value
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'display' => :'display',
33
+ :'expiration_dts' => :'expiration_dts',
34
+ :'name' => :'name',
35
+ :'value' => :'value'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'display' => :'BOOLEAN',
43
+ :'expiration_dts' => :'String',
44
+ :'name' => :'String',
45
+ :'value' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'display')
58
+ self.display = attributes[:'display']
59
+ end
60
+
61
+ if attributes.has_key?(:'expiration_dts')
62
+ self.expiration_dts = attributes[:'expiration_dts']
63
+ end
64
+
65
+ if attributes.has_key?(:'name')
66
+ self.name = attributes[:'name']
67
+ end
68
+
69
+ if attributes.has_key?(:'value')
70
+ self.value = attributes[:'value']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ if !@name.nil? && @name.to_s.length > 100
79
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
80
+ end
81
+
82
+ if !@value.nil? && @value.to_s.length > 3800
83
+ invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 3800.')
84
+ end
85
+
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if !@name.nil? && @name.to_s.length > 100
93
+ return false if !@value.nil? && @value.to_s.length > 3800
94
+ true
95
+ end
96
+
97
+ # Custom attribute writer method with validation
98
+ # @param [Object] name Value to be assigned
99
+ def name=(name)
100
+ if !name.nil? && name.to_s.length > 100
101
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
102
+ end
103
+
104
+ @name = name
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] value Value to be assigned
109
+ def value=(value)
110
+ if !value.nil? && value.to_s.length > 3800
111
+ fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 3800.'
112
+ end
113
+
114
+ @value = value
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ display == o.display &&
123
+ expiration_dts == o.expiration_dts &&
124
+ name == o.name &&
125
+ value == o.value
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Fixnum] Hash code
136
+ def hash
137
+ [display, expiration_dts, name, value].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.swagger_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :BOOLEAN
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ temp_model = UltracartClient.const_get(type).new
198
+ temp_model.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ next if value.nil?
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+ 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', 'eBay', 'eCheck', 'Google Shopping', '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'])
244
+ payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eBay', 'eCheck', 'Google Shopping', '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'])
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', 'eBay', 'eCheck', 'Google Shopping', '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'])
254
+ validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eBay', 'eCheck', 'Google Shopping', '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'])
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
@@ -511,7 +511,7 @@ module UltracartClient
511
511
  return false if !@email.nil? && @email.to_s.length > 100
512
512
  return false if !@first_name.nil? && @first_name.to_s.length > 30
513
513
  return false if !@last_name.nil? && @last_name.to_s.length > 30
514
- payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Venmo', 'Apple Pay', ' Google Pay'])
514
+ payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Venmo', 'Apple Pay', ' Google Pay', 'PayPal Fastlane'])
515
515
  return false unless payment_method_validator.valid?(@payment_method)
516
516
  return false if !@phone.nil? && @phone.to_s.length > 25
517
517
  return false if !@postal_code.nil? && @postal_code.to_s.length > 20
@@ -606,7 +606,7 @@ module UltracartClient
606
606
  # Custom attribute writer method checking allowed values (enum).
607
607
  # @param [Object] payment_method Object to be assigned
608
608
  def payment_method=(payment_method)
609
- validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Venmo', 'Apple Pay', ' Google Pay'])
609
+ validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Venmo', 'Apple Pay', ' Google Pay', 'PayPal Fastlane'])
610
610
  unless validator.valid?(payment_method)
611
611
  fail ArgumentError, 'invalid value for "payment_method", must be one of #{validator.allowable_values}.'
612
612
  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.4'
14
+ VERSION = '3.11.6'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -128,6 +128,7 @@ require 'ultracart_api/models/channel_partner_import_response'
128
128
  require 'ultracart_api/models/channel_partner_order'
129
129
  require 'ultracart_api/models/channel_partner_order_item'
130
130
  require 'ultracart_api/models/channel_partner_order_item_option'
131
+ require 'ultracart_api/models/channel_partner_order_item_property'
131
132
  require 'ultracart_api/models/channel_partner_order_transaction'
132
133
  require 'ultracart_api/models/channel_partner_order_transaction_detail'
133
134
  require 'ultracart_api/models/channel_partner_ship_to_preference'
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.4
4
+ version: 3.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-07 00:00:00.000000000 Z
11
+ date: 2025-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -335,6 +335,7 @@ files:
335
335
  - docs/ChannelPartnerOrder.md
336
336
  - docs/ChannelPartnerOrderItem.md
337
337
  - docs/ChannelPartnerOrderItemOption.md
338
+ - docs/ChannelPartnerOrderItemProperty.md
338
339
  - docs/ChannelPartnerOrderTransaction.md
339
340
  - docs/ChannelPartnerOrderTransactionDetail.md
340
341
  - docs/ChannelPartnerShipToPreference.md
@@ -1236,6 +1237,7 @@ files:
1236
1237
  - lib/ultracart_api/models/channel_partner_order.rb
1237
1238
  - lib/ultracart_api/models/channel_partner_order_item.rb
1238
1239
  - lib/ultracart_api/models/channel_partner_order_item_option.rb
1240
+ - lib/ultracart_api/models/channel_partner_order_item_property.rb
1239
1241
  - lib/ultracart_api/models/channel_partner_order_transaction.rb
1240
1242
  - lib/ultracart_api/models/channel_partner_order_transaction_detail.rb
1241
1243
  - lib/ultracart_api/models/channel_partner_ship_to_preference.rb