ultracart_api 4.1.5 → 4.1.7
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 +4 -4
- data/README.md +6 -2
- data/docs/ChannelPartnerOrderItem.md +2 -0
- data/docs/ChannelPartnerOrderItemProperty.md +24 -0
- data/docs/ConversationAgentProfile.md +8 -0
- data/docs/OrderApi.md +92 -0
- data/lib/ultracart_api/api/order_api.rb +91 -0
- data/lib/ultracart_api/models/channel_partner_order_item.rb +13 -1
- data/lib/ultracart_api/models/channel_partner_order_item_property.rb +280 -0
- data/lib/ultracart_api/models/conversation_agent_profile.rb +41 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6f3a683613b1018628224e6efb16065b44d8ba2e77df9710d5c7ecb9e5f868b
|
4
|
+
data.tar.gz: 5f2ef29b9a7f718d8f7abf93cfd6c3203d809fe60632e2058ed5d40367853326
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b44381fc7babd188a4eff34734111fae121f5d074677dab3aa331b1552ed68f7c776bc96548ebe6d0c6b7fade559b0e4667fb72e9baac70efc7383fdf38bc071
|
7
|
+
data.tar.gz: 4f97b60e7794cf61f77dedc5b808a58b73e6bbc6f5777ef7a3f49f25c43ccfb2a8d77fb99002cdbbdf8cc05c9e2acff9df21624fcdfb355f7bbe307a2a054ffb
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 4.1.
|
10
|
+
- Package version: 4.1.7
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
- For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
13
13
|
|
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
|
16
16
|
gemfile:
|
17
17
|
|
18
18
|
```shell
|
19
|
-
gem 'ultracart_api', '4.1.
|
19
|
+
gem 'ultracart_api', '4.1.7'
|
20
20
|
```
|
21
21
|
|
22
22
|
install:
|
@@ -334,6 +334,7 @@ Class | Method | HTTP request | Description
|
|
334
334
|
*UltracartClient::OrderApi* | [**is_refundable_order**](docs/OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
|
335
335
|
*UltracartClient::OrderApi* | [**process_payment**](docs/OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
|
336
336
|
*UltracartClient::OrderApi* | [**refund_order**](docs/OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
|
337
|
+
*UltracartClient::OrderApi* | [**refund_order_completely**](docs/OrderApi.md#refund_order_completely) | **PUT** /order/orders/{order_id}/refund_completely | Refund an order completely
|
337
338
|
*UltracartClient::OrderApi* | [**replacement**](docs/OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
|
338
339
|
*UltracartClient::OrderApi* | [**resend_receipt**](docs/OrderApi.md#resend_receipt) | **POST** /order/orders/{order_id}/resend_receipt | Resend receipt
|
339
340
|
*UltracartClient::OrderApi* | [**resend_shipment_confirmation**](docs/OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation
|
@@ -696,6 +697,7 @@ Class | Method | HTTP request | Description
|
|
696
697
|
- [UltracartClient::ChannelPartnerOrder](docs/ChannelPartnerOrder.md)
|
697
698
|
- [UltracartClient::ChannelPartnerOrderItem](docs/ChannelPartnerOrderItem.md)
|
698
699
|
- [UltracartClient::ChannelPartnerOrderItemOption](docs/ChannelPartnerOrderItemOption.md)
|
700
|
+
- [UltracartClient::ChannelPartnerOrderItemProperty](docs/ChannelPartnerOrderItemProperty.md)
|
699
701
|
- [UltracartClient::ChannelPartnerOrderTransaction](docs/ChannelPartnerOrderTransaction.md)
|
700
702
|
- [UltracartClient::ChannelPartnerOrderTransactionDetail](docs/ChannelPartnerOrderTransactionDetail.md)
|
701
703
|
- [UltracartClient::ChannelPartnerShipToPreference](docs/ChannelPartnerShipToPreference.md)
|
@@ -1516,6 +1518,8 @@ Not every change is committed to every SDK.
|
|
1516
1518
|
|
1517
1519
|
| Version | Date | Comments |
|
1518
1520
|
| --: | :-: | --- |
|
1521
|
+
| 4.1.7 | 04/21/2025 | conversation agent additional fields |
|
1522
|
+
| 4.1.6 | 04/16/2025 | added channel partner order item properties |
|
1519
1523
|
| 4.1.5 | 03/28/2025 | added paypal fastlane constants for payments |
|
1520
1524
|
| 4.1.4 | 03/07/2025 | updated github readme.md |
|
1521
1525
|
| 4.1.3 | 03/07/2025 | updated github readme.md files |
|
@@ -9,6 +9,7 @@
|
|
9
9
|
| **auto_order_schedule** | **String** | The frequency schedule for this item if this item is part of an auto (recurring) order | [optional] |
|
10
10
|
| **merchant_item_id** | **String** | Item ID | [optional] |
|
11
11
|
| **options** | [**Array<ChannelPartnerOrderItemOption>**](ChannelPartnerOrderItemOption.md) | Item options | [optional] |
|
12
|
+
| **properties** | [**Array<ChannelPartnerOrderItemProperty>**](ChannelPartnerOrderItemProperty.md) | Properties | [optional] |
|
12
13
|
| **quantity** | **Float** | Quantity | [optional] |
|
13
14
|
| **upsell** | **Boolean** | True if this item was an upsell item. | [optional] |
|
14
15
|
|
@@ -23,6 +24,7 @@ instance = UltracartClient::ChannelPartnerOrderItem.new(
|
|
23
24
|
auto_order_schedule: null,
|
24
25
|
merchant_item_id: null,
|
25
26
|
options: null,
|
27
|
+
properties: null,
|
26
28
|
quantity: null,
|
27
29
|
upsell: null
|
28
30
|
)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# UltracartClient::ChannelPartnerOrderItemProperty
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **display** | **Boolean** | True if this property is displayed to the customer | [optional] |
|
8
|
+
| **expiration_dts** | **String** | The date/time that the property expires and is deleted | [optional] |
|
9
|
+
| **name** | **String** | Name | [optional] |
|
10
|
+
| **value** | **String** | Value | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'ultracart_api'
|
16
|
+
|
17
|
+
instance = UltracartClient::ChannelPartnerOrderItemProperty.new(
|
18
|
+
display: null,
|
19
|
+
expiration_dts: null,
|
20
|
+
name: null,
|
21
|
+
value: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -4,6 +4,10 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **ai** | **Boolean** | AI powered chat bot | [optional] |
|
8
|
+
| **ai_chat_instructions** | **String** | Additional instructions for this AI when handle web chats | [optional] |
|
9
|
+
| **ai_persona** | **String** | Persona of this AI agent | [optional] |
|
10
|
+
| **ai_sms_instructions** | **String** | Additional instructions for this AI when handle SMS messages | [optional] |
|
7
11
|
| **chat_limit** | **Integer** | The number of engagement chats that can be pushed on them at any given time. | [optional] |
|
8
12
|
| **default_language_iso_code** | **String** | The default language the agent is chatting in | [optional] |
|
9
13
|
| **default_status** | **String** | Default status when the agent loads conversations app. | [optional] |
|
@@ -18,6 +22,10 @@
|
|
18
22
|
require 'ultracart_api'
|
19
23
|
|
20
24
|
instance = UltracartClient::ConversationAgentProfile.new(
|
25
|
+
ai: null,
|
26
|
+
ai_chat_instructions: null,
|
27
|
+
ai_persona: null,
|
28
|
+
ai_sms_instructions: null,
|
21
29
|
chat_limit: null,
|
22
30
|
default_language_iso_code: null,
|
23
31
|
default_status: null,
|
data/docs/OrderApi.md
CHANGED
@@ -25,6 +25,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
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 |
|
@@ -1650,6 +1651,97 @@ end
|
|
1650
1651
|
- **Accept**: application/json
|
1651
1652
|
|
1652
1653
|
|
1654
|
+
## refund_order_completely
|
1655
|
+
|
1656
|
+
> <OrderResponse> refund_order_completely(order_id, opts)
|
1657
|
+
|
1658
|
+
Refund an order completely
|
1659
|
+
|
1660
|
+
Perform a refund operation on an order and then update the order if successful.
|
1661
|
+
|
1662
|
+
### Examples
|
1663
|
+
|
1664
|
+
```ruby
|
1665
|
+
require 'time'
|
1666
|
+
require 'ultracart_api'
|
1667
|
+
require 'json'
|
1668
|
+
require 'yaml'
|
1669
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
1670
|
+
|
1671
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
1672
|
+
# As such, this might not be the best way to use this object.
|
1673
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
1674
|
+
|
1675
|
+
api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
1676
|
+
order_id = 'order_id_example' # String | The order id to refund.
|
1677
|
+
opts = {
|
1678
|
+
reject_after_refund: true, # Boolean | Reject order after refund
|
1679
|
+
skip_customer_notification: true, # Boolean | Skip customer email notification
|
1680
|
+
auto_order_cancel: true, # Boolean | Cancel associated auto orders
|
1681
|
+
manual_refund: true, # Boolean | Consider a manual refund done externally
|
1682
|
+
reverse_affiliate_transactions: true, # Boolean | Reverse affiliate transactions
|
1683
|
+
issue_store_credit: true, # Boolean | Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
|
1684
|
+
auto_order_cancel_reason: 'auto_order_cancel_reason_example', # String | Reason for auto orders cancellation
|
1685
|
+
refund_reason: 'refund_reason_example', # String | Reason for refund
|
1686
|
+
reject_reason: 'reject_reason_example' # String | Reason for reject
|
1687
|
+
}
|
1688
|
+
|
1689
|
+
begin
|
1690
|
+
# Refund an order completely
|
1691
|
+
result = api_instance.refund_order_completely(order_id, opts)
|
1692
|
+
p result
|
1693
|
+
rescue UltracartClient::ApiError => e
|
1694
|
+
puts "Error when calling OrderApi->refund_order_completely: #{e}"
|
1695
|
+
end
|
1696
|
+
```
|
1697
|
+
|
1698
|
+
#### Using the refund_order_completely_with_http_info variant
|
1699
|
+
|
1700
|
+
This returns an Array which contains the response data, status code and headers.
|
1701
|
+
|
1702
|
+
> <Array(<OrderResponse>, Integer, Hash)> refund_order_completely_with_http_info(order_id, opts)
|
1703
|
+
|
1704
|
+
```ruby
|
1705
|
+
begin
|
1706
|
+
# Refund an order completely
|
1707
|
+
data, status_code, headers = api_instance.refund_order_completely_with_http_info(order_id, opts)
|
1708
|
+
p status_code # => 2xx
|
1709
|
+
p headers # => { ... }
|
1710
|
+
p data # => <OrderResponse>
|
1711
|
+
rescue UltracartClient::ApiError => e
|
1712
|
+
puts "Error when calling OrderApi->refund_order_completely_with_http_info: #{e}"
|
1713
|
+
end
|
1714
|
+
```
|
1715
|
+
|
1716
|
+
### Parameters
|
1717
|
+
|
1718
|
+
| Name | Type | Description | Notes |
|
1719
|
+
| ---- | ---- | ----------- | ----- |
|
1720
|
+
| **order_id** | **String** | The order id to refund. | |
|
1721
|
+
| **reject_after_refund** | **Boolean** | Reject order after refund | [optional][default to false] |
|
1722
|
+
| **skip_customer_notification** | **Boolean** | Skip customer email notification | [optional][default to false] |
|
1723
|
+
| **auto_order_cancel** | **Boolean** | Cancel associated auto orders | [optional][default to false] |
|
1724
|
+
| **manual_refund** | **Boolean** | Consider a manual refund done externally | [optional][default to false] |
|
1725
|
+
| **reverse_affiliate_transactions** | **Boolean** | Reverse affiliate transactions | [optional][default to true] |
|
1726
|
+
| **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] |
|
1727
|
+
| **auto_order_cancel_reason** | **String** | Reason for auto orders cancellation | [optional] |
|
1728
|
+
| **refund_reason** | **String** | Reason for refund | [optional] |
|
1729
|
+
| **reject_reason** | **String** | Reason for reject | [optional] |
|
1730
|
+
|
1731
|
+
### Return type
|
1732
|
+
|
1733
|
+
[**OrderResponse**](OrderResponse.md)
|
1734
|
+
|
1735
|
+
### Authorization
|
1736
|
+
|
1737
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1738
|
+
|
1739
|
+
### HTTP request headers
|
1740
|
+
|
1741
|
+
- **Content-Type**: Not defined
|
1742
|
+
- **Accept**: application/json
|
1743
|
+
|
1744
|
+
|
1653
1745
|
## replacement
|
1654
1746
|
|
1655
1747
|
> <OrderReplacementResponse> replacement(order_id, replacement)
|
@@ -1579,6 +1579,97 @@ module UltracartClient
|
|
1579
1579
|
return data, status_code, headers
|
1580
1580
|
end
|
1581
1581
|
|
1582
|
+
# Refund an order completely
|
1583
|
+
# Perform a refund operation on an order and then update the order if successful.
|
1584
|
+
# @param order_id [String] The order id to refund.
|
1585
|
+
# @param [Hash] opts the optional parameters
|
1586
|
+
# @option opts [Boolean] :reject_after_refund Reject order after refund (default to false)
|
1587
|
+
# @option opts [Boolean] :skip_customer_notification Skip customer email notification (default to false)
|
1588
|
+
# @option opts [Boolean] :auto_order_cancel Cancel associated auto orders (default to false)
|
1589
|
+
# @option opts [Boolean] :manual_refund Consider a manual refund done externally (default to false)
|
1590
|
+
# @option opts [Boolean] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
|
1591
|
+
# @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)
|
1592
|
+
# @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
|
1593
|
+
# @option opts [String] :refund_reason Reason for refund
|
1594
|
+
# @option opts [String] :reject_reason Reason for reject
|
1595
|
+
# @return [OrderResponse]
|
1596
|
+
def refund_order_completely(order_id, opts = {})
|
1597
|
+
data, _status_code, _headers = refund_order_completely_with_http_info(order_id, opts)
|
1598
|
+
data
|
1599
|
+
end
|
1600
|
+
|
1601
|
+
# Refund an order completely
|
1602
|
+
# Perform a refund operation on an order and then update the order if successful.
|
1603
|
+
# @param order_id [String] The order id to refund.
|
1604
|
+
# @param [Hash] opts the optional parameters
|
1605
|
+
# @option opts [Boolean] :reject_after_refund Reject order after refund (default to false)
|
1606
|
+
# @option opts [Boolean] :skip_customer_notification Skip customer email notification (default to false)
|
1607
|
+
# @option opts [Boolean] :auto_order_cancel Cancel associated auto orders (default to false)
|
1608
|
+
# @option opts [Boolean] :manual_refund Consider a manual refund done externally (default to false)
|
1609
|
+
# @option opts [Boolean] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
|
1610
|
+
# @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)
|
1611
|
+
# @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
|
1612
|
+
# @option opts [String] :refund_reason Reason for refund
|
1613
|
+
# @option opts [String] :reject_reason Reason for reject
|
1614
|
+
# @return [Array<(OrderResponse, Integer, Hash)>] OrderResponse data, response status code and response headers
|
1615
|
+
def refund_order_completely_with_http_info(order_id, opts = {})
|
1616
|
+
if @api_client.config.debugging
|
1617
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.refund_order_completely ...'
|
1618
|
+
end
|
1619
|
+
# verify the required parameter 'order_id' is set
|
1620
|
+
if @api_client.config.client_side_validation && order_id.nil?
|
1621
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.refund_order_completely"
|
1622
|
+
end
|
1623
|
+
# resource path
|
1624
|
+
local_var_path = '/order/orders/{order_id}/refund_completely'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
|
1625
|
+
|
1626
|
+
# query parameters
|
1627
|
+
query_params = opts[:query_params] || {}
|
1628
|
+
query_params[:'reject_after_refund'] = opts[:'reject_after_refund'] if !opts[:'reject_after_refund'].nil?
|
1629
|
+
query_params[:'skip_customer_notification'] = opts[:'skip_customer_notification'] if !opts[:'skip_customer_notification'].nil?
|
1630
|
+
query_params[:'auto_order_cancel'] = opts[:'auto_order_cancel'] if !opts[:'auto_order_cancel'].nil?
|
1631
|
+
query_params[:'manual_refund'] = opts[:'manual_refund'] if !opts[:'manual_refund'].nil?
|
1632
|
+
query_params[:'reverse_affiliate_transactions'] = opts[:'reverse_affiliate_transactions'] if !opts[:'reverse_affiliate_transactions'].nil?
|
1633
|
+
query_params[:'issue_store_credit'] = opts[:'issue_store_credit'] if !opts[:'issue_store_credit'].nil?
|
1634
|
+
query_params[:'auto_order_cancel_reason'] = opts[:'auto_order_cancel_reason'] if !opts[:'auto_order_cancel_reason'].nil?
|
1635
|
+
query_params[:'refund_reason'] = opts[:'refund_reason'] if !opts[:'refund_reason'].nil?
|
1636
|
+
query_params[:'reject_reason'] = opts[:'reject_reason'] if !opts[:'reject_reason'].nil?
|
1637
|
+
|
1638
|
+
# header parameters
|
1639
|
+
header_params = opts[:header_params] || {}
|
1640
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1641
|
+
# HTTP header 'Accept' (if needed)
|
1642
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1643
|
+
|
1644
|
+
# form parameters
|
1645
|
+
form_params = opts[:form_params] || {}
|
1646
|
+
|
1647
|
+
# http body (model)
|
1648
|
+
post_body = opts[:debug_body]
|
1649
|
+
|
1650
|
+
# return_type
|
1651
|
+
return_type = opts[:debug_return_type] || 'OrderResponse'
|
1652
|
+
|
1653
|
+
# auth_names
|
1654
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1655
|
+
|
1656
|
+
new_options = opts.merge(
|
1657
|
+
:operation => :"OrderApi.refund_order_completely",
|
1658
|
+
:header_params => header_params,
|
1659
|
+
:query_params => query_params,
|
1660
|
+
:form_params => form_params,
|
1661
|
+
:body => post_body,
|
1662
|
+
:auth_names => auth_names,
|
1663
|
+
:return_type => return_type
|
1664
|
+
)
|
1665
|
+
|
1666
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1667
|
+
if @api_client.config.debugging
|
1668
|
+
@api_client.config.logger.debug "API called: OrderApi#refund_order_completely\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1669
|
+
end
|
1670
|
+
return data, status_code, headers
|
1671
|
+
end
|
1672
|
+
|
1582
1673
|
# Replacement order
|
1583
1674
|
# Create a replacement order based upon a previous order
|
1584
1675
|
# @param order_id [String] The order id to generate a replacement for.
|
@@ -30,6 +30,9 @@ module UltracartClient
|
|
30
30
|
# Item options
|
31
31
|
attr_accessor :options
|
32
32
|
|
33
|
+
# Properties
|
34
|
+
attr_accessor :properties
|
35
|
+
|
33
36
|
# Quantity
|
34
37
|
attr_accessor :quantity
|
35
38
|
|
@@ -66,6 +69,7 @@ module UltracartClient
|
|
66
69
|
:'auto_order_schedule' => :'auto_order_schedule',
|
67
70
|
:'merchant_item_id' => :'merchant_item_id',
|
68
71
|
:'options' => :'options',
|
72
|
+
:'properties' => :'properties',
|
69
73
|
:'quantity' => :'quantity',
|
70
74
|
:'upsell' => :'upsell'
|
71
75
|
}
|
@@ -84,6 +88,7 @@ module UltracartClient
|
|
84
88
|
:'auto_order_schedule' => :'String',
|
85
89
|
:'merchant_item_id' => :'String',
|
86
90
|
:'options' => :'Array<ChannelPartnerOrderItemOption>',
|
91
|
+
:'properties' => :'Array<ChannelPartnerOrderItemProperty>',
|
87
92
|
:'quantity' => :'Float',
|
88
93
|
:'upsell' => :'Boolean'
|
89
94
|
}
|
@@ -132,6 +137,12 @@ module UltracartClient
|
|
132
137
|
end
|
133
138
|
end
|
134
139
|
|
140
|
+
if attributes.key?(:'properties')
|
141
|
+
if (value = attributes[:'properties']).is_a?(Array)
|
142
|
+
self.properties = value
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
135
146
|
if attributes.key?(:'quantity')
|
136
147
|
self.quantity = attributes[:'quantity']
|
137
148
|
end
|
@@ -191,6 +202,7 @@ module UltracartClient
|
|
191
202
|
auto_order_schedule == o.auto_order_schedule &&
|
192
203
|
merchant_item_id == o.merchant_item_id &&
|
193
204
|
options == o.options &&
|
205
|
+
properties == o.properties &&
|
194
206
|
quantity == o.quantity &&
|
195
207
|
upsell == o.upsell
|
196
208
|
end
|
@@ -204,7 +216,7 @@ module UltracartClient
|
|
204
216
|
# Calculates hash code according to all attributes.
|
205
217
|
# @return [Integer] Hash code
|
206
218
|
def hash
|
207
|
-
[arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, merchant_item_id, options, quantity, upsell].hash
|
219
|
+
[arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, merchant_item_id, options, properties, quantity, upsell].hash
|
208
220
|
end
|
209
221
|
|
210
222
|
# Builds the object from hash
|
@@ -0,0 +1,280 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module UltracartClient
|
17
|
+
class ChannelPartnerOrderItemProperty
|
18
|
+
# True if this property is displayed to the customer
|
19
|
+
attr_accessor :display
|
20
|
+
|
21
|
+
# The date/time that the property expires and is deleted
|
22
|
+
attr_accessor :expiration_dts
|
23
|
+
|
24
|
+
# Name
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
# Value
|
28
|
+
attr_accessor :value
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'display' => :'display',
|
34
|
+
:'expiration_dts' => :'expiration_dts',
|
35
|
+
:'name' => :'name',
|
36
|
+
:'value' => :'value'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'display' => :'Boolean',
|
49
|
+
:'expiration_dts' => :'String',
|
50
|
+
:'name' => :'String',
|
51
|
+
:'value' => :'String'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChannelPartnerOrderItemProperty` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChannelPartnerOrderItemProperty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'display')
|
77
|
+
self.display = attributes[:'display']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'expiration_dts')
|
81
|
+
self.expiration_dts = attributes[:'expiration_dts']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'name')
|
85
|
+
self.name = attributes[:'name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'value')
|
89
|
+
self.value = attributes[:'value']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
if !@name.nil? && @name.to_s.length > 100
|
98
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
|
99
|
+
end
|
100
|
+
|
101
|
+
if !@value.nil? && @value.to_s.length > 3800
|
102
|
+
invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 3800.')
|
103
|
+
end
|
104
|
+
|
105
|
+
invalid_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
def valid?
|
111
|
+
return false if !@name.nil? && @name.to_s.length > 100
|
112
|
+
return false if !@value.nil? && @value.to_s.length > 3800
|
113
|
+
true
|
114
|
+
end
|
115
|
+
|
116
|
+
# Custom attribute writer method with validation
|
117
|
+
# @param [Object] name Value to be assigned
|
118
|
+
def name=(name)
|
119
|
+
if !name.nil? && name.to_s.length > 100
|
120
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
|
121
|
+
end
|
122
|
+
|
123
|
+
@name = name
|
124
|
+
end
|
125
|
+
|
126
|
+
# Custom attribute writer method with validation
|
127
|
+
# @param [Object] value Value to be assigned
|
128
|
+
def value=(value)
|
129
|
+
if !value.nil? && value.to_s.length > 3800
|
130
|
+
fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 3800.'
|
131
|
+
end
|
132
|
+
|
133
|
+
@value = value
|
134
|
+
end
|
135
|
+
|
136
|
+
# Checks equality by comparing each attribute.
|
137
|
+
# @param [Object] Object to be compared
|
138
|
+
def ==(o)
|
139
|
+
return true if self.equal?(o)
|
140
|
+
self.class == o.class &&
|
141
|
+
display == o.display &&
|
142
|
+
expiration_dts == o.expiration_dts &&
|
143
|
+
name == o.name &&
|
144
|
+
value == o.value
|
145
|
+
end
|
146
|
+
|
147
|
+
# @see the `==` method
|
148
|
+
# @param [Object] Object to be compared
|
149
|
+
def eql?(o)
|
150
|
+
self == o
|
151
|
+
end
|
152
|
+
|
153
|
+
# Calculates hash code according to all attributes.
|
154
|
+
# @return [Integer] Hash code
|
155
|
+
def hash
|
156
|
+
[display, expiration_dts, name, value].hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# Builds the object from hash
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
+
# @return [Object] Returns the model itself
|
162
|
+
def self.build_from_hash(attributes)
|
163
|
+
new.build_from_hash(attributes)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Builds the object from hash
|
167
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
168
|
+
# @return [Object] Returns the model itself
|
169
|
+
def build_from_hash(attributes)
|
170
|
+
return nil unless attributes.is_a?(Hash)
|
171
|
+
attributes = attributes.transform_keys(&:to_sym)
|
172
|
+
self.class.openapi_types.each_pair do |key, type|
|
173
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
174
|
+
self.send("#{key}=", nil)
|
175
|
+
elsif type =~ /\AArray<(.*)>/i
|
176
|
+
# check to ensure the input is an array given that the attribute
|
177
|
+
# is documented as an array but the input is not
|
178
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
179
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
180
|
+
end
|
181
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
182
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
self
|
187
|
+
end
|
188
|
+
|
189
|
+
# Deserializes the data based on type
|
190
|
+
# @param string type Data type
|
191
|
+
# @param string value Value to be deserialized
|
192
|
+
# @return [Object] Deserialized data
|
193
|
+
def _deserialize(type, value)
|
194
|
+
case type.to_sym
|
195
|
+
when :Time
|
196
|
+
Time.parse(value)
|
197
|
+
when :Date
|
198
|
+
Date.parse(value)
|
199
|
+
when :String
|
200
|
+
value.to_s
|
201
|
+
when :Integer
|
202
|
+
value.to_i
|
203
|
+
when :Float
|
204
|
+
value.to_f
|
205
|
+
when :Boolean
|
206
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
207
|
+
true
|
208
|
+
else
|
209
|
+
false
|
210
|
+
end
|
211
|
+
when :Object
|
212
|
+
# generic object (usually a Hash), return directly
|
213
|
+
value
|
214
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
215
|
+
inner_type = Regexp.last_match[:inner_type]
|
216
|
+
value.map { |v| _deserialize(inner_type, v) }
|
217
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
218
|
+
k_type = Regexp.last_match[:k_type]
|
219
|
+
v_type = Regexp.last_match[:v_type]
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each do |k, v|
|
222
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
else # model
|
226
|
+
# models (e.g. Pet) or oneOf
|
227
|
+
klass = UltracartClient.const_get(type)
|
228
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
# Returns the string representation of the object
|
233
|
+
# @return [String] String presentation of the object
|
234
|
+
def to_s
|
235
|
+
to_hash.to_s
|
236
|
+
end
|
237
|
+
|
238
|
+
# to_body is an alias to to_hash (backward compatibility)
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_body
|
241
|
+
to_hash
|
242
|
+
end
|
243
|
+
|
244
|
+
# Returns the object in the form of hash
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_hash
|
247
|
+
hash = {}
|
248
|
+
self.class.attribute_map.each_pair do |attr, param|
|
249
|
+
value = self.send(attr)
|
250
|
+
if value.nil?
|
251
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
252
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
253
|
+
end
|
254
|
+
|
255
|
+
hash[param] = _to_hash(value)
|
256
|
+
end
|
257
|
+
hash
|
258
|
+
end
|
259
|
+
|
260
|
+
# Outputs non-array value in the form of hash
|
261
|
+
# For object, use to_hash. Otherwise, just return the value
|
262
|
+
# @param [Object] value Any valid value
|
263
|
+
# @return [Hash] Returns the value in the form of hash
|
264
|
+
def _to_hash(value)
|
265
|
+
if value.is_a?(Array)
|
266
|
+
value.compact.map { |v| _to_hash(v) }
|
267
|
+
elsif value.is_a?(Hash)
|
268
|
+
{}.tap do |hash|
|
269
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
270
|
+
end
|
271
|
+
elsif value.respond_to? :to_hash
|
272
|
+
value.to_hash
|
273
|
+
else
|
274
|
+
value
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
end
|
279
|
+
|
280
|
+
end
|
@@ -15,6 +15,18 @@ require 'time'
|
|
15
15
|
|
16
16
|
module UltracartClient
|
17
17
|
class ConversationAgentProfile
|
18
|
+
# AI powered chat bot
|
19
|
+
attr_accessor :ai
|
20
|
+
|
21
|
+
# Additional instructions for this AI when handle web chats
|
22
|
+
attr_accessor :ai_chat_instructions
|
23
|
+
|
24
|
+
# Persona of this AI agent
|
25
|
+
attr_accessor :ai_persona
|
26
|
+
|
27
|
+
# Additional instructions for this AI when handle SMS messages
|
28
|
+
attr_accessor :ai_sms_instructions
|
29
|
+
|
18
30
|
# The number of engagement chats that can be pushed on them at any given time.
|
19
31
|
attr_accessor :chat_limit
|
20
32
|
|
@@ -61,6 +73,10 @@ module UltracartClient
|
|
61
73
|
# Attribute mapping from ruby-style variable name to JSON key.
|
62
74
|
def self.attribute_map
|
63
75
|
{
|
76
|
+
:'ai' => :'ai',
|
77
|
+
:'ai_chat_instructions' => :'ai_chat_instructions',
|
78
|
+
:'ai_persona' => :'ai_persona',
|
79
|
+
:'ai_sms_instructions' => :'ai_sms_instructions',
|
64
80
|
:'chat_limit' => :'chat_limit',
|
65
81
|
:'default_language_iso_code' => :'default_language_iso_code',
|
66
82
|
:'default_status' => :'default_status',
|
@@ -79,6 +95,10 @@ module UltracartClient
|
|
79
95
|
# Attribute type mapping.
|
80
96
|
def self.openapi_types
|
81
97
|
{
|
98
|
+
:'ai' => :'Boolean',
|
99
|
+
:'ai_chat_instructions' => :'String',
|
100
|
+
:'ai_persona' => :'String',
|
101
|
+
:'ai_sms_instructions' => :'String',
|
82
102
|
:'chat_limit' => :'Integer',
|
83
103
|
:'default_language_iso_code' => :'String',
|
84
104
|
:'default_status' => :'String',
|
@@ -110,6 +130,22 @@ module UltracartClient
|
|
110
130
|
h[k.to_sym] = v
|
111
131
|
}
|
112
132
|
|
133
|
+
if attributes.key?(:'ai')
|
134
|
+
self.ai = attributes[:'ai']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'ai_chat_instructions')
|
138
|
+
self.ai_chat_instructions = attributes[:'ai_chat_instructions']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'ai_persona')
|
142
|
+
self.ai_persona = attributes[:'ai_persona']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'ai_sms_instructions')
|
146
|
+
self.ai_sms_instructions = attributes[:'ai_sms_instructions']
|
147
|
+
end
|
148
|
+
|
113
149
|
if attributes.key?(:'chat_limit')
|
114
150
|
self.chat_limit = attributes[:'chat_limit']
|
115
151
|
end
|
@@ -169,6 +205,10 @@ module UltracartClient
|
|
169
205
|
def ==(o)
|
170
206
|
return true if self.equal?(o)
|
171
207
|
self.class == o.class &&
|
208
|
+
ai == o.ai &&
|
209
|
+
ai_chat_instructions == o.ai_chat_instructions &&
|
210
|
+
ai_persona == o.ai_persona &&
|
211
|
+
ai_sms_instructions == o.ai_sms_instructions &&
|
172
212
|
chat_limit == o.chat_limit &&
|
173
213
|
default_language_iso_code == o.default_language_iso_code &&
|
174
214
|
default_status == o.default_status &&
|
@@ -187,7 +227,7 @@ module UltracartClient
|
|
187
227
|
# Calculates hash code according to all attributes.
|
188
228
|
# @return [Integer] Hash code
|
189
229
|
def hash
|
190
|
-
[chat_limit, default_language_iso_code, default_status, display_name, name, profile_image_upload_key, profile_image_url].hash
|
230
|
+
[ai, ai_chat_instructions, ai_persona, ai_sms_instructions, chat_limit, default_language_iso_code, default_status, display_name, name, profile_image_upload_key, profile_image_url].hash
|
191
231
|
end
|
192
232
|
|
193
233
|
# Builds the object from hash
|
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: 4.1.
|
4
|
+
version: 4.1.7
|
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
|
+
date: 2025-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- docs/ChannelPartnerOrder.md
|
176
176
|
- docs/ChannelPartnerOrderItem.md
|
177
177
|
- docs/ChannelPartnerOrderItemOption.md
|
178
|
+
- docs/ChannelPartnerOrderItemProperty.md
|
178
179
|
- docs/ChannelPartnerOrderTransaction.md
|
179
180
|
- docs/ChannelPartnerOrderTransactionDetail.md
|
180
181
|
- docs/ChannelPartnerShipToPreference.md
|
@@ -1075,6 +1076,7 @@ files:
|
|
1075
1076
|
- lib/ultracart_api/models/channel_partner_order.rb
|
1076
1077
|
- lib/ultracart_api/models/channel_partner_order_item.rb
|
1077
1078
|
- lib/ultracart_api/models/channel_partner_order_item_option.rb
|
1079
|
+
- lib/ultracart_api/models/channel_partner_order_item_property.rb
|
1078
1080
|
- lib/ultracart_api/models/channel_partner_order_transaction.rb
|
1079
1081
|
- lib/ultracart_api/models/channel_partner_order_transaction_detail.rb
|
1080
1082
|
- lib/ultracart_api/models/channel_partner_ship_to_preference.rb
|