ultracart_api 4.0.233 → 4.0.234

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7eda8f9a108d45d08d32ab57b4e01e3e6a6d3d9a0472cddd859c0fe10529cc9
4
- data.tar.gz: 423faba5d6371d12c354748fee0392a5bef21a1c710ff6c129b8e85df5e76107
3
+ metadata.gz: 23d5be590b4bf7a36dcf6313bbd404c8b1d2e51f5256575805db218525b4e3d0
4
+ data.tar.gz: 8dd1b4aeb6e8421abc2832b3c0fbc0fa22f945fb641b95d38cff48e5a7b6d127
5
5
  SHA512:
6
- metadata.gz: 9d9578b8fd7d92f3fb576983df6a0d4ba3d8b5cade03340f69ca054f437aab2e22aef00b4e2f608509a3e63797ab0bea3bd158e576beee5a6fcc14d70171dc75
7
- data.tar.gz: 212159a9dfff112ff55f5b58ce22bcfdd2c3c90e0eb725ac1e817c0e0fdf67cf057fc06f1a68391bb4686a35972486a4b5722ce2e70ea9005283354cddcbcc50
6
+ metadata.gz: e253d990403d8144e8c2427164f6d20904c6d46af6cac4cb33f4ce9b653c705ecd31697bddd6ace38354b7c1c4ffbdda5e15e26656bfb62c230bf354a430cbe0
7
+ data.tar.gz: ae097f3f3abac02f14e46246af596ffbc57b39d863791f5ab1859eb90e69b39d0f26165cd64a9d7b61f63fd2b32febca499857ba27bb4929d1b2f2d2e3a0f6c5
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
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.0.233
10
+ - Package version: 4.0.234
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.233.gem
27
+ gem install ./ultracart_api-4.0.234.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.233.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.234.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.233'
36
+ gem 'ultracart_api', '~> 4.0.234'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -479,6 +479,7 @@ Class | Method | HTTP request | Description
479
479
  *UltracartClient::StorefrontApi* | [**insert_email_postcard**](docs/StorefrontApi.md#insert_email_postcard) | **POST** /storefront/{storefront_oid}/email/postcards | Insert email postcard
480
480
  *UltracartClient::StorefrontApi* | [**insert_email_segment**](docs/StorefrontApi.md#insert_email_segment) | **POST** /storefront/{storefront_oid}/email/segments | Insert email segment
481
481
  *UltracartClient::StorefrontApi* | [**insert_screen_recording_segment**](docs/StorefrontApi.md#insert_screen_recording_segment) | **POST** /storefront/{storefront_oid}/screen_recordings/segments | Insert screen recording segment
482
+ *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
482
483
  *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
483
484
  *UltracartClient::StorefrontApi* | [**publish_library_item**](docs/StorefrontApi.md#publish_library_item) | **POST** /storefront/code_library/{library_item_oid}/publish | Publish library item.
484
485
  *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
@@ -1369,6 +1370,7 @@ Class | Method | HTTP request | Description
1369
1370
  - [UltracartClient::StateProvince](docs/StateProvince.md)
1370
1371
  - [UltracartClient::StepWaiting](docs/StepWaiting.md)
1371
1372
  - [UltracartClient::StoreFront](docs/StoreFront.md)
1373
+ - [UltracartClient::StoreFrontPageContentAttribute](docs/StoreFrontPageContentAttribute.md)
1372
1374
  - [UltracartClient::StoreFrontsResponse](docs/StoreFrontsResponse.md)
1373
1375
  - [UltracartClient::TaxCity](docs/TaxCity.md)
1374
1376
  - [UltracartClient::TaxCountry](docs/TaxCountry.md)
@@ -1518,6 +1520,7 @@ Not every change is committed to every SDK.
1518
1520
 
1519
1521
  | Version | Date | Comments |
1520
1522
  | --: | :-: | --- |
1523
+ | 4.0.234 | 10/24/2024 | storefront page attribute edit method |
1521
1524
  | 4.0.233 | 09/18/2024 | order payment constant for PayPal Fastlane |
1522
1525
  | 4.0.232 | 08/29/2024 | add hold_for_transmission to item shipping object |
1523
1526
  | 4.0.231 | 08/08/2024 | added query_target to OrderApi.getOrdersBatch to allow cache usage |
data/docs/OrderUtm.md CHANGED
@@ -24,6 +24,8 @@
24
24
  | **itm_source** | **String** | | [optional] |
25
25
  | **itm_term** | **String** | | [optional] |
26
26
  | **msclkid** | **String** | | [optional] |
27
+ | **short_code** | **String** | | [optional] |
28
+ | **short_code_backup** | **Boolean** | | [optional] |
27
29
  | **ttclid** | **String** | | [optional] |
28
30
  | **uc_message_id** | **String** | | [optional] |
29
31
  | **utm_campaign** | **String** | | [optional] |
@@ -61,6 +63,8 @@ instance = UltracartClient::OrderUtm.new(
61
63
  itm_source: null,
62
64
  itm_term: null,
63
65
  msclkid: null,
66
+ short_code: null,
67
+ short_code_backup: null,
64
68
  ttclid: null,
65
69
  uc_message_id: null,
66
70
  utm_campaign: null,
@@ -0,0 +1,24 @@
1
+ # UltracartClient::StoreFrontPageContentAttribute
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Attribute name | [optional] |
8
+ | **translated_text_instance_oid** | **Integer** | Attribute translated text instance identifier | [optional] |
9
+ | **type** | **String** | Attribute type | [optional] |
10
+ | **value** | **String** | Attribute value | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ultracart_api'
16
+
17
+ instance = UltracartClient::StoreFrontPageContentAttribute.new(
18
+ name: null,
19
+ translated_text_instance_oid: null,
20
+ type: null,
21
+ value: null
22
+ )
23
+ ```
24
+
@@ -133,6 +133,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
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 |
@@ -9391,6 +9392,80 @@ end
9391
9392
  - **Accept**: application/json
9392
9393
 
9393
9394
 
9395
+ ## insert_update_page_content_attribute
9396
+
9397
+ > insert_update_page_content_attribute(storefront_oid, page_oid, page_attribute)
9398
+
9399
+ Upsert a page content attribute
9400
+
9401
+ Update a page content attribute, creating it new if it does not yet exist.
9402
+
9403
+ ### Examples
9404
+
9405
+ ```ruby
9406
+ require 'time'
9407
+ require 'ultracart_api'
9408
+ require 'json'
9409
+ require 'yaml'
9410
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
9411
+
9412
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
9413
+ # As such, this might not be the best way to use this object.
9414
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
9415
+
9416
+ api = UltracartClient::StorefrontApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
9417
+ storefront_oid = 56 # Integer |
9418
+ page_oid = 56 # Integer | The page oid to modify.
9419
+ page_attribute = UltracartClient::StoreFrontPageContentAttribute.new # StoreFrontPageContentAttribute | Page content attribute to upsert
9420
+
9421
+ begin
9422
+ # Upsert a page content attribute
9423
+ api_instance.insert_update_page_content_attribute(storefront_oid, page_oid, page_attribute)
9424
+ rescue UltracartClient::ApiError => e
9425
+ puts "Error when calling StorefrontApi->insert_update_page_content_attribute: #{e}"
9426
+ end
9427
+ ```
9428
+
9429
+ #### Using the insert_update_page_content_attribute_with_http_info variant
9430
+
9431
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
9432
+
9433
+ > <Array(nil, Integer, Hash)> insert_update_page_content_attribute_with_http_info(storefront_oid, page_oid, page_attribute)
9434
+
9435
+ ```ruby
9436
+ begin
9437
+ # Upsert a page content attribute
9438
+ data, status_code, headers = api_instance.insert_update_page_content_attribute_with_http_info(storefront_oid, page_oid, page_attribute)
9439
+ p status_code # => 2xx
9440
+ p headers # => { ... }
9441
+ p data # => nil
9442
+ rescue UltracartClient::ApiError => e
9443
+ puts "Error when calling StorefrontApi->insert_update_page_content_attribute_with_http_info: #{e}"
9444
+ end
9445
+ ```
9446
+
9447
+ ### Parameters
9448
+
9449
+ | Name | Type | Description | Notes |
9450
+ | ---- | ---- | ----------- | ----- |
9451
+ | **storefront_oid** | **Integer** | | |
9452
+ | **page_oid** | **Integer** | The page oid to modify. | |
9453
+ | **page_attribute** | [**StoreFrontPageContentAttribute**](StoreFrontPageContentAttribute.md) | Page content attribute to upsert | |
9454
+
9455
+ ### Return type
9456
+
9457
+ nil (empty response body)
9458
+
9459
+ ### Authorization
9460
+
9461
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
9462
+
9463
+ ### HTTP request headers
9464
+
9465
+ - **Content-Type**: application/json; charset=UTF-8
9466
+ - **Accept**: application/json
9467
+
9468
+
9394
9469
  ## prepare_download_email_segment
9395
9470
 
9396
9471
  > <EmailSegmentDownloadPrepareResponse> prepare_download_email_segment(storefront_oid, email_segment_uuid)
@@ -8853,6 +8853,87 @@ module UltracartClient
8853
8853
  return data, status_code, headers
8854
8854
  end
8855
8855
 
8856
+ # Upsert a page content attribute
8857
+ # Update a page content attribute, creating it new if it does not yet exist.
8858
+ # @param storefront_oid [Integer]
8859
+ # @param page_oid [Integer] The page oid to modify.
8860
+ # @param page_attribute [StoreFrontPageContentAttribute] Page content attribute to upsert
8861
+ # @param [Hash] opts the optional parameters
8862
+ # @return [nil]
8863
+ def insert_update_page_content_attribute(storefront_oid, page_oid, page_attribute, opts = {})
8864
+ insert_update_page_content_attribute_with_http_info(storefront_oid, page_oid, page_attribute, opts)
8865
+ nil
8866
+ end
8867
+
8868
+ # Upsert a page content attribute
8869
+ # Update a page content attribute, creating it new if it does not yet exist.
8870
+ # @param storefront_oid [Integer]
8871
+ # @param page_oid [Integer] The page oid to modify.
8872
+ # @param page_attribute [StoreFrontPageContentAttribute] Page content attribute to upsert
8873
+ # @param [Hash] opts the optional parameters
8874
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
8875
+ def insert_update_page_content_attribute_with_http_info(storefront_oid, page_oid, page_attribute, opts = {})
8876
+ if @api_client.config.debugging
8877
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.insert_update_page_content_attribute ...'
8878
+ end
8879
+ # verify the required parameter 'storefront_oid' is set
8880
+ if @api_client.config.client_side_validation && storefront_oid.nil?
8881
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.insert_update_page_content_attribute"
8882
+ end
8883
+ # verify the required parameter 'page_oid' is set
8884
+ if @api_client.config.client_side_validation && page_oid.nil?
8885
+ fail ArgumentError, "Missing the required parameter 'page_oid' when calling StorefrontApi.insert_update_page_content_attribute"
8886
+ end
8887
+ # verify the required parameter 'page_attribute' is set
8888
+ if @api_client.config.client_side_validation && page_attribute.nil?
8889
+ fail ArgumentError, "Missing the required parameter 'page_attribute' when calling StorefrontApi.insert_update_page_content_attribute"
8890
+ end
8891
+ # resource path
8892
+ local_var_path = '/storefront/{storefront_oid}/pages/{page_oid}/content/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'page_oid' + '}', CGI.escape(page_oid.to_s))
8893
+
8894
+ # query parameters
8895
+ query_params = opts[:query_params] || {}
8896
+
8897
+ # header parameters
8898
+ header_params = opts[:header_params] || {}
8899
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
8900
+ # HTTP header 'Accept' (if needed)
8901
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
8902
+ # HTTP header 'Content-Type'
8903
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
8904
+ if !content_type.nil?
8905
+ header_params['Content-Type'] = content_type
8906
+ end
8907
+
8908
+ # form parameters
8909
+ form_params = opts[:form_params] || {}
8910
+
8911
+ # http body (model)
8912
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(page_attribute)
8913
+
8914
+ # return_type
8915
+ return_type = opts[:debug_return_type]
8916
+
8917
+ # auth_names
8918
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
8919
+
8920
+ new_options = opts.merge(
8921
+ :operation => :"StorefrontApi.insert_update_page_content_attribute",
8922
+ :header_params => header_params,
8923
+ :query_params => query_params,
8924
+ :form_params => form_params,
8925
+ :body => post_body,
8926
+ :auth_names => auth_names,
8927
+ :return_type => return_type
8928
+ )
8929
+
8930
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
8931
+ if @api_client.config.debugging
8932
+ @api_client.config.logger.debug "API called: StorefrontApi#insert_update_page_content_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
8933
+ end
8934
+ return data, status_code, headers
8935
+ end
8936
+
8856
8937
  # Prepare download of email segment
8857
8938
  # @param storefront_oid [Integer]
8858
8939
  # @param email_segment_uuid [String]
@@ -56,6 +56,10 @@ module UltracartClient
56
56
 
57
57
  attr_accessor :msclkid
58
58
 
59
+ attr_accessor :short_code
60
+
61
+ attr_accessor :short_code_backup
62
+
59
63
  attr_accessor :ttclid
60
64
 
61
65
  attr_accessor :uc_message_id
@@ -99,6 +103,8 @@ module UltracartClient
99
103
  :'itm_source' => :'itm_source',
100
104
  :'itm_term' => :'itm_term',
101
105
  :'msclkid' => :'msclkid',
106
+ :'short_code' => :'short_code',
107
+ :'short_code_backup' => :'short_code_backup',
102
108
  :'ttclid' => :'ttclid',
103
109
  :'uc_message_id' => :'uc_message_id',
104
110
  :'utm_campaign' => :'utm_campaign',
@@ -140,6 +146,8 @@ module UltracartClient
140
146
  :'itm_source' => :'String',
141
147
  :'itm_term' => :'String',
142
148
  :'msclkid' => :'String',
149
+ :'short_code' => :'String',
150
+ :'short_code_backup' => :'Boolean',
143
151
  :'ttclid' => :'String',
144
152
  :'uc_message_id' => :'String',
145
153
  :'utm_campaign' => :'String',
@@ -254,6 +262,14 @@ module UltracartClient
254
262
  self.msclkid = attributes[:'msclkid']
255
263
  end
256
264
 
265
+ if attributes.key?(:'short_code')
266
+ self.short_code = attributes[:'short_code']
267
+ end
268
+
269
+ if attributes.key?(:'short_code_backup')
270
+ self.short_code_backup = attributes[:'short_code_backup']
271
+ end
272
+
257
273
  if attributes.key?(:'ttclid')
258
274
  self.ttclid = attributes[:'ttclid']
259
275
  end
@@ -333,6 +349,8 @@ module UltracartClient
333
349
  itm_source == o.itm_source &&
334
350
  itm_term == o.itm_term &&
335
351
  msclkid == o.msclkid &&
352
+ short_code == o.short_code &&
353
+ short_code_backup == o.short_code_backup &&
336
354
  ttclid == o.ttclid &&
337
355
  uc_message_id == o.uc_message_id &&
338
356
  utm_campaign == o.utm_campaign &&
@@ -354,7 +372,7 @@ module UltracartClient
354
372
  # Calculates hash code according to all attributes.
355
373
  # @return [Integer] Hash code
356
374
  def hash
357
- [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
375
+ [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
358
376
  end
359
377
 
360
378
  # 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 StoreFrontPageContentAttribute
18
+ # Attribute name
19
+ attr_accessor :name
20
+
21
+ # Attribute translated text instance identifier
22
+ attr_accessor :translated_text_instance_oid
23
+
24
+ # Attribute type
25
+ attr_accessor :type
26
+
27
+ # Attribute value
28
+ attr_accessor :value
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'name' => :'name',
34
+ :'translated_text_instance_oid' => :'translated_text_instance_oid',
35
+ :'type' => :'type',
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
+ :'name' => :'String',
49
+ :'translated_text_instance_oid' => :'Integer',
50
+ :'type' => :'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::StoreFrontPageContentAttribute` 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::StoreFrontPageContentAttribute`. 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?(:'name')
77
+ self.name = attributes[:'name']
78
+ end
79
+
80
+ if attributes.key?(:'translated_text_instance_oid')
81
+ self.translated_text_instance_oid = attributes[:'translated_text_instance_oid']
82
+ end
83
+
84
+ if attributes.key?(:'type')
85
+ self.type = attributes[:'type']
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 > 100000
98
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100000.')
99
+ end
100
+
101
+ if !@value.nil? && @value.to_s.length > 100000
102
+ invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 100000.')
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 > 100000
112
+ return false if !@value.nil? && @value.to_s.length > 100000
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 > 100000
120
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100000.'
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 > 100000
130
+ fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 100000.'
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
+ name == o.name &&
142
+ translated_text_instance_oid == o.translated_text_instance_oid &&
143
+ type == o.type &&
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
+ [name, translated_text_instance_oid, type, 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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.233'
14
+ VERSION = '4.0.234'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -796,6 +796,7 @@ require 'ultracart_api/models/sovos_config'
796
796
  require 'ultracart_api/models/state_province'
797
797
  require 'ultracart_api/models/step_waiting'
798
798
  require 'ultracart_api/models/store_front'
799
+ require 'ultracart_api/models/store_front_page_content_attribute'
799
800
  require 'ultracart_api/models/store_fronts_response'
800
801
  require 'ultracart_api/models/tax_city'
801
802
  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: 4.0.233
4
+ version: 4.0.234
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-18 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -856,6 +856,7 @@ files:
856
856
  - docs/StateProvince.md
857
857
  - docs/StepWaiting.md
858
858
  - docs/StoreFront.md
859
+ - docs/StoreFrontPageContentAttribute.md
859
860
  - docs/StoreFrontsResponse.md
860
861
  - docs/StorefrontApi.md
861
862
  - docs/TaxApi.md
@@ -1740,6 +1741,7 @@ files:
1740
1741
  - lib/ultracart_api/models/state_province.rb
1741
1742
  - lib/ultracart_api/models/step_waiting.rb
1742
1743
  - lib/ultracart_api/models/store_front.rb
1744
+ - lib/ultracart_api/models/store_front_page_content_attribute.rb
1743
1745
  - lib/ultracart_api/models/store_fronts_response.rb
1744
1746
  - lib/ultracart_api/models/tax_city.rb
1745
1747
  - lib/ultracart_api/models/tax_country.rb