ultracart_api 4.1.115 → 4.1.116
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/CustomerApi.md +54 -0
- data/docs/QuickBooksOnlineCustomer.md +22 -0
- data/docs/QuickBooksOnlineCustomersResponse.md +26 -0
- data/lib/ultracart_api/api/customer_api.rb +61 -0
- data/lib/ultracart_api/models/quick_books_online_customer.rb +240 -0
- data/lib/ultracart_api/models/quick_books_online_customers_response.rb +259 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '086a0e25ff8e557621233c7935d0f31c54cd4771435a55c5475b308057c34e7c'
|
|
4
|
+
data.tar.gz: 598fcddf217efbe381ed0da140c405758b6f4255696ee039ae1d108a45ade6ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e14c76b537806d95dbe344b9404d82c1b3bee3ab317cb20db49c2ad39004dd458ad9d98de2a1e7f5628c4665468341c9fba2f5ede1b1514d8421fcabef903405
|
|
7
|
+
data.tar.gz: 480c3eeed9b7c846a6346b092fb3bb614d0f7bed0756fa6f30c778d2d2bde12456f8d03f7eea7f75637403cd55d550d0dc2363f65f4f08d58a08b285f07493c2
|
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.116
|
|
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.116'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -326,6 +326,7 @@ Class | Method | HTTP request | Description
|
|
|
326
326
|
*UltracartClient::CustomerApi* | [**get_customers_for_data_tables**](docs/CustomerApi.md#get_customers_for_data_tables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin
|
|
327
327
|
*UltracartClient::CustomerApi* | [**get_email_verification_token**](docs/CustomerApi.md#get_email_verification_token) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address
|
|
328
328
|
*UltracartClient::CustomerApi* | [**get_magic_link**](docs/CustomerApi.md#get_magic_link) | **PUT** /customer/customers/{customer_profile_oid}/magic_link/{storefront_host_name} | getMagicLink
|
|
329
|
+
*UltracartClient::CustomerApi* | [**get_quick_books_online_customers**](docs/CustomerApi.md#get_quick_books_online_customers) | **GET** /customer/quickbooks_online/customers | Search the merchant's QuickBooks Online customers
|
|
329
330
|
*UltracartClient::CustomerApi* | [**insert_customer**](docs/CustomerApi.md#insert_customer) | **POST** /customer/customers | Insert a customer
|
|
330
331
|
*UltracartClient::CustomerApi* | [**insert_wish_list_item**](docs/CustomerApi.md#insert_wish_list_item) | **POST** /customer/customers/{customer_profile_oid}/wishlist | Insert a customer wishlist item
|
|
331
332
|
*UltracartClient::CustomerApi* | [**merge_customer**](docs/CustomerApi.md#merge_customer) | **PUT** /customer/customers/{customer_profile_oid}/merge | Merge customer into this customer
|
|
@@ -1570,6 +1571,8 @@ Class | Method | HTTP request | Description
|
|
|
1570
1571
|
- [UltracartClient::PricingTiersResponse](docs/PricingTiersResponse.md)
|
|
1571
1572
|
- [UltracartClient::Property](docs/Property.md)
|
|
1572
1573
|
- [UltracartClient::PublishLibraryItemRequest](docs/PublishLibraryItemRequest.md)
|
|
1574
|
+
- [UltracartClient::QuickBooksOnlineCustomer](docs/QuickBooksOnlineCustomer.md)
|
|
1575
|
+
- [UltracartClient::QuickBooksOnlineCustomersResponse](docs/QuickBooksOnlineCustomersResponse.md)
|
|
1573
1576
|
- [UltracartClient::RegisterAffiliateClickRequest](docs/RegisterAffiliateClickRequest.md)
|
|
1574
1577
|
- [UltracartClient::RegisterAffiliateClickResponse](docs/RegisterAffiliateClickResponse.md)
|
|
1575
1578
|
- [UltracartClient::ReplaceOrderItemIdRequest](docs/ReplaceOrderItemIdRequest.md)
|
|
@@ -1820,6 +1823,7 @@ Not every change is committed to every SDK.
|
|
|
1820
1823
|
|
|
1821
1824
|
| Version | Date | Comments |
|
|
1822
1825
|
| --: | :-: | --- |
|
|
1826
|
+
| 4.1.116 | 07/10/2026 | customer - method to search quickbooks online customers |
|
|
1823
1827
|
| 4.1.115 | 07/10/2026 | customer profile birthday |
|
|
1824
1828
|
| 4.1.114 | 07/08/2026 | tax - anrok tax provider |
|
|
1825
1829
|
| 4.1.113 | 07/08/2026 | tax - anrok tax provider |
|
data/docs/CustomerApi.md
CHANGED
|
@@ -20,6 +20,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
20
20
|
| [**get_customers_for_data_tables**](CustomerApi.md#get_customers_for_data_tables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin |
|
|
21
21
|
| [**get_email_verification_token**](CustomerApi.md#get_email_verification_token) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address |
|
|
22
22
|
| [**get_magic_link**](CustomerApi.md#get_magic_link) | **PUT** /customer/customers/{customer_profile_oid}/magic_link/{storefront_host_name} | getMagicLink |
|
|
23
|
+
| [**get_quick_books_online_customers**](CustomerApi.md#get_quick_books_online_customers) | **GET** /customer/quickbooks_online/customers | Search the merchant's QuickBooks Online customers |
|
|
23
24
|
| [**insert_customer**](CustomerApi.md#insert_customer) | **POST** /customer/customers | Insert a customer |
|
|
24
25
|
| [**insert_wish_list_item**](CustomerApi.md#insert_wish_list_item) | **POST** /customer/customers/{customer_profile_oid}/wishlist | Insert a customer wishlist item |
|
|
25
26
|
| [**merge_customer**](CustomerApi.md#merge_customer) | **PUT** /customer/customers/{customer_profile_oid}/merge | Merge customer into this customer |
|
|
@@ -1763,6 +1764,59 @@ end
|
|
|
1763
1764
|
- **Accept**: application/json
|
|
1764
1765
|
|
|
1765
1766
|
|
|
1767
|
+
## get_quick_books_online_customers
|
|
1768
|
+
|
|
1769
|
+
> <QuickBooksOnlineCustomersResponse> get_quick_books_online_customers(opts)
|
|
1770
|
+
|
|
1771
|
+
Search the merchant's QuickBooks Online customers
|
|
1772
|
+
|
|
1773
|
+
Typeahead search of the merchant's QuickBooks Online customers by display name. Used by the customer profile editor to link a profile 1:1 to a QuickBooks Online customer. Returns up to 100 matches. If QuickBooks Online is not connected the list will be empty.
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
### Examples
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
(No example for this operation).
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
#### Using the get_quick_books_online_customers_with_http_info variant
|
|
1783
|
+
|
|
1784
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1785
|
+
|
|
1786
|
+
> <Array(<QuickBooksOnlineCustomersResponse>, Integer, Hash)> get_quick_books_online_customers_with_http_info(opts)
|
|
1787
|
+
|
|
1788
|
+
```ruby
|
|
1789
|
+
begin
|
|
1790
|
+
# Search the merchant's QuickBooks Online customers
|
|
1791
|
+
data, status_code, headers = api_instance.get_quick_books_online_customers_with_http_info(opts)
|
|
1792
|
+
p status_code # => 2xx
|
|
1793
|
+
p headers # => { ... }
|
|
1794
|
+
p data # => <QuickBooksOnlineCustomersResponse>
|
|
1795
|
+
rescue UltracartClient::ApiError => e
|
|
1796
|
+
puts "Error when calling CustomerApi->get_quick_books_online_customers_with_http_info: #{e}"
|
|
1797
|
+
end
|
|
1798
|
+
```
|
|
1799
|
+
|
|
1800
|
+
### Parameters
|
|
1801
|
+
|
|
1802
|
+
| Name | Type | Description | Notes |
|
|
1803
|
+
| ---- | ---- | ----------- | ----- |
|
|
1804
|
+
| **q** | **String** | Search query matched against the QuickBooks Online customer display name | [optional] |
|
|
1805
|
+
|
|
1806
|
+
### Return type
|
|
1807
|
+
|
|
1808
|
+
[**QuickBooksOnlineCustomersResponse**](QuickBooksOnlineCustomersResponse.md)
|
|
1809
|
+
|
|
1810
|
+
### Authorization
|
|
1811
|
+
|
|
1812
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
1813
|
+
|
|
1814
|
+
### HTTP request headers
|
|
1815
|
+
|
|
1816
|
+
- **Content-Type**: Not defined
|
|
1817
|
+
- **Accept**: application/json
|
|
1818
|
+
|
|
1819
|
+
|
|
1766
1820
|
## insert_customer
|
|
1767
1821
|
|
|
1768
1822
|
> <CustomerResponse> insert_customer(customer, opts)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# UltracartClient::QuickBooksOnlineCustomer
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **customer_id** | **String** | The QuickBooks Online internal customer id. Stored on the customer profile to lock it 1:1 with QuickBooks Online. | [optional] |
|
|
8
|
+
| **display_name** | **String** | The QuickBooks Online customer display name. | [optional] |
|
|
9
|
+
| **email** | **String** | The QuickBooks Online customer primary email address, if any. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'ultracart_api'
|
|
15
|
+
|
|
16
|
+
instance = UltracartClient::QuickBooksOnlineCustomer.new(
|
|
17
|
+
customer_id: null,
|
|
18
|
+
display_name: null,
|
|
19
|
+
email: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# UltracartClient::QuickBooksOnlineCustomersResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
|
8
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
|
9
|
+
| **quickbooks_online_customers** | [**Array<QuickBooksOnlineCustomer>**](QuickBooksOnlineCustomer.md) | QuickBooks Online customers matching the typeahead query | [optional] |
|
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ultracart_api'
|
|
17
|
+
|
|
18
|
+
instance = UltracartClient::QuickBooksOnlineCustomersResponse.new(
|
|
19
|
+
error: null,
|
|
20
|
+
metadata: null,
|
|
21
|
+
quickbooks_online_customers: null,
|
|
22
|
+
success: null,
|
|
23
|
+
warning: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -1202,6 +1202,67 @@ module UltracartClient
|
|
|
1202
1202
|
return data, status_code, headers
|
|
1203
1203
|
end
|
|
1204
1204
|
|
|
1205
|
+
# Search the merchant's QuickBooks Online customers
|
|
1206
|
+
# Typeahead search of the merchant's QuickBooks Online customers by display name. Used by the customer profile editor to link a profile 1:1 to a QuickBooks Online customer. Returns up to 100 matches. If QuickBooks Online is not connected the list will be empty.
|
|
1207
|
+
# @param [Hash] opts the optional parameters
|
|
1208
|
+
# @option opts [String] :q Search query matched against the QuickBooks Online customer display name
|
|
1209
|
+
# @return [QuickBooksOnlineCustomersResponse]
|
|
1210
|
+
def get_quick_books_online_customers(opts = {})
|
|
1211
|
+
data, _status_code, _headers = get_quick_books_online_customers_with_http_info(opts)
|
|
1212
|
+
data
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
# Search the merchant's QuickBooks Online customers
|
|
1216
|
+
# Typeahead search of the merchant's QuickBooks Online customers by display name. Used by the customer profile editor to link a profile 1:1 to a QuickBooks Online customer. Returns up to 100 matches. If QuickBooks Online is not connected the list will be empty.
|
|
1217
|
+
# @param [Hash] opts the optional parameters
|
|
1218
|
+
# @option opts [String] :q Search query matched against the QuickBooks Online customer display name
|
|
1219
|
+
# @return [Array<(QuickBooksOnlineCustomersResponse, Integer, Hash)>] QuickBooksOnlineCustomersResponse data, response status code and response headers
|
|
1220
|
+
def get_quick_books_online_customers_with_http_info(opts = {})
|
|
1221
|
+
if @api_client.config.debugging
|
|
1222
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.get_quick_books_online_customers ...'
|
|
1223
|
+
end
|
|
1224
|
+
# resource path
|
|
1225
|
+
local_var_path = '/customer/quickbooks_online/customers'
|
|
1226
|
+
|
|
1227
|
+
# query parameters
|
|
1228
|
+
query_params = opts[:query_params] || {}
|
|
1229
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
1230
|
+
|
|
1231
|
+
# header parameters
|
|
1232
|
+
header_params = opts[:header_params] || {}
|
|
1233
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1234
|
+
# HTTP header 'Accept' (if needed)
|
|
1235
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1236
|
+
|
|
1237
|
+
# form parameters
|
|
1238
|
+
form_params = opts[:form_params] || {}
|
|
1239
|
+
|
|
1240
|
+
# http body (model)
|
|
1241
|
+
post_body = opts[:debug_body]
|
|
1242
|
+
|
|
1243
|
+
# return_type
|
|
1244
|
+
return_type = opts[:debug_return_type] || 'QuickBooksOnlineCustomersResponse'
|
|
1245
|
+
|
|
1246
|
+
# auth_names
|
|
1247
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1248
|
+
|
|
1249
|
+
new_options = opts.merge(
|
|
1250
|
+
:operation => :"CustomerApi.get_quick_books_online_customers",
|
|
1251
|
+
:header_params => header_params,
|
|
1252
|
+
:query_params => query_params,
|
|
1253
|
+
:form_params => form_params,
|
|
1254
|
+
:body => post_body,
|
|
1255
|
+
:auth_names => auth_names,
|
|
1256
|
+
:return_type => return_type
|
|
1257
|
+
)
|
|
1258
|
+
|
|
1259
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1260
|
+
if @api_client.config.debugging
|
|
1261
|
+
@api_client.config.logger.debug "API called: CustomerApi#get_quick_books_online_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1262
|
+
end
|
|
1263
|
+
return data, status_code, headers
|
|
1264
|
+
end
|
|
1265
|
+
|
|
1205
1266
|
# Insert a customer
|
|
1206
1267
|
# Insert a customer on the UltraCart account.
|
|
1207
1268
|
# @param customer [Customer] Customer to insert
|
|
@@ -0,0 +1,240 @@
|
|
|
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 QuickBooksOnlineCustomer
|
|
18
|
+
# The QuickBooks Online internal customer id. Stored on the customer profile to lock it 1:1 with QuickBooks Online.
|
|
19
|
+
attr_accessor :customer_id
|
|
20
|
+
|
|
21
|
+
# The QuickBooks Online customer display name.
|
|
22
|
+
attr_accessor :display_name
|
|
23
|
+
|
|
24
|
+
# The QuickBooks Online customer primary email address, if any.
|
|
25
|
+
attr_accessor :email
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'customer_id' => :'customer_id',
|
|
31
|
+
:'display_name' => :'display_name',
|
|
32
|
+
:'email' => :'email'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'customer_id' => :'String',
|
|
45
|
+
:'display_name' => :'String',
|
|
46
|
+
:'email' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::QuickBooksOnlineCustomer` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::QuickBooksOnlineCustomer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'customer_id')
|
|
72
|
+
self.customer_id = attributes[:'customer_id']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'display_name')
|
|
76
|
+
self.display_name = attributes[:'display_name']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'email')
|
|
80
|
+
self.email = attributes[:'email']
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
customer_id == o.customer_id &&
|
|
103
|
+
display_name == o.display_name &&
|
|
104
|
+
email == o.email
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[customer_id, display_name, email].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
new.build_from_hash(attributes)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
132
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
134
|
+
self.send("#{key}=", nil)
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
self
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Deserializes the data based on type
|
|
150
|
+
# @param string type Data type
|
|
151
|
+
# @param string value Value to be deserialized
|
|
152
|
+
# @return [Object] Deserialized data
|
|
153
|
+
def _deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :Boolean
|
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
186
|
+
# models (e.g. Pet) or oneOf
|
|
187
|
+
klass = UltracartClient.const_get(type)
|
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the string representation of the object
|
|
193
|
+
# @return [String] String presentation of the object
|
|
194
|
+
def to_s
|
|
195
|
+
to_hash.to_s
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_body
|
|
201
|
+
to_hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the object in the form of hash
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_hash
|
|
207
|
+
hash = {}
|
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
209
|
+
value = self.send(attr)
|
|
210
|
+
if value.nil?
|
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Outputs non-array value in the form of hash
|
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
222
|
+
# @param [Object] value Any valid value
|
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
|
224
|
+
def _to_hash(value)
|
|
225
|
+
if value.is_a?(Array)
|
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
|
+
elsif value.is_a?(Hash)
|
|
228
|
+
{}.tap do |hash|
|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
230
|
+
end
|
|
231
|
+
elsif value.respond_to? :to_hash
|
|
232
|
+
value.to_hash
|
|
233
|
+
else
|
|
234
|
+
value
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
@@ -0,0 +1,259 @@
|
|
|
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 QuickBooksOnlineCustomersResponse
|
|
18
|
+
attr_accessor :error
|
|
19
|
+
|
|
20
|
+
attr_accessor :metadata
|
|
21
|
+
|
|
22
|
+
# QuickBooks Online customers matching the typeahead query
|
|
23
|
+
attr_accessor :quickbooks_online_customers
|
|
24
|
+
|
|
25
|
+
# Indicates if API call was successful
|
|
26
|
+
attr_accessor :success
|
|
27
|
+
|
|
28
|
+
attr_accessor :warning
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'error' => :'error',
|
|
34
|
+
:'metadata' => :'metadata',
|
|
35
|
+
:'quickbooks_online_customers' => :'quickbooks_online_customers',
|
|
36
|
+
:'success' => :'success',
|
|
37
|
+
:'warning' => :'warning'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'error' => :'Error',
|
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
|
51
|
+
:'quickbooks_online_customers' => :'Array<QuickBooksOnlineCustomer>',
|
|
52
|
+
:'success' => :'Boolean',
|
|
53
|
+
:'warning' => :'Warning'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::QuickBooksOnlineCustomersResponse` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::QuickBooksOnlineCustomersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'error')
|
|
79
|
+
self.error = attributes[:'error']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'metadata')
|
|
83
|
+
self.metadata = attributes[:'metadata']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'quickbooks_online_customers')
|
|
87
|
+
if (value = attributes[:'quickbooks_online_customers']).is_a?(Array)
|
|
88
|
+
self.quickbooks_online_customers = value
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'success')
|
|
93
|
+
self.success = attributes[:'success']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'warning')
|
|
97
|
+
self.warning = attributes[:'warning']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
invalid_properties = Array.new
|
|
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
|
+
true
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Checks equality by comparing each attribute.
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def ==(o)
|
|
117
|
+
return true if self.equal?(o)
|
|
118
|
+
self.class == o.class &&
|
|
119
|
+
error == o.error &&
|
|
120
|
+
metadata == o.metadata &&
|
|
121
|
+
quickbooks_online_customers == o.quickbooks_online_customers &&
|
|
122
|
+
success == o.success &&
|
|
123
|
+
warning == o.warning
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# @see the `==` method
|
|
127
|
+
# @param [Object] Object to be compared
|
|
128
|
+
def eql?(o)
|
|
129
|
+
self == o
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Calculates hash code according to all attributes.
|
|
133
|
+
# @return [Integer] Hash code
|
|
134
|
+
def hash
|
|
135
|
+
[error, metadata, quickbooks_online_customers, success, warning].hash
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Builds the object from hash
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
# @return [Object] Returns the model itself
|
|
141
|
+
def self.build_from_hash(attributes)
|
|
142
|
+
new.build_from_hash(attributes)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Builds the object from hash
|
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
147
|
+
# @return [Object] Returns the model itself
|
|
148
|
+
def build_from_hash(attributes)
|
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
152
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
153
|
+
self.send("#{key}=", nil)
|
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
155
|
+
# check to ensure the input is an array given that the attribute
|
|
156
|
+
# is documented as an array but the input is not
|
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
159
|
+
end
|
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
self
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Deserializes the data based on type
|
|
169
|
+
# @param string type Data type
|
|
170
|
+
# @param string value Value to be deserialized
|
|
171
|
+
# @return [Object] Deserialized data
|
|
172
|
+
def _deserialize(type, value)
|
|
173
|
+
case type.to_sym
|
|
174
|
+
when :Time
|
|
175
|
+
Time.parse(value)
|
|
176
|
+
when :Date
|
|
177
|
+
Date.parse(value)
|
|
178
|
+
when :String
|
|
179
|
+
value.to_s
|
|
180
|
+
when :Integer
|
|
181
|
+
value.to_i
|
|
182
|
+
when :Float
|
|
183
|
+
value.to_f
|
|
184
|
+
when :Boolean
|
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
186
|
+
true
|
|
187
|
+
else
|
|
188
|
+
false
|
|
189
|
+
end
|
|
190
|
+
when :Object
|
|
191
|
+
# generic object (usually a Hash), return directly
|
|
192
|
+
value
|
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
|
199
|
+
{}.tap do |hash|
|
|
200
|
+
value.each do |k, v|
|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
else # model
|
|
205
|
+
# models (e.g. Pet) or oneOf
|
|
206
|
+
klass = UltracartClient.const_get(type)
|
|
207
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Returns the string representation of the object
|
|
212
|
+
# @return [String] String presentation of the object
|
|
213
|
+
def to_s
|
|
214
|
+
to_hash.to_s
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
|
219
|
+
def to_body
|
|
220
|
+
to_hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Returns the object in the form of hash
|
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
|
225
|
+
def to_hash
|
|
226
|
+
hash = {}
|
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
228
|
+
value = self.send(attr)
|
|
229
|
+
if value.nil?
|
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
hash[param] = _to_hash(value)
|
|
235
|
+
end
|
|
236
|
+
hash
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Outputs non-array value in the form of hash
|
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
241
|
+
# @param [Object] value Any valid value
|
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
|
243
|
+
def _to_hash(value)
|
|
244
|
+
if value.is_a?(Array)
|
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
|
246
|
+
elsif value.is_a?(Hash)
|
|
247
|
+
{}.tap do |hash|
|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
249
|
+
end
|
|
250
|
+
elsif value.respond_to? :to_hash
|
|
251
|
+
value.to_hash
|
|
252
|
+
else
|
|
253
|
+
value
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -872,6 +872,8 @@ require 'ultracart_api/models/pricing_tier_notification'
|
|
|
872
872
|
require 'ultracart_api/models/pricing_tiers_response'
|
|
873
873
|
require 'ultracart_api/models/property'
|
|
874
874
|
require 'ultracart_api/models/publish_library_item_request'
|
|
875
|
+
require 'ultracart_api/models/quick_books_online_customer'
|
|
876
|
+
require 'ultracart_api/models/quick_books_online_customers_response'
|
|
875
877
|
require 'ultracart_api/models/register_affiliate_click_request'
|
|
876
878
|
require 'ultracart_api/models/register_affiliate_click_response'
|
|
877
879
|
require 'ultracart_api/models/replace_order_item_id_request'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.116
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
@@ -933,6 +933,8 @@ files:
|
|
|
933
933
|
- docs/PricingTiersResponse.md
|
|
934
934
|
- docs/Property.md
|
|
935
935
|
- docs/PublishLibraryItemRequest.md
|
|
936
|
+
- docs/QuickBooksOnlineCustomer.md
|
|
937
|
+
- docs/QuickBooksOnlineCustomersResponse.md
|
|
936
938
|
- docs/RegisterAffiliateClickRequest.md
|
|
937
939
|
- docs/RegisterAffiliateClickResponse.md
|
|
938
940
|
- docs/ReplaceOrderItemIdRequest.md
|
|
@@ -1995,6 +1997,8 @@ files:
|
|
|
1995
1997
|
- lib/ultracart_api/models/pricing_tiers_response.rb
|
|
1996
1998
|
- lib/ultracart_api/models/property.rb
|
|
1997
1999
|
- lib/ultracart_api/models/publish_library_item_request.rb
|
|
2000
|
+
- lib/ultracart_api/models/quick_books_online_customer.rb
|
|
2001
|
+
- lib/ultracart_api/models/quick_books_online_customers_response.rb
|
|
1998
2002
|
- lib/ultracart_api/models/register_affiliate_click_request.rb
|
|
1999
2003
|
- lib/ultracart_api/models/register_affiliate_click_response.rb
|
|
2000
2004
|
- lib/ultracart_api/models/replace_order_item_id_request.rb
|