ultracart_api 3.10.216 → 3.10.217
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 +7 -4
- data/docs/OrderUtm.md +2 -0
- data/docs/StoreFrontPageContentAttribute.md +11 -0
- data/docs/StorefrontApi.md +56 -0
- data/lib/ultracart_api/api/storefront_api.rb +66 -0
- data/lib/ultracart_api/models/order_utm.rb +19 -1
- data/lib/ultracart_api/models/store_front_page_content_attribute.rb +245 -0
- 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: ced3df4a71c53a4fc656ca961af99ba9e518f263f107504d785dc83e6b224bd0
|
4
|
+
data.tar.gz: 21b7cc4b6deb7d69ddf001ba868ce53ed6207db1ef717280e3d22cf7e1851f73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93a6f72a64807486790a3c2ebd160ed285d5c3b9e0b61de1e2302f7d5773e7999e04c1061b5008b1ade538e7d875b6b44856346c6f183b7cebaa59fdfea6f21b
|
7
|
+
data.tar.gz: 6e8a8f94d13d7ef36c419833aa0e7022e9f103a31b33d4b117402ce59d1c3e175b9349351569d1b858cc6086645df37b9c6210e9ab925320ca4719bba73b58f1
|
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.
|
10
|
+
- Package version: 3.10.217
|
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.
|
27
|
+
gem install ./ultracart_api-3.10.217.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.217.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.
|
35
|
+
gem 'ultracart_api', '~> 3.10.217'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -473,6 +473,7 @@ Class | Method | HTTP request | Description
|
|
473
473
|
*UltracartClient::StorefrontApi* | [**insert_email_postcard**](docs/StorefrontApi.md#insert_email_postcard) | **POST** /storefront/{storefront_oid}/email/postcards | Insert email postcard
|
474
474
|
*UltracartClient::StorefrontApi* | [**insert_email_segment**](docs/StorefrontApi.md#insert_email_segment) | **POST** /storefront/{storefront_oid}/email/segments | Insert email segment
|
475
475
|
*UltracartClient::StorefrontApi* | [**insert_screen_recording_segment**](docs/StorefrontApi.md#insert_screen_recording_segment) | **POST** /storefront/{storefront_oid}/screen_recordings/segments | Insert screen recording segment
|
476
|
+
*UltracartClient::StorefrontApi* | [**insert_update_page_content_attribute**](docs/StorefrontApi.md#insert_update_page_content_attribute) | **POST** /storefront/{storefront_oid}/pages/{page_oid}/content/attributes | Upsert a page content attribute
|
476
477
|
*UltracartClient::StorefrontApi* | [**prepare_download_email_segment**](docs/StorefrontApi.md#prepare_download_email_segment) | **POST** /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/downloadPrepare | Prepare download of email segment
|
477
478
|
*UltracartClient::StorefrontApi* | [**publish_library_item**](docs/StorefrontApi.md#publish_library_item) | **POST** /storefront/code_library/{library_item_oid}/publish | Publish library item.
|
478
479
|
*UltracartClient::StorefrontApi* | [**purchase_library_item**](docs/StorefrontApi.md#purchase_library_item) | **POST** /storefront/code_library/{library_item_oid}/purchase | Purchase public library item, which creates a copy of the item in your personal code library
|
@@ -1364,6 +1365,7 @@ Class | Method | HTTP request | Description
|
|
1364
1365
|
- [UltracartClient::StateProvince](docs/StateProvince.md)
|
1365
1366
|
- [UltracartClient::StepWaiting](docs/StepWaiting.md)
|
1366
1367
|
- [UltracartClient::StoreFront](docs/StoreFront.md)
|
1368
|
+
- [UltracartClient::StoreFrontPageContentAttribute](docs/StoreFrontPageContentAttribute.md)
|
1367
1369
|
- [UltracartClient::StoreFrontsResponse](docs/StoreFrontsResponse.md)
|
1368
1370
|
- [UltracartClient::TaxCity](docs/TaxCity.md)
|
1369
1371
|
- [UltracartClient::TaxCountry](docs/TaxCountry.md)
|
@@ -1510,6 +1512,7 @@ Not every change is committed to every SDK.
|
|
1510
1512
|
|
1511
1513
|
| Version | Date | Comments |
|
1512
1514
|
| --: | :-: | --- |
|
1515
|
+
| 3.10.217 | 10/24/2024 | storefront page attribute edit method |
|
1513
1516
|
| 3.10.216 | 09/18/2024 | order payment constant for PayPal Fastlane |
|
1514
1517
|
| 3.10.215 | 08/29/2024 | add hold_for_transmission to item shipping object |
|
1515
1518
|
| 3.10.214 | 08/08/2024 | added query_target to OrderApi.getOrdersBatch to allow cache usage |
|
data/docs/OrderUtm.md
CHANGED
@@ -23,6 +23,8 @@ Name | Type | Description | Notes
|
|
23
23
|
**itm_source** | **String** | | [optional]
|
24
24
|
**itm_term** | **String** | | [optional]
|
25
25
|
**msclkid** | **String** | | [optional]
|
26
|
+
**short_code** | **String** | | [optional]
|
27
|
+
**short_code_backup** | **BOOLEAN** | | [optional]
|
26
28
|
**ttclid** | **String** | | [optional]
|
27
29
|
**uc_message_id** | **String** | | [optional]
|
28
30
|
**utm_campaign** | **String** | | [optional]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# UltracartClient::StoreFrontPageContentAttribute
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**name** | **String** | Attribute name | [optional]
|
7
|
+
**translated_text_instance_oid** | **Integer** | Attribute translated text instance identifier | [optional]
|
8
|
+
**type** | **String** | Attribute type | [optional]
|
9
|
+
**value** | **String** | Attribute value | [optional]
|
10
|
+
|
11
|
+
|
data/docs/StorefrontApi.md
CHANGED
@@ -133,6 +133,7 @@ Method | HTTP request | Description
|
|
133
133
|
[**insert_email_postcard**](StorefrontApi.md#insert_email_postcard) | **POST** /storefront/{storefront_oid}/email/postcards | Insert email postcard
|
134
134
|
[**insert_email_segment**](StorefrontApi.md#insert_email_segment) | **POST** /storefront/{storefront_oid}/email/segments | Insert email segment
|
135
135
|
[**insert_screen_recording_segment**](StorefrontApi.md#insert_screen_recording_segment) | **POST** /storefront/{storefront_oid}/screen_recordings/segments | Insert screen recording segment
|
136
|
+
[**insert_update_page_content_attribute**](StorefrontApi.md#insert_update_page_content_attribute) | **POST** /storefront/{storefront_oid}/pages/{page_oid}/content/attributes | Upsert a page content attribute
|
136
137
|
[**prepare_download_email_segment**](StorefrontApi.md#prepare_download_email_segment) | **POST** /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/downloadPrepare | Prepare download of email segment
|
137
138
|
[**publish_library_item**](StorefrontApi.md#publish_library_item) | **POST** /storefront/code_library/{library_item_oid}/publish | Publish library item.
|
138
139
|
[**purchase_library_item**](StorefrontApi.md#purchase_library_item) | **POST** /storefront/code_library/{library_item_oid}/purchase | Purchase public library item, which creates a copy of the item in your personal code library
|
@@ -6765,6 +6766,61 @@ Name | Type | Description | Notes
|
|
6765
6766
|
|
6766
6767
|
|
6767
6768
|
|
6769
|
+
# **insert_update_page_content_attribute**
|
6770
|
+
> insert_update_page_content_attribute(page_attribute, storefront_oid, page_oid)
|
6771
|
+
|
6772
|
+
Upsert a page content attribute
|
6773
|
+
|
6774
|
+
Update a page content attribute, creating it new if it does not yet exist.
|
6775
|
+
|
6776
|
+
### Example
|
6777
|
+
```ruby
|
6778
|
+
# load the gem
|
6779
|
+
require 'ultracart_api'
|
6780
|
+
|
6781
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
6782
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
6783
|
+
api_instance = UltracartClient::StorefrontApi.new_using_api_key(simple_key, false, false)
|
6784
|
+
|
6785
|
+
|
6786
|
+
page_attribute = UltracartClient::StoreFrontPageContentAttribute.new # StoreFrontPageContentAttribute | Page content attribute to upsert
|
6787
|
+
|
6788
|
+
storefront_oid = 56 # Integer |
|
6789
|
+
|
6790
|
+
page_oid = 56 # Integer | The page oid to modify.
|
6791
|
+
|
6792
|
+
|
6793
|
+
begin
|
6794
|
+
#Upsert a page content attribute
|
6795
|
+
api_instance.insert_update_page_content_attribute(page_attribute, storefront_oid, page_oid)
|
6796
|
+
rescue UltracartClient::ApiError => e
|
6797
|
+
puts "Exception when calling StorefrontApi->insert_update_page_content_attribute: #{e}"
|
6798
|
+
end
|
6799
|
+
```
|
6800
|
+
|
6801
|
+
### Parameters
|
6802
|
+
|
6803
|
+
Name | Type | Description | Notes
|
6804
|
+
------------- | ------------- | ------------- | -------------
|
6805
|
+
**page_attribute** | [**StoreFrontPageContentAttribute**](StoreFrontPageContentAttribute.md)| Page content attribute to upsert |
|
6806
|
+
**storefront_oid** | **Integer**| |
|
6807
|
+
**page_oid** | **Integer**| The page oid to modify. |
|
6808
|
+
|
6809
|
+
### Return type
|
6810
|
+
|
6811
|
+
nil (empty response body)
|
6812
|
+
|
6813
|
+
### Authorization
|
6814
|
+
|
6815
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
6816
|
+
|
6817
|
+
### HTTP request headers
|
6818
|
+
|
6819
|
+
- **Content-Type**: application/json; charset=UTF-8
|
6820
|
+
- **Accept**: application/json
|
6821
|
+
|
6822
|
+
|
6823
|
+
|
6768
6824
|
# **prepare_download_email_segment**
|
6769
6825
|
> EmailSegmentDownloadPrepareResponse prepare_download_email_segment(storefront_oid, email_segment_uuid)
|
6770
6826
|
|
@@ -7529,6 +7529,72 @@ module UltracartClient
|
|
7529
7529
|
end
|
7530
7530
|
return data, status_code, headers
|
7531
7531
|
end
|
7532
|
+
# Upsert a page content attribute
|
7533
|
+
# Update a page content attribute, creating it new if it does not yet exist.
|
7534
|
+
# @param page_attribute Page content attribute to upsert
|
7535
|
+
# @param storefront_oid
|
7536
|
+
# @param page_oid The page oid to modify.
|
7537
|
+
# @param [Hash] opts the optional parameters
|
7538
|
+
# @return [nil]
|
7539
|
+
def insert_update_page_content_attribute(page_attribute, storefront_oid, page_oid, opts = {})
|
7540
|
+
insert_update_page_content_attribute_with_http_info(page_attribute, storefront_oid, page_oid, opts)
|
7541
|
+
nil
|
7542
|
+
end
|
7543
|
+
|
7544
|
+
# Upsert a page content attribute
|
7545
|
+
# Update a page content attribute, creating it new if it does not yet exist.
|
7546
|
+
# @param page_attribute Page content attribute to upsert
|
7547
|
+
# @param storefront_oid
|
7548
|
+
# @param page_oid The page oid to modify.
|
7549
|
+
# @param [Hash] opts the optional parameters
|
7550
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
7551
|
+
def insert_update_page_content_attribute_with_http_info(page_attribute, storefront_oid, page_oid, opts = {})
|
7552
|
+
if @api_client.config.debugging
|
7553
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.insert_update_page_content_attribute ...'
|
7554
|
+
end
|
7555
|
+
# verify the required parameter 'page_attribute' is set
|
7556
|
+
if @api_client.config.client_side_validation && page_attribute.nil?
|
7557
|
+
fail ArgumentError, "Missing the required parameter 'page_attribute' when calling StorefrontApi.insert_update_page_content_attribute"
|
7558
|
+
end
|
7559
|
+
# verify the required parameter 'storefront_oid' is set
|
7560
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
7561
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.insert_update_page_content_attribute"
|
7562
|
+
end
|
7563
|
+
# verify the required parameter 'page_oid' is set
|
7564
|
+
if @api_client.config.client_side_validation && page_oid.nil?
|
7565
|
+
fail ArgumentError, "Missing the required parameter 'page_oid' when calling StorefrontApi.insert_update_page_content_attribute"
|
7566
|
+
end
|
7567
|
+
# resource path
|
7568
|
+
local_var_path = '/storefront/{storefront_oid}/pages/{page_oid}/content/attributes'.sub('{' + 'storefront_oid' + '}', storefront_oid.to_s).sub('{' + 'page_oid' + '}', page_oid.to_s)
|
7569
|
+
|
7570
|
+
# query parameters
|
7571
|
+
query_params = {}
|
7572
|
+
|
7573
|
+
# header parameters
|
7574
|
+
header_params = {}
|
7575
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
7576
|
+
# HTTP header 'Accept' (if needed)
|
7577
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
7578
|
+
# HTTP header 'Content-Type'
|
7579
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
7580
|
+
|
7581
|
+
# form parameters
|
7582
|
+
form_params = {}
|
7583
|
+
|
7584
|
+
# http body (model)
|
7585
|
+
post_body = @api_client.object_to_http_body(page_attribute)
|
7586
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
7587
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
7588
|
+
:header_params => header_params,
|
7589
|
+
:query_params => query_params,
|
7590
|
+
:form_params => form_params,
|
7591
|
+
:body => post_body,
|
7592
|
+
:auth_names => auth_names)
|
7593
|
+
if @api_client.config.debugging
|
7594
|
+
@api_client.config.logger.debug "API called: StorefrontApi#insert_update_page_content_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
7595
|
+
end
|
7596
|
+
return data, status_code, headers
|
7597
|
+
end
|
7532
7598
|
# Prepare download of email segment
|
7533
7599
|
# @param storefront_oid
|
7534
7600
|
# @param email_segment_uuid
|
@@ -55,6 +55,10 @@ module UltracartClient
|
|
55
55
|
|
56
56
|
attr_accessor :msclkid
|
57
57
|
|
58
|
+
attr_accessor :short_code
|
59
|
+
|
60
|
+
attr_accessor :short_code_backup
|
61
|
+
|
58
62
|
attr_accessor :ttclid
|
59
63
|
|
60
64
|
attr_accessor :uc_message_id
|
@@ -98,6 +102,8 @@ module UltracartClient
|
|
98
102
|
:'itm_source' => :'itm_source',
|
99
103
|
:'itm_term' => :'itm_term',
|
100
104
|
:'msclkid' => :'msclkid',
|
105
|
+
:'short_code' => :'short_code',
|
106
|
+
:'short_code_backup' => :'short_code_backup',
|
101
107
|
:'ttclid' => :'ttclid',
|
102
108
|
:'uc_message_id' => :'uc_message_id',
|
103
109
|
:'utm_campaign' => :'utm_campaign',
|
@@ -134,6 +140,8 @@ module UltracartClient
|
|
134
140
|
:'itm_source' => :'String',
|
135
141
|
:'itm_term' => :'String',
|
136
142
|
:'msclkid' => :'String',
|
143
|
+
:'short_code' => :'String',
|
144
|
+
:'short_code_backup' => :'BOOLEAN',
|
137
145
|
:'ttclid' => :'String',
|
138
146
|
:'uc_message_id' => :'String',
|
139
147
|
:'utm_campaign' => :'String',
|
@@ -235,6 +243,14 @@ module UltracartClient
|
|
235
243
|
self.msclkid = attributes[:'msclkid']
|
236
244
|
end
|
237
245
|
|
246
|
+
if attributes.has_key?(:'short_code')
|
247
|
+
self.short_code = attributes[:'short_code']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.has_key?(:'short_code_backup')
|
251
|
+
self.short_code_backup = attributes[:'short_code_backup']
|
252
|
+
end
|
253
|
+
|
238
254
|
if attributes.has_key?(:'ttclid')
|
239
255
|
self.ttclid = attributes[:'ttclid']
|
240
256
|
end
|
@@ -314,6 +330,8 @@ module UltracartClient
|
|
314
330
|
itm_source == o.itm_source &&
|
315
331
|
itm_term == o.itm_term &&
|
316
332
|
msclkid == o.msclkid &&
|
333
|
+
short_code == o.short_code &&
|
334
|
+
short_code_backup == o.short_code_backup &&
|
317
335
|
ttclid == o.ttclid &&
|
318
336
|
uc_message_id == o.uc_message_id &&
|
319
337
|
utm_campaign == o.utm_campaign &&
|
@@ -335,7 +353,7 @@ module UltracartClient
|
|
335
353
|
# Calculates hash code according to all attributes.
|
336
354
|
# @return [Fixnum] Hash code
|
337
355
|
def hash
|
338
|
-
[attribution_first_click_subtotal, attribution_first_click_total, attribution_last_click_subtotal, attribution_last_click_total, attribution_linear_subtotal, attribution_linear_total, attribution_position_based_subtotal, attribution_position_based_total, click_dts, facebook_ad_id, fbclid, gbraid, glcid, itm_campaign, itm_content, itm_id, itm_medium, itm_source, itm_term, msclkid, ttclid, uc_message_id, utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term, vmcid, wbraid].hash
|
356
|
+
[attribution_first_click_subtotal, attribution_first_click_total, attribution_last_click_subtotal, attribution_last_click_total, attribution_linear_subtotal, attribution_linear_total, attribution_position_based_subtotal, attribution_position_based_total, click_dts, facebook_ad_id, fbclid, gbraid, glcid, itm_campaign, itm_content, itm_id, itm_medium, itm_source, itm_term, msclkid, short_code, short_code_backup, ttclid, uc_message_id, utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term, vmcid, wbraid].hash
|
339
357
|
end
|
340
358
|
|
341
359
|
# Builds the object from hash
|
@@ -0,0 +1,245 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class StoreFrontPageContentAttribute
|
17
|
+
# Attribute name
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Attribute translated text instance identifier
|
21
|
+
attr_accessor :translated_text_instance_oid
|
22
|
+
|
23
|
+
# Attribute type
|
24
|
+
attr_accessor :type
|
25
|
+
|
26
|
+
# Attribute value
|
27
|
+
attr_accessor :value
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'name' => :'name',
|
33
|
+
:'translated_text_instance_oid' => :'translated_text_instance_oid',
|
34
|
+
:'type' => :'type',
|
35
|
+
:'value' => :'value'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'name' => :'String',
|
43
|
+
:'translated_text_instance_oid' => :'Integer',
|
44
|
+
:'type' => :'String',
|
45
|
+
:'value' => :'String'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'name')
|
58
|
+
self.name = attributes[:'name']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'translated_text_instance_oid')
|
62
|
+
self.translated_text_instance_oid = attributes[:'translated_text_instance_oid']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'type')
|
66
|
+
self.type = attributes[:'type']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'value')
|
70
|
+
self.value = attributes[:'value']
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
if !@name.nil? && @name.to_s.length > 100000
|
79
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100000.')
|
80
|
+
end
|
81
|
+
|
82
|
+
if !@value.nil? && @value.to_s.length > 100000
|
83
|
+
invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 100000.')
|
84
|
+
end
|
85
|
+
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if !@name.nil? && @name.to_s.length > 100000
|
93
|
+
return false if !@value.nil? && @value.to_s.length > 100000
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Custom attribute writer method with validation
|
98
|
+
# @param [Object] name Value to be assigned
|
99
|
+
def name=(name)
|
100
|
+
if !name.nil? && name.to_s.length > 100000
|
101
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100000.'
|
102
|
+
end
|
103
|
+
|
104
|
+
@name = name
|
105
|
+
end
|
106
|
+
|
107
|
+
# Custom attribute writer method with validation
|
108
|
+
# @param [Object] value Value to be assigned
|
109
|
+
def value=(value)
|
110
|
+
if !value.nil? && value.to_s.length > 100000
|
111
|
+
fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 100000.'
|
112
|
+
end
|
113
|
+
|
114
|
+
@value = value
|
115
|
+
end
|
116
|
+
|
117
|
+
# Checks equality by comparing each attribute.
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def ==(o)
|
120
|
+
return true if self.equal?(o)
|
121
|
+
self.class == o.class &&
|
122
|
+
name == o.name &&
|
123
|
+
translated_text_instance_oid == o.translated_text_instance_oid &&
|
124
|
+
type == o.type &&
|
125
|
+
value == o.value
|
126
|
+
end
|
127
|
+
|
128
|
+
# @see the `==` method
|
129
|
+
# @param [Object] Object to be compared
|
130
|
+
def eql?(o)
|
131
|
+
self == o
|
132
|
+
end
|
133
|
+
|
134
|
+
# Calculates hash code according to all attributes.
|
135
|
+
# @return [Fixnum] Hash code
|
136
|
+
def hash
|
137
|
+
[name, translated_text_instance_oid, type, value].hash
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def build_from_hash(attributes)
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
145
|
+
self.class.swagger_types.each_pair do |key, type|
|
146
|
+
if type =~ /\AArray<(.*)>/i
|
147
|
+
# check to ensure the input is an array given that the attribute
|
148
|
+
# is documented as an array but the input is not
|
149
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
150
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
151
|
+
end
|
152
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
153
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
154
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
155
|
+
end
|
156
|
+
|
157
|
+
self
|
158
|
+
end
|
159
|
+
|
160
|
+
# Deserializes the data based on type
|
161
|
+
# @param string type Data type
|
162
|
+
# @param string value Value to be deserialized
|
163
|
+
# @return [Object] Deserialized data
|
164
|
+
def _deserialize(type, value)
|
165
|
+
case type.to_sym
|
166
|
+
when :DateTime
|
167
|
+
DateTime.parse(value)
|
168
|
+
when :Date
|
169
|
+
Date.parse(value)
|
170
|
+
when :String
|
171
|
+
value.to_s
|
172
|
+
when :Integer
|
173
|
+
value.to_i
|
174
|
+
when :Float
|
175
|
+
value.to_f
|
176
|
+
when :BOOLEAN
|
177
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
178
|
+
true
|
179
|
+
else
|
180
|
+
false
|
181
|
+
end
|
182
|
+
when :Object
|
183
|
+
# generic object (usually a Hash), return directly
|
184
|
+
value
|
185
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
186
|
+
inner_type = Regexp.last_match[:inner_type]
|
187
|
+
value.map { |v| _deserialize(inner_type, v) }
|
188
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
189
|
+
k_type = Regexp.last_match[:k_type]
|
190
|
+
v_type = Regexp.last_match[:v_type]
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each do |k, v|
|
193
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
else # model
|
197
|
+
temp_model = UltracartClient.const_get(type).new
|
198
|
+
temp_model.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
next if value.nil?
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
245
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -797,6 +797,7 @@ require 'ultracart_api/models/sovos_config'
|
|
797
797
|
require 'ultracart_api/models/state_province'
|
798
798
|
require 'ultracart_api/models/step_waiting'
|
799
799
|
require 'ultracart_api/models/store_front'
|
800
|
+
require 'ultracart_api/models/store_front_page_content_attribute'
|
800
801
|
require 'ultracart_api/models/store_fronts_response'
|
801
802
|
require 'ultracart_api/models/tax_city'
|
802
803
|
require 'ultracart_api/models/tax_country'
|
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.
|
4
|
+
version: 3.10.217
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -1017,6 +1017,7 @@ files:
|
|
1017
1017
|
- docs/StateProvince.md
|
1018
1018
|
- docs/StepWaiting.md
|
1019
1019
|
- docs/StoreFront.md
|
1020
|
+
- docs/StoreFrontPageContentAttribute.md
|
1020
1021
|
- docs/StoreFrontsResponse.md
|
1021
1022
|
- docs/StorefrontApi.md
|
1022
1023
|
- docs/TaxApi.md
|
@@ -1902,6 +1903,7 @@ files:
|
|
1902
1903
|
- lib/ultracart_api/models/state_province.rb
|
1903
1904
|
- lib/ultracart_api/models/step_waiting.rb
|
1904
1905
|
- lib/ultracart_api/models/store_front.rb
|
1906
|
+
- lib/ultracart_api/models/store_front_page_content_attribute.rb
|
1905
1907
|
- lib/ultracart_api/models/store_fronts_response.rb
|
1906
1908
|
- lib/ultracart_api/models/tax_city.rb
|
1907
1909
|
- lib/ultracart_api/models/tax_country.rb
|