ultracart_api 3.10.226 → 3.11.0

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: de08dc671d47252566afc3a7bc0d6371383602471441cde1bc3abd938f097b53
4
- data.tar.gz: 149f85cd2eae7a085a7ad420adaa41e3ac6ad050eec35395e1c8cb7609b1a7d2
3
+ metadata.gz: 725ed0b206f1917d80a865a5dc8dc8e6e790a95c5828bdf455db4bdc01404b6f
4
+ data.tar.gz: 0ef425c465404557555727415f0996daf3dc534662b08b92ae46b9631bb5aa5c
5
5
  SHA512:
6
- metadata.gz: 58d2827250a99d7215c04340d3fa5963a10e544c5e00cd47ef2f85d286ca0356fd1349d980cf0be77b7a8710d6721ee19932193e9740e6a53d4b89084421340c
7
- data.tar.gz: e48f74e1345dd0a4ac021c35cd3a7b8dcaf70dbdbc57cfff5bc5b6f21efebd0c88817a0b5d388bf1d4e1b7189c94034634839be656540fb2a1c783601388029e
6
+ metadata.gz: 6c17bbe56bc91e12b742a6a17de7688e40d9e9d5ab7463c0a70de7eed4280a3c7389127f0b3de3e4bbac19dd466b79114d5f29537f64209673cae7eb87a56378
7
+ data.tar.gz: 80188f20da8972a8da1c8e2876b4ba1f936687fac228c69615cd303a66daf82e97a99da792732a1a419ec2dc08065083f2d77ba5646c0a68ac7cb0d8070abcbf
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.10.226
10
+ - Package version: 3.11.0
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
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.10.226.gem
27
+ gem install ./ultracart_api-3.11.0.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.226.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.11.0.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.10.226'
35
+ gem 'ultracart_api', '~> 3.11.0'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -297,6 +297,7 @@ Class | Method | HTTP request | Description
297
297
  *UltracartClient::ItemApi* | [**get_digital_item**](docs/ItemApi.md#get_digital_item) | **GET** /item/digital_library/{digital_item_oid} | Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
298
298
  *UltracartClient::ItemApi* | [**get_digital_items**](docs/ItemApi.md#get_digital_items) | **GET** /item/digital_library | Retrieve digital items from the digital library which are digital files that may be attached to normal items
299
299
  *UltracartClient::ItemApi* | [**get_digital_items_by_external_id**](docs/ItemApi.md#get_digital_items_by_external_id) | **GET** /item/digital_library/by_external/{external_id} | Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id
300
+ *UltracartClient::ItemApi* | [**get_inventory_snapshot**](docs/ItemApi.md#get_inventory_snapshot) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
300
301
  *UltracartClient::ItemApi* | [**get_item**](docs/ItemApi.md#get_item) | **GET** /item/items/{merchant_item_oid} | Retrieve an item
301
302
  *UltracartClient::ItemApi* | [**get_item_by_merchant_item_id**](docs/ItemApi.md#get_item_by_merchant_item_id) | **GET** /item/items/merchant_item_id/{merchant_item_id} | Retrieve an item by item id
302
303
  *UltracartClient::ItemApi* | [**get_items**](docs/ItemApi.md#get_items) | **GET** /item/items | Retrieve items
@@ -308,7 +309,6 @@ Class | Method | HTTP request | Description
308
309
  *UltracartClient::ItemApi* | [**insert_item**](docs/ItemApi.md#insert_item) | **POST** /item/items | Create an item
309
310
  *UltracartClient::ItemApi* | [**insert_review**](docs/ItemApi.md#insert_review) | **POST** /item/items/{merchant_item_oid}/reviews | Insert a review
310
311
  *UltracartClient::ItemApi* | [**insert_update_item_content_attribute**](docs/ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute
311
- *UltracartClient::ItemApi* | [**rest_item_inventory_snapshot_response**](docs/ItemApi.md#rest_item_inventory_snapshot_response) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
312
312
  *UltracartClient::ItemApi* | [**update_digital_item**](docs/ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library
313
313
  *UltracartClient::ItemApi* | [**update_item**](docs/ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item
314
314
  *UltracartClient::ItemApi* | [**update_items**](docs/ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items
@@ -1238,6 +1238,7 @@ Class | Method | HTTP request | Description
1238
1238
  - [UltracartClient::OrderPaymentECheck](docs/OrderPaymentECheck.md)
1239
1239
  - [UltracartClient::OrderPaymentHealthBenefitCard](docs/OrderPaymentHealthBenefitCard.md)
1240
1240
  - [UltracartClient::OrderPaymentInsurance](docs/OrderPaymentInsurance.md)
1241
+ - [UltracartClient::OrderPaymentPayPal](docs/OrderPaymentPayPal.md)
1241
1242
  - [UltracartClient::OrderPaymentPurchaseOrder](docs/OrderPaymentPurchaseOrder.md)
1242
1243
  - [UltracartClient::OrderPaymentTransaction](docs/OrderPaymentTransaction.md)
1243
1244
  - [UltracartClient::OrderPaymentTransactionDetail](docs/OrderPaymentTransactionDetail.md)
@@ -1516,6 +1517,9 @@ Not every change is committed to every SDK.
1516
1517
 
1517
1518
  | Version | Date | Comments |
1518
1519
  | --: | :-: | --- |
1520
+ | 3.11.0 | 02/21/2025 | ItemApi.getInventorySnapshot had bad nickname causing bad sdk method name |
1521
+ | 3.10.228 | 02/20/2025 | automation fix |
1522
+ | 3.10.227 | 02/20/2025 | no change, revving sdk to troubleshoot java deployment automation |
1519
1523
  | 3.10.226 | 02/20/2025 | no change, revving sdk to troubleshoot java deployment automation |
1520
1524
  | 3.10.225 | 02/18/2025 | small bug fixes for incorrect return types on several methods |
1521
1525
  | 3.10.224 | 02/06/2025 | added storefront_host_name to channel partner order object |
data/docs/ItemApi.md CHANGED
@@ -10,6 +10,7 @@ Method | HTTP request | Description
10
10
  [**get_digital_item**](ItemApi.md#get_digital_item) | **GET** /item/digital_library/{digital_item_oid} | Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
11
11
  [**get_digital_items**](ItemApi.md#get_digital_items) | **GET** /item/digital_library | Retrieve digital items from the digital library which are digital files that may be attached to normal items
12
12
  [**get_digital_items_by_external_id**](ItemApi.md#get_digital_items_by_external_id) | **GET** /item/digital_library/by_external/{external_id} | Retrieves digital items from the digital library (which are digital files that may be attached to normal items) that having a matching external id
13
+ [**get_inventory_snapshot**](ItemApi.md#get_inventory_snapshot) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
13
14
  [**get_item**](ItemApi.md#get_item) | **GET** /item/items/{merchant_item_oid} | Retrieve an item
14
15
  [**get_item_by_merchant_item_id**](ItemApi.md#get_item_by_merchant_item_id) | **GET** /item/items/merchant_item_id/{merchant_item_id} | Retrieve an item by item id
15
16
  [**get_items**](ItemApi.md#get_items) | **GET** /item/items | Retrieve items
@@ -21,7 +22,6 @@ Method | HTTP request | Description
21
22
  [**insert_item**](ItemApi.md#insert_item) | **POST** /item/items | Create an item
22
23
  [**insert_review**](ItemApi.md#insert_review) | **POST** /item/items/{merchant_item_oid}/reviews | Insert a review
23
24
  [**insert_update_item_content_attribute**](ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute
24
- [**rest_item_inventory_snapshot_response**](ItemApi.md#rest_item_inventory_snapshot_response) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
25
25
  [**update_digital_item**](ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library
26
26
  [**update_item**](ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item
27
27
  [**update_items**](ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items
@@ -340,6 +340,51 @@ Name | Type | Description | Notes
340
340
 
341
341
 
342
342
 
343
+ # **get_inventory_snapshot**
344
+ > ItemInventorySnapshotResponse get_inventory_snapshot
345
+
346
+ Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
347
+
348
+ Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
349
+
350
+ ### Example
351
+ ```ruby
352
+ # load the gem
353
+ require 'ultracart_api'
354
+
355
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
356
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
357
+ api_instance = UltracartClient::ItemApi.new_using_api_key(simple_key, false, false)
358
+
359
+
360
+
361
+ begin
362
+ #Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
363
+ result = api_instance.get_inventory_snapshot
364
+ p result
365
+ rescue UltracartClient::ApiError => e
366
+ puts "Exception when calling ItemApi->get_inventory_snapshot: #{e}"
367
+ end
368
+ ```
369
+
370
+ ### Parameters
371
+ This endpoint does not need any parameter.
372
+
373
+ ### Return type
374
+
375
+ [**ItemInventorySnapshotResponse**](ItemInventorySnapshotResponse.md)
376
+
377
+ ### Authorization
378
+
379
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
380
+
381
+ ### HTTP request headers
382
+
383
+ - **Content-Type**: application/json
384
+ - **Accept**: application/json
385
+
386
+
387
+
343
388
  # **get_item**
344
389
  > ItemResponse get_item(merchant_item_oid, opts)
345
390
 
@@ -943,51 +988,6 @@ nil (empty response body)
943
988
 
944
989
 
945
990
 
946
- # **rest_item_inventory_snapshot_response**
947
- > ItemInventorySnapshotResponse rest_item_inventory_snapshot_response
948
-
949
- Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
950
-
951
- Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
952
-
953
- ### Example
954
- ```ruby
955
- # load the gem
956
- require 'ultracart_api'
957
-
958
- # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
959
- simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
960
- api_instance = UltracartClient::ItemApi.new_using_api_key(simple_key, false, false)
961
-
962
-
963
-
964
- begin
965
- #Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
966
- result = api_instance.rest_item_inventory_snapshot_response
967
- p result
968
- rescue UltracartClient::ApiError => e
969
- puts "Exception when calling ItemApi->rest_item_inventory_snapshot_response: #{e}"
970
- end
971
- ```
972
-
973
- ### Parameters
974
- This endpoint does not need any parameter.
975
-
976
- ### Return type
977
-
978
- [**ItemInventorySnapshotResponse**](ItemInventorySnapshotResponse.md)
979
-
980
- ### Authorization
981
-
982
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
983
-
984
- ### HTTP request headers
985
-
986
- - **Content-Type**: application/json
987
- - **Accept**: application/json
988
-
989
-
990
-
991
991
  # **update_digital_item**
992
992
  > ItemDigitalItemResponse update_digital_item(digital_item_oid, digital_item)
993
993
 
data/docs/OrderPayment.md CHANGED
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
14
14
  **payment_method_accounting_code** | **String** | Payment method QuickBooks code | [optional]
15
15
  **payment_method_deposit_to_account** | **String** | Payment method QuickBooks deposit account | [optional]
16
16
  **payment_status** | **String** | Payment status | [optional]
17
+ **paypal** | [**OrderPaymentPayPal**](OrderPaymentPayPal.md) | | [optional]
17
18
  **purchase_order** | [**OrderPaymentPurchaseOrder**](OrderPaymentPurchaseOrder.md) | | [optional]
18
19
  **rotating_transaction_gateway_code** | **String** | Rotating transaction gateway code used to process this order | [optional]
19
20
  **surcharge** | [**Currency**](Currency.md) | | [optional]
@@ -0,0 +1,9 @@
1
+ # UltracartClient::OrderPaymentPayPal
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **customer_id** | **String** | PayPal Customer ID | [optional]
7
+ **vault_id** | **String** | PayPal Vault ID | [optional]
8
+
9
+
@@ -377,6 +377,55 @@ module UltracartClient
377
377
  end
378
378
  return data, status_code, headers
379
379
  end
380
+ # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
381
+ # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
382
+ # @param [Hash] opts the optional parameters
383
+ # @return [ItemInventorySnapshotResponse]
384
+ def get_inventory_snapshot(opts = {})
385
+ data, _status_code, _headers = get_inventory_snapshot_with_http_info(opts)
386
+ data
387
+ end
388
+
389
+ # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
390
+ # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
391
+ # @param [Hash] opts the optional parameters
392
+ # @return [Array<(ItemInventorySnapshotResponse, Fixnum, Hash)>] ItemInventorySnapshotResponse data, response status code and response headers
393
+ def get_inventory_snapshot_with_http_info(opts = {})
394
+ if @api_client.config.debugging
395
+ @api_client.config.logger.debug 'Calling API: ItemApi.get_inventory_snapshot ...'
396
+ end
397
+ # resource path
398
+ local_var_path = '/item/items/inventory_snapshot'
399
+
400
+ # query parameters
401
+ query_params = {}
402
+
403
+ # header parameters
404
+ header_params = {}
405
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
406
+ # HTTP header 'Accept' (if needed)
407
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
408
+ # HTTP header 'Content-Type'
409
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
410
+
411
+ # form parameters
412
+ form_params = {}
413
+
414
+ # http body (model)
415
+ post_body = nil
416
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
417
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
418
+ :header_params => header_params,
419
+ :query_params => query_params,
420
+ :form_params => form_params,
421
+ :body => post_body,
422
+ :auth_names => auth_names,
423
+ :return_type => 'ItemInventorySnapshotResponse')
424
+ if @api_client.config.debugging
425
+ @api_client.config.logger.debug "API called: ItemApi#get_inventory_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
426
+ end
427
+ return data, status_code, headers
428
+ end
380
429
  # Retrieve an item
381
430
  # Retrieves a single item using the specified item oid.
382
431
  # @param merchant_item_oid The item oid to retrieve.
@@ -1044,55 +1093,6 @@ module UltracartClient
1044
1093
  end
1045
1094
  return data, status_code, headers
1046
1095
  end
1047
- # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
1048
- # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
1049
- # @param [Hash] opts the optional parameters
1050
- # @return [ItemInventorySnapshotResponse]
1051
- def rest_item_inventory_snapshot_response(opts = {})
1052
- data, _status_code, _headers = rest_item_inventory_snapshot_response_with_http_info(opts)
1053
- data
1054
- end
1055
-
1056
- # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
1057
- # Retrieve a list of item inventories. This method may be called once every 15 minutes. More than that will result in a 429 response.
1058
- # @param [Hash] opts the optional parameters
1059
- # @return [Array<(ItemInventorySnapshotResponse, Fixnum, Hash)>] ItemInventorySnapshotResponse data, response status code and response headers
1060
- def rest_item_inventory_snapshot_response_with_http_info(opts = {})
1061
- if @api_client.config.debugging
1062
- @api_client.config.logger.debug 'Calling API: ItemApi.rest_item_inventory_snapshot_response ...'
1063
- end
1064
- # resource path
1065
- local_var_path = '/item/items/inventory_snapshot'
1066
-
1067
- # query parameters
1068
- query_params = {}
1069
-
1070
- # header parameters
1071
- header_params = {}
1072
- header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1073
- # HTTP header 'Accept' (if needed)
1074
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1075
- # HTTP header 'Content-Type'
1076
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1077
-
1078
- # form parameters
1079
- form_params = {}
1080
-
1081
- # http body (model)
1082
- post_body = nil
1083
- auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
1084
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1085
- :header_params => header_params,
1086
- :query_params => query_params,
1087
- :form_params => form_params,
1088
- :body => post_body,
1089
- :auth_names => auth_names,
1090
- :return_type => 'ItemInventorySnapshotResponse')
1091
- if @api_client.config.debugging
1092
- @api_client.config.logger.debug "API called: ItemApi#rest_item_inventory_snapshot_response\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1093
- end
1094
- return data, status_code, headers
1095
- end
1096
1096
  # Updates a file within the digital library
1097
1097
  # Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
1098
1098
  # @param digital_item_oid The digital item oid to update.
@@ -42,6 +42,8 @@ module UltracartClient
42
42
  # Payment status
43
43
  attr_accessor :payment_status
44
44
 
45
+ attr_accessor :paypal
46
+
45
47
  attr_accessor :purchase_order
46
48
 
47
49
  # Rotating transaction gateway code used to process this order
@@ -100,6 +102,7 @@ module UltracartClient
100
102
  :'payment_method_accounting_code' => :'payment_method_accounting_code',
101
103
  :'payment_method_deposit_to_account' => :'payment_method_deposit_to_account',
102
104
  :'payment_status' => :'payment_status',
105
+ :'paypal' => :'paypal',
103
106
  :'purchase_order' => :'purchase_order',
104
107
  :'rotating_transaction_gateway_code' => :'rotating_transaction_gateway_code',
105
108
  :'surcharge' => :'surcharge',
@@ -125,6 +128,7 @@ module UltracartClient
125
128
  :'payment_method_accounting_code' => :'String',
126
129
  :'payment_method_deposit_to_account' => :'String',
127
130
  :'payment_status' => :'String',
131
+ :'paypal' => :'OrderPaymentPayPal',
128
132
  :'purchase_order' => :'OrderPaymentPurchaseOrder',
129
133
  :'rotating_transaction_gateway_code' => :'String',
130
134
  :'surcharge' => :'Currency',
@@ -188,6 +192,10 @@ module UltracartClient
188
192
  self.payment_status = attributes[:'payment_status']
189
193
  end
190
194
 
195
+ if attributes.has_key?(:'paypal')
196
+ self.paypal = attributes[:'paypal']
197
+ end
198
+
191
199
  if attributes.has_key?(:'purchase_order')
192
200
  self.purchase_order = attributes[:'purchase_order']
193
201
  end
@@ -276,6 +284,7 @@ module UltracartClient
276
284
  payment_method_accounting_code == o.payment_method_accounting_code &&
277
285
  payment_method_deposit_to_account == o.payment_method_deposit_to_account &&
278
286
  payment_status == o.payment_status &&
287
+ paypal == o.paypal &&
279
288
  purchase_order == o.purchase_order &&
280
289
  rotating_transaction_gateway_code == o.rotating_transaction_gateway_code &&
281
290
  surcharge == o.surcharge &&
@@ -295,7 +304,7 @@ module UltracartClient
295
304
  # Calculates hash code according to all attributes.
296
305
  # @return [Fixnum] Hash code
297
306
  def hash
298
- [check, credit_card, echeck, health_benefit_card, hold_for_fraud_review, insurance, payment_dts, payment_method, payment_method_accounting_code, payment_method_deposit_to_account, payment_status, purchase_order, rotating_transaction_gateway_code, surcharge, surcharge_accounting_code, surcharge_transaction_fee, surcharge_transaction_percentage, test_order, transactions].hash
307
+ [check, credit_card, echeck, health_benefit_card, hold_for_fraud_review, insurance, payment_dts, payment_method, payment_method_accounting_code, payment_method_deposit_to_account, payment_status, paypal, purchase_order, rotating_transaction_gateway_code, surcharge, surcharge_accounting_code, surcharge_transaction_fee, surcharge_transaction_percentage, test_order, transactions].hash
299
308
  end
300
309
 
301
310
  # Builds the object from hash
@@ -0,0 +1,195 @@
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 OrderPaymentPayPal
17
+ # PayPal Customer ID
18
+ attr_accessor :customer_id
19
+
20
+ # PayPal Vault ID
21
+ attr_accessor :vault_id
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'customer_id' => :'customer_id',
27
+ :'vault_id' => :'vault_id'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'customer_id' => :'String',
35
+ :'vault_id' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'customer_id')
48
+ self.customer_id = attributes[:'customer_id']
49
+ end
50
+
51
+ if attributes.has_key?(:'vault_id')
52
+ self.vault_id = attributes[:'vault_id']
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ invalid_properties
61
+ end
62
+
63
+ # Check to see if the all the properties in the model are valid
64
+ # @return true if the model is valid
65
+ def valid?
66
+ true
67
+ end
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] Object to be compared
71
+ def ==(o)
72
+ return true if self.equal?(o)
73
+ self.class == o.class &&
74
+ customer_id == o.customer_id &&
75
+ vault_id == o.vault_id
76
+ end
77
+
78
+ # @see the `==` method
79
+ # @param [Object] Object to be compared
80
+ def eql?(o)
81
+ self == o
82
+ end
83
+
84
+ # Calculates hash code according to all attributes.
85
+ # @return [Fixnum] Hash code
86
+ def hash
87
+ [customer_id, vault_id].hash
88
+ end
89
+
90
+ # Builds the object from hash
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ # @return [Object] Returns the model itself
93
+ def build_from_hash(attributes)
94
+ return nil unless attributes.is_a?(Hash)
95
+ self.class.swagger_types.each_pair do |key, type|
96
+ if type =~ /\AArray<(.*)>/i
97
+ # check to ensure the input is an array given that the attribute
98
+ # is documented as an array but the input is not
99
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
100
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
101
+ end
102
+ elsif !attributes[self.class.attribute_map[key]].nil?
103
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
104
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
105
+ end
106
+
107
+ self
108
+ end
109
+
110
+ # Deserializes the data based on type
111
+ # @param string type Data type
112
+ # @param string value Value to be deserialized
113
+ # @return [Object] Deserialized data
114
+ def _deserialize(type, value)
115
+ case type.to_sym
116
+ when :DateTime
117
+ DateTime.parse(value)
118
+ when :Date
119
+ Date.parse(value)
120
+ when :String
121
+ value.to_s
122
+ when :Integer
123
+ value.to_i
124
+ when :Float
125
+ value.to_f
126
+ when :BOOLEAN
127
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
128
+ true
129
+ else
130
+ false
131
+ end
132
+ when :Object
133
+ # generic object (usually a Hash), return directly
134
+ value
135
+ when /\AArray<(?<inner_type>.+)>\z/
136
+ inner_type = Regexp.last_match[:inner_type]
137
+ value.map { |v| _deserialize(inner_type, v) }
138
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
139
+ k_type = Regexp.last_match[:k_type]
140
+ v_type = Regexp.last_match[:v_type]
141
+ {}.tap do |hash|
142
+ value.each do |k, v|
143
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
144
+ end
145
+ end
146
+ else # model
147
+ temp_model = UltracartClient.const_get(type).new
148
+ temp_model.build_from_hash(value)
149
+ end
150
+ end
151
+
152
+ # Returns the string representation of the object
153
+ # @return [String] String presentation of the object
154
+ def to_s
155
+ to_hash.to_s
156
+ end
157
+
158
+ # to_body is an alias to to_hash (backward compatibility)
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_body
161
+ to_hash
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ next if value.nil?
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ # Outputs non-array value in the form of hash
177
+ # For object, use to_hash. Otherwise, just return the value
178
+ # @param [Object] value Any valid value
179
+ # @return [Hash] Returns the value in the form of hash
180
+ def _to_hash(value)
181
+ if value.is_a?(Array)
182
+ value.compact.map { |v| _to_hash(v) }
183
+ elsif value.is_a?(Hash)
184
+ {}.tap do |hash|
185
+ value.each { |k, v| hash[k] = _to_hash(v) }
186
+ end
187
+ elsif value.respond_to? :to_hash
188
+ value.to_hash
189
+ else
190
+ value
191
+ end
192
+ end
193
+
194
+ end
195
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.226'
14
+ VERSION = '3.11.0'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -667,6 +667,7 @@ require 'ultracart_api/models/order_payment_credit_card_dual_vaulted_property'
667
667
  require 'ultracart_api/models/order_payment_e_check'
668
668
  require 'ultracart_api/models/order_payment_health_benefit_card'
669
669
  require 'ultracart_api/models/order_payment_insurance'
670
+ require 'ultracart_api/models/order_payment_pay_pal'
670
671
  require 'ultracart_api/models/order_payment_purchase_order'
671
672
  require 'ultracart_api/models/order_payment_transaction'
672
673
  require 'ultracart_api/models/order_payment_transaction_detail'
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.10.226
4
+ version: 3.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-20 00:00:00.000000000 Z
11
+ date: 2025-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -886,6 +886,7 @@ files:
886
886
  - docs/OrderPaymentECheck.md
887
887
  - docs/OrderPaymentHealthBenefitCard.md
888
888
  - docs/OrderPaymentInsurance.md
889
+ - docs/OrderPaymentPayPal.md
889
890
  - docs/OrderPaymentPurchaseOrder.md
890
891
  - docs/OrderPaymentTransaction.md
891
892
  - docs/OrderPaymentTransactionDetail.md
@@ -1774,6 +1775,7 @@ files:
1774
1775
  - lib/ultracart_api/models/order_payment_e_check.rb
1775
1776
  - lib/ultracart_api/models/order_payment_health_benefit_card.rb
1776
1777
  - lib/ultracart_api/models/order_payment_insurance.rb
1778
+ - lib/ultracart_api/models/order_payment_pay_pal.rb
1777
1779
  - lib/ultracart_api/models/order_payment_purchase_order.rb
1778
1780
  - lib/ultracart_api/models/order_payment_transaction.rb
1779
1781
  - lib/ultracart_api/models/order_payment_transaction_detail.rb