ultracart_api 4.1.220 → 4.1.221

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: d9f468a5a838e0757e3d1c52895907d01171a84e8c78886210c10a23ef59c2d4
4
- data.tar.gz: 585ebaf78936ba8ca36c7f42737e08825d35bc06eeeaa85dfe32e8fdcd79ce06
3
+ metadata.gz: 4267bcfb9ff75c959b4bcb691612a889458a32f1bb98c34f2930c02f591ab493
4
+ data.tar.gz: 8350f1778b128b70b8fe74fe40513082f5eab243ef11ce7f701b6849e6a61892
5
5
  SHA512:
6
- metadata.gz: c49285cea1818a391a316891abf1916c0a9aedfd1b936c9b49df28f261743607c742d9e249b25577fdf7dfdf6fc5dc2b1eb8f0c36eb91e434101d2e059a5ef03
7
- data.tar.gz: 36ce759345a12d073a59301cc2dbbfea1f2ac943842b42c41c51967d0f0f82832a9a457c910b6c187ee9e9fb308d2638ab0d159f0dfb513fa932aa76f442aeb2
6
+ metadata.gz: a1aea1e4700ef49b020d24e0ba38ccc8172b37d4f8d87eba25070c0823323f61b9e075ca777a75ee74171471bbb52c390a37d01d2667186e23287328d5c3f8f3
7
+ data.tar.gz: b587b333770e47e1d8e7b0018b3c025f560c7e952d22b43ca0c58cf875834d9b7d6cce4b57d99908cd85a05a40713c7ab607797f7de87c648a255b03790443e2
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.220
10
+ - Package version: 4.1.221
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.220'
19
+ gem 'ultracart_api', '4.1.221'
20
20
  ```
21
21
 
22
22
  install:
@@ -623,6 +623,7 @@ Class | Method | HTTP request | Description
623
623
  *UltracartClient::SfvbApi* | [**list_sfvb_upsell_paths**](docs/SfvbApi.md#list_sfvb_upsell_paths) | **GET** /sfvb/storefronts/{storefront_oid}/upsell_paths | List upsell paths
624
624
  *UltracartClient::SfvbApi* | [**move_sfvb_sequence_step**](docs/SfvbApi.md#move_sfvb_sequence_step) | **POST** /sfvb/storefronts/{storefront_oid}/sequences/{sequence_uuid}/steps/{step_uuid}/move | Move one step
625
625
  *UltracartClient::SfvbApi* | [**move_sfvb_upsell_path**](docs/SfvbApi.md#move_sfvb_upsell_path) | **POST** /sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/move | Move an upsell path
626
+ *UltracartClient::SfvbApi* | [**proof_sfvb_sequence_postcard**](docs/SfvbApi.md#proof_sfvb_sequence_postcard) | **POST** /sfvb/storefronts/{storefront_oid}/sequences/{sequence_uuid}/steps/{step_uuid}/postcard_proof | Proof a postcard step without mailing it
626
627
  *UltracartClient::SfvbApi* | [**publish_sfvb_library_entry**](docs/SfvbApi.md#publish_sfvb_library_entry) | **POST** /sfvb/storefronts/{storefront_oid}/library/{library_oid}/publish | Publish a library entry's draft
627
628
  *UltracartClient::SfvbApi* | [**put_sfvb_container**](docs/SfvbApi.md#put_sfvb_container) | **PUT** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id} | Write a container stored outside the file system
628
629
  *UltracartClient::SfvbApi* | [**put_sfvb_experiment_variation**](docs/SfvbApi.md#put_sfvb_experiment_variation) | **PUT** /sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid}/variations/{variation_number} | Pause or resume a variation
@@ -2084,6 +2085,8 @@ Class | Method | HTTP request | Description
2084
2085
  - [UltracartClient::SfvbPageSelectors](docs/SfvbPageSelectors.md)
2085
2086
  - [UltracartClient::SfvbPageSettingsRequest](docs/SfvbPageSettingsRequest.md)
2086
2087
  - [UltracartClient::SfvbPageSummary](docs/SfvbPageSummary.md)
2088
+ - [UltracartClient::SfvbPostcardProofRequest](docs/SfvbPostcardProofRequest.md)
2089
+ - [UltracartClient::SfvbPostcardProofResponse](docs/SfvbPostcardProofResponse.md)
2087
2090
  - [UltracartClient::SfvbPreviewAccessRequest](docs/SfvbPreviewAccessRequest.md)
2088
2091
  - [UltracartClient::SfvbPreviewAccessResponse](docs/SfvbPreviewAccessResponse.md)
2089
2092
  - [UltracartClient::SfvbPreviewSessionRequest](docs/SfvbPreviewSessionRequest.md)
@@ -2349,6 +2352,7 @@ Not every change is committed to every SDK.
2349
2352
 
2350
2353
  | Version | Date | Comments |
2351
2354
  | --: | :-: | --- |
2355
+ | 4.1.221 | 11/02/2026 | sfvb internal testing |
2352
2356
  | 4.1.220 | 11/02/2026 | sfvb internal testing |
2353
2357
  | 4.1.219 | 10/30/2026 | item - field for hsa/fsa eligibility |
2354
2358
  | 4.1.218 | 10/30/2026 | svfb internal testing |
data/docs/SfvbApi.md CHANGED
@@ -151,6 +151,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
151
151
  | [**list_sfvb_upsell_paths**](SfvbApi.md#list_sfvb_upsell_paths) | **GET** /sfvb/storefronts/{storefront_oid}/upsell_paths | List upsell paths |
152
152
  | [**move_sfvb_sequence_step**](SfvbApi.md#move_sfvb_sequence_step) | **POST** /sfvb/storefronts/{storefront_oid}/sequences/{sequence_uuid}/steps/{step_uuid}/move | Move one step |
153
153
  | [**move_sfvb_upsell_path**](SfvbApi.md#move_sfvb_upsell_path) | **POST** /sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/move | Move an upsell path |
154
+ | [**proof_sfvb_sequence_postcard**](SfvbApi.md#proof_sfvb_sequence_postcard) | **POST** /sfvb/storefronts/{storefront_oid}/sequences/{sequence_uuid}/steps/{step_uuid}/postcard_proof | Proof a postcard step without mailing it |
154
155
  | [**publish_sfvb_library_entry**](SfvbApi.md#publish_sfvb_library_entry) | **POST** /sfvb/storefronts/{storefront_oid}/library/{library_oid}/publish | Publish a library entry's draft |
155
156
  | [**put_sfvb_container**](SfvbApi.md#put_sfvb_container) | **PUT** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id} | Write a container stored outside the file system |
156
157
  | [**put_sfvb_experiment_variation**](SfvbApi.md#put_sfvb_experiment_variation) | **PUT** /sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid}/variations/{variation_number} | Pause or resume a variation |
@@ -8214,6 +8215,62 @@ end
8214
8215
  - **Accept**: application/json
8215
8216
 
8216
8217
 
8218
+ ## proof_sfvb_sequence_postcard
8219
+
8220
+ > <SfvbPostcardProofResponse> proof_sfvb_sequence_postcard(storefront_oid, sequence_uuid, step_uuid, postcard_proof_request)
8221
+
8222
+ Proof a postcard step without mailing it
8223
+
8224
+ Renders both sides of the step's postcard as a send renders them, then has the print vendor render the card as a dry run. Returns the HTML of each side, the PNG image of each side that the vendor prints from, the vendor's thumbnails and its proof PDF. The QR code is the short link a send prints. No card is printed or mailed, nothing is billed, the step is not changed, and no coupon is created. A unique coupon code shows as PREVIEW-UNIQUE. The image urls are public. html_only returns the HTML alone, with no vendor render. An order must be a test order. cart_item_ids fills the cart a cart flow card shows. Works whether the step is on or off.
8225
+
8226
+
8227
+ ### Examples
8228
+
8229
+
8230
+ (No example for this operation).
8231
+
8232
+
8233
+ #### Using the proof_sfvb_sequence_postcard_with_http_info variant
8234
+
8235
+ This returns an Array which contains the response data, status code and headers.
8236
+
8237
+ > <Array(<SfvbPostcardProofResponse>, Integer, Hash)> proof_sfvb_sequence_postcard_with_http_info(storefront_oid, sequence_uuid, step_uuid, postcard_proof_request)
8238
+
8239
+ ```ruby
8240
+ begin
8241
+ # Proof a postcard step without mailing it
8242
+ data, status_code, headers = api_instance.proof_sfvb_sequence_postcard_with_http_info(storefront_oid, sequence_uuid, step_uuid, postcard_proof_request)
8243
+ p status_code # => 2xx
8244
+ p headers # => { ... }
8245
+ p data # => <SfvbPostcardProofResponse>
8246
+ rescue UltracartClient::ApiError => e
8247
+ puts "Error when calling SfvbApi->proof_sfvb_sequence_postcard_with_http_info: #{e}"
8248
+ end
8249
+ ```
8250
+
8251
+ ### Parameters
8252
+
8253
+ | Name | Type | Description | Notes |
8254
+ | ---- | ---- | ----------- | ----- |
8255
+ | **storefront_oid** | **Integer** | | |
8256
+ | **sequence_uuid** | **String** | | |
8257
+ | **step_uuid** | **String** | | |
8258
+ | **postcard_proof_request** | [**SfvbPostcardProofRequest**](SfvbPostcardProofRequest.md) | Who the card is addressed to, and the order or cart it shows | |
8259
+
8260
+ ### Return type
8261
+
8262
+ [**SfvbPostcardProofResponse**](SfvbPostcardProofResponse.md)
8263
+
8264
+ ### Authorization
8265
+
8266
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
8267
+
8268
+ ### HTTP request headers
8269
+
8270
+ - **Content-Type**: application/json
8271
+ - **Accept**: application/json
8272
+
8273
+
8217
8274
  ## publish_sfvb_library_entry
8218
8275
 
8219
8276
  > <SfvbLibraryEntry> publish_sfvb_library_entry(storefront_oid, library_oid, if_match, publish_request)
@@ -0,0 +1,34 @@
1
+ # UltracartClient::SfvbPostcardProofRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **address1** | **String** | The recipient street address. Without address1, city, state and postal_code, a sample address is used. | [optional] |
8
+ | **address2** | **String** | The recipient second address line. | [optional] |
9
+ | **cart_item_ids** | **Array&lt;String&gt;** | Item ids for the cart a cart flow card renders with. The cart is made for the proof and deleted after it. | [optional] |
10
+ | **city** | **String** | The recipient city. | [optional] |
11
+ | **customer_name** | **String** | The recipient name the card greets and is addressed to. Defaults to the signed in user. | [optional] |
12
+ | **html_only** | **Boolean** | True to return only the rendered HTML of both sides, with no print vendor render. The default, false, also returns the images that would print and the vendor proof PDF. | [optional] |
13
+ | **order_id** | **String** | A test order for an order flow card. Real orders are refused. Without one, an order flow card renders with a made up order. | [optional] |
14
+ | **postal_code** | **String** | The recipient postal code. | [optional] |
15
+ | **state** | **String** | The recipient state. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ultracart_api'
21
+
22
+ instance = UltracartClient::SfvbPostcardProofRequest.new(
23
+ address1: null,
24
+ address2: null,
25
+ cart_item_ids: null,
26
+ city: null,
27
+ customer_name: null,
28
+ html_only: null,
29
+ order_id: null,
30
+ postal_code: null,
31
+ state: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,38 @@
1
+ # UltracartClient::SfvbPostcardProofResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **back_html** | **String** | The back as the send renders it, after the name tokens are filled. | [optional] |
8
+ | **back_image_url** | **String** | The back as the PNG image the print vendor prints from. A public url. | [optional] |
9
+ | **back_thumbnail_url** | **String** | The print vendor thumbnail of the back. | [optional] |
10
+ | **front_html** | **String** | The front as the send renders it, after the name tokens are filled. | [optional] |
11
+ | **front_image_url** | **String** | The front as the PNG image the print vendor prints from. A public url. | [optional] |
12
+ | **front_thumbnail_url** | **String** | The print vendor thumbnail of the front. | [optional] |
13
+ | **order_source** | **String** | Where the order came from. test for the order_id given, dummy for a made up one, none for no order. | [optional] |
14
+ | **postcard_uuid** | **String** | The postcard the step mails. | [optional] |
15
+ | **rendered_pdf_url** | **String** | The print vendor proof PDF of both sides. | [optional] |
16
+ | **vendor_rendered** | **Boolean** | True when the print vendor rendered the card, so the image and PDF urls are set. | [optional] |
17
+ | **warnings** | [**Array&lt;SfvbErrorDetail&gt;**](SfvbErrorDetail.md) | Where the proof differs from a send, such as a placeholder coupon code or a sample address, and anything that would make a send skip the card. | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'ultracart_api'
23
+
24
+ instance = UltracartClient::SfvbPostcardProofResponse.new(
25
+ back_html: null,
26
+ back_image_url: null,
27
+ back_thumbnail_url: null,
28
+ front_html: null,
29
+ front_image_url: null,
30
+ front_thumbnail_url: null,
31
+ order_source: null,
32
+ postcard_uuid: null,
33
+ rendered_pdf_url: null,
34
+ vendor_rendered: null,
35
+ warnings: null
36
+ )
37
+ ```
38
+
@@ -10583,6 +10583,93 @@ module UltracartClient
10583
10583
  return data, status_code, headers
10584
10584
  end
10585
10585
 
10586
+ # Proof a postcard step without mailing it
10587
+ # Renders both sides of the step's postcard as a send renders them, then has the print vendor render the card as a dry run. Returns the HTML of each side, the PNG image of each side that the vendor prints from, the vendor's thumbnails and its proof PDF. The QR code is the short link a send prints. No card is printed or mailed, nothing is billed, the step is not changed, and no coupon is created. A unique coupon code shows as PREVIEW-UNIQUE. The image urls are public. html_only returns the HTML alone, with no vendor render. An order must be a test order. cart_item_ids fills the cart a cart flow card shows. Works whether the step is on or off.
10588
+ # @param storefront_oid [Integer]
10589
+ # @param sequence_uuid [String]
10590
+ # @param step_uuid [String]
10591
+ # @param postcard_proof_request [SfvbPostcardProofRequest] Who the card is addressed to, and the order or cart it shows
10592
+ # @param [Hash] opts the optional parameters
10593
+ # @return [SfvbPostcardProofResponse]
10594
+ def proof_sfvb_sequence_postcard(storefront_oid, sequence_uuid, step_uuid, postcard_proof_request, opts = {})
10595
+ data, _status_code, _headers = proof_sfvb_sequence_postcard_with_http_info(storefront_oid, sequence_uuid, step_uuid, postcard_proof_request, opts)
10596
+ data
10597
+ end
10598
+
10599
+ # Proof a postcard step without mailing it
10600
+ # Renders both sides of the step&#39;s postcard as a send renders them, then has the print vendor render the card as a dry run. Returns the HTML of each side, the PNG image of each side that the vendor prints from, the vendor&#39;s thumbnails and its proof PDF. The QR code is the short link a send prints. No card is printed or mailed, nothing is billed, the step is not changed, and no coupon is created. A unique coupon code shows as PREVIEW-UNIQUE. The image urls are public. html_only returns the HTML alone, with no vendor render. An order must be a test order. cart_item_ids fills the cart a cart flow card shows. Works whether the step is on or off.
10601
+ # @param storefront_oid [Integer]
10602
+ # @param sequence_uuid [String]
10603
+ # @param step_uuid [String]
10604
+ # @param postcard_proof_request [SfvbPostcardProofRequest] Who the card is addressed to, and the order or cart it shows
10605
+ # @param [Hash] opts the optional parameters
10606
+ # @return [Array<(SfvbPostcardProofResponse, Integer, Hash)>] SfvbPostcardProofResponse data, response status code and response headers
10607
+ def proof_sfvb_sequence_postcard_with_http_info(storefront_oid, sequence_uuid, step_uuid, postcard_proof_request, opts = {})
10608
+ if @api_client.config.debugging
10609
+ @api_client.config.logger.debug 'Calling API: SfvbApi.proof_sfvb_sequence_postcard ...'
10610
+ end
10611
+ # verify the required parameter 'storefront_oid' is set
10612
+ if @api_client.config.client_side_validation && storefront_oid.nil?
10613
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.proof_sfvb_sequence_postcard"
10614
+ end
10615
+ # verify the required parameter 'sequence_uuid' is set
10616
+ if @api_client.config.client_side_validation && sequence_uuid.nil?
10617
+ fail ArgumentError, "Missing the required parameter 'sequence_uuid' when calling SfvbApi.proof_sfvb_sequence_postcard"
10618
+ end
10619
+ # verify the required parameter 'step_uuid' is set
10620
+ if @api_client.config.client_side_validation && step_uuid.nil?
10621
+ fail ArgumentError, "Missing the required parameter 'step_uuid' when calling SfvbApi.proof_sfvb_sequence_postcard"
10622
+ end
10623
+ # verify the required parameter 'postcard_proof_request' is set
10624
+ if @api_client.config.client_side_validation && postcard_proof_request.nil?
10625
+ fail ArgumentError, "Missing the required parameter 'postcard_proof_request' when calling SfvbApi.proof_sfvb_sequence_postcard"
10626
+ end
10627
+ # resource path
10628
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/sequences/{sequence_uuid}/steps/{step_uuid}/postcard_proof'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'sequence_uuid' + '}', CGI.escape(sequence_uuid.to_s)).sub('{' + 'step_uuid' + '}', CGI.escape(step_uuid.to_s))
10629
+
10630
+ # query parameters
10631
+ query_params = opts[:query_params] || {}
10632
+
10633
+ # header parameters
10634
+ header_params = opts[:header_params] || {}
10635
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
10636
+ # HTTP header 'Accept' (if needed)
10637
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
10638
+ # HTTP header 'Content-Type'
10639
+ content_type = @api_client.select_header_content_type(['application/json'])
10640
+ if !content_type.nil?
10641
+ header_params['Content-Type'] = content_type
10642
+ end
10643
+
10644
+ # form parameters
10645
+ form_params = opts[:form_params] || {}
10646
+
10647
+ # http body (model)
10648
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(postcard_proof_request)
10649
+
10650
+ # return_type
10651
+ return_type = opts[:debug_return_type] || 'SfvbPostcardProofResponse'
10652
+
10653
+ # auth_names
10654
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
10655
+
10656
+ new_options = opts.merge(
10657
+ :operation => :"SfvbApi.proof_sfvb_sequence_postcard",
10658
+ :header_params => header_params,
10659
+ :query_params => query_params,
10660
+ :form_params => form_params,
10661
+ :body => post_body,
10662
+ :auth_names => auth_names,
10663
+ :return_type => return_type
10664
+ )
10665
+
10666
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
10667
+ if @api_client.config.debugging
10668
+ @api_client.config.logger.debug "API called: SfvbApi#proof_sfvb_sequence_postcard\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
10669
+ end
10670
+ return data, status_code, headers
10671
+ end
10672
+
10586
10673
  # Publish a library entry's draft
10587
10674
  # Freezes the draft as a published revision at its revision_number and sets who can see it. Owner only, with the draft's hash_sha256 as If-Match. Always needs sfvb_publish, because it changes what other merchants can install. Images, fonts, stylesheets and media must be relative paths, and credential shaped strings are refused. Public also needs the library publisher property on the account and no executable content at all - no script, html, embed, css or velocity elements. After those checks an automated AI review reads the fragment, which can take up to about a minute. A clear violation both of its models agree on refuses any publish with sfvb.library_ai_review_blocked. A public publish also needs its approval, otherwise sfvb.library_ai_review_inconclusive. The result is in content_manifest.ai_review.
10588
10675
  # @param storefront_oid [Integer]
@@ -0,0 +1,302 @@
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 SfvbPostcardProofRequest
18
+ # The recipient street address. Without address1, city, state and postal_code, a sample address is used.
19
+ attr_accessor :address1
20
+
21
+ # The recipient second address line.
22
+ attr_accessor :address2
23
+
24
+ # Item ids for the cart a cart flow card renders with. The cart is made for the proof and deleted after it.
25
+ attr_accessor :cart_item_ids
26
+
27
+ # The recipient city.
28
+ attr_accessor :city
29
+
30
+ # The recipient name the card greets and is addressed to. Defaults to the signed in user.
31
+ attr_accessor :customer_name
32
+
33
+ # True to return only the rendered HTML of both sides, with no print vendor render. The default, false, also returns the images that would print and the vendor proof PDF.
34
+ attr_accessor :html_only
35
+
36
+ # A test order for an order flow card. Real orders are refused. Without one, an order flow card renders with a made up order.
37
+ attr_accessor :order_id
38
+
39
+ # The recipient postal code.
40
+ attr_accessor :postal_code
41
+
42
+ # The recipient state.
43
+ attr_accessor :state
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'address1' => :'address1',
49
+ :'address2' => :'address2',
50
+ :'cart_item_ids' => :'cart_item_ids',
51
+ :'city' => :'city',
52
+ :'customer_name' => :'customer_name',
53
+ :'html_only' => :'html_only',
54
+ :'order_id' => :'order_id',
55
+ :'postal_code' => :'postal_code',
56
+ :'state' => :'state'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'address1' => :'String',
69
+ :'address2' => :'String',
70
+ :'cart_item_ids' => :'Array<String>',
71
+ :'city' => :'String',
72
+ :'customer_name' => :'String',
73
+ :'html_only' => :'Boolean',
74
+ :'order_id' => :'String',
75
+ :'postal_code' => :'String',
76
+ :'state' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbPostcardProofRequest` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbPostcardProofRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'address1')
102
+ self.address1 = attributes[:'address1']
103
+ end
104
+
105
+ if attributes.key?(:'address2')
106
+ self.address2 = attributes[:'address2']
107
+ end
108
+
109
+ if attributes.key?(:'cart_item_ids')
110
+ if (value = attributes[:'cart_item_ids']).is_a?(Array)
111
+ self.cart_item_ids = value
112
+ end
113
+ end
114
+
115
+ if attributes.key?(:'city')
116
+ self.city = attributes[:'city']
117
+ end
118
+
119
+ if attributes.key?(:'customer_name')
120
+ self.customer_name = attributes[:'customer_name']
121
+ end
122
+
123
+ if attributes.key?(:'html_only')
124
+ self.html_only = attributes[:'html_only']
125
+ end
126
+
127
+ if attributes.key?(:'order_id')
128
+ self.order_id = attributes[:'order_id']
129
+ end
130
+
131
+ if attributes.key?(:'postal_code')
132
+ self.postal_code = attributes[:'postal_code']
133
+ end
134
+
135
+ if attributes.key?(:'state')
136
+ self.state = attributes[:'state']
137
+ end
138
+ end
139
+
140
+ # Show invalid properties with the reasons. Usually used together with valid?
141
+ # @return Array for valid properties with the reasons
142
+ def list_invalid_properties
143
+ invalid_properties = Array.new
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ true
151
+ end
152
+
153
+ # Checks equality by comparing each attribute.
154
+ # @param [Object] Object to be compared
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ address1 == o.address1 &&
159
+ address2 == o.address2 &&
160
+ cart_item_ids == o.cart_item_ids &&
161
+ city == o.city &&
162
+ customer_name == o.customer_name &&
163
+ html_only == o.html_only &&
164
+ order_id == o.order_id &&
165
+ postal_code == o.postal_code &&
166
+ state == o.state
167
+ end
168
+
169
+ # @see the `==` method
170
+ # @param [Object] Object to be compared
171
+ def eql?(o)
172
+ self == o
173
+ end
174
+
175
+ # Calculates hash code according to all attributes.
176
+ # @return [Integer] Hash code
177
+ def hash
178
+ [address1, address2, cart_item_ids, city, customer_name, html_only, order_id, postal_code, state].hash
179
+ end
180
+
181
+ # Builds the object from hash
182
+ # @param [Hash] attributes Model attributes in the form of hash
183
+ # @return [Object] Returns the model itself
184
+ def self.build_from_hash(attributes)
185
+ new.build_from_hash(attributes)
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ attributes = attributes.transform_keys(&:to_sym)
194
+ self.class.openapi_types.each_pair do |key, type|
195
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
196
+ self.send("#{key}=", nil)
197
+ elsif type =~ /\AArray<(.*)>/i
198
+ # check to ensure the input is an array given that the attribute
199
+ # is documented as an array but the input is not
200
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
201
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
202
+ end
203
+ elsif !attributes[self.class.attribute_map[key]].nil?
204
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
205
+ end
206
+ end
207
+
208
+ self
209
+ end
210
+
211
+ # Deserializes the data based on type
212
+ # @param string type Data type
213
+ # @param string value Value to be deserialized
214
+ # @return [Object] Deserialized data
215
+ def _deserialize(type, value)
216
+ case type.to_sym
217
+ when :Time
218
+ Time.parse(value)
219
+ when :Date
220
+ Date.parse(value)
221
+ when :String
222
+ value.to_s
223
+ when :Integer
224
+ value.to_i
225
+ when :Float
226
+ value.to_f
227
+ when :Boolean
228
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
229
+ true
230
+ else
231
+ false
232
+ end
233
+ when :Object
234
+ # generic object (usually a Hash), return directly
235
+ value
236
+ when /\AArray<(?<inner_type>.+)>\z/
237
+ inner_type = Regexp.last_match[:inner_type]
238
+ value.map { |v| _deserialize(inner_type, v) }
239
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
240
+ k_type = Regexp.last_match[:k_type]
241
+ v_type = Regexp.last_match[:v_type]
242
+ {}.tap do |hash|
243
+ value.each do |k, v|
244
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
245
+ end
246
+ end
247
+ else # model
248
+ # models (e.g. Pet) or oneOf
249
+ klass = UltracartClient.const_get(type)
250
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
251
+ end
252
+ end
253
+
254
+ # Returns the string representation of the object
255
+ # @return [String] String presentation of the object
256
+ def to_s
257
+ to_hash.to_s
258
+ end
259
+
260
+ # to_body is an alias to to_hash (backward compatibility)
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_body
263
+ to_hash
264
+ end
265
+
266
+ # Returns the object in the form of hash
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_hash
269
+ hash = {}
270
+ self.class.attribute_map.each_pair do |attr, param|
271
+ value = self.send(attr)
272
+ if value.nil?
273
+ is_nullable = self.class.openapi_nullable.include?(attr)
274
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
275
+ end
276
+
277
+ hash[param] = _to_hash(value)
278
+ end
279
+ hash
280
+ end
281
+
282
+ # Outputs non-array value in the form of hash
283
+ # For object, use to_hash. Otherwise, just return the value
284
+ # @param [Object] value Any valid value
285
+ # @return [Hash] Returns the value in the form of hash
286
+ def _to_hash(value)
287
+ if value.is_a?(Array)
288
+ value.compact.map { |v| _to_hash(v) }
289
+ elsif value.is_a?(Hash)
290
+ {}.tap do |hash|
291
+ value.each { |k, v| hash[k] = _to_hash(v) }
292
+ end
293
+ elsif value.respond_to? :to_hash
294
+ value.to_hash
295
+ else
296
+ value
297
+ end
298
+ end
299
+
300
+ end
301
+
302
+ end
@@ -0,0 +1,356 @@
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 SfvbPostcardProofResponse
18
+ # The back as the send renders it, after the name tokens are filled.
19
+ attr_accessor :back_html
20
+
21
+ # The back as the PNG image the print vendor prints from. A public url.
22
+ attr_accessor :back_image_url
23
+
24
+ # The print vendor thumbnail of the back.
25
+ attr_accessor :back_thumbnail_url
26
+
27
+ # The front as the send renders it, after the name tokens are filled.
28
+ attr_accessor :front_html
29
+
30
+ # The front as the PNG image the print vendor prints from. A public url.
31
+ attr_accessor :front_image_url
32
+
33
+ # The print vendor thumbnail of the front.
34
+ attr_accessor :front_thumbnail_url
35
+
36
+ # Where the order came from. test for the order_id given, dummy for a made up one, none for no order.
37
+ attr_accessor :order_source
38
+
39
+ # The postcard the step mails.
40
+ attr_accessor :postcard_uuid
41
+
42
+ # The print vendor proof PDF of both sides.
43
+ attr_accessor :rendered_pdf_url
44
+
45
+ # True when the print vendor rendered the card, so the image and PDF urls are set.
46
+ attr_accessor :vendor_rendered
47
+
48
+ # Where the proof differs from a send, such as a placeholder coupon code or a sample address, and anything that would make a send skip the card.
49
+ attr_accessor :warnings
50
+
51
+ class EnumAttributeValidator
52
+ attr_reader :datatype
53
+ attr_reader :allowable_values
54
+
55
+ def initialize(datatype, allowable_values)
56
+ @allowable_values = allowable_values.map do |value|
57
+ case datatype.to_s
58
+ when /Integer/i
59
+ value.to_i
60
+ when /Float/i
61
+ value.to_f
62
+ else
63
+ value
64
+ end
65
+ end
66
+ end
67
+
68
+ def valid?(value)
69
+ !value || allowable_values.include?(value)
70
+ end
71
+ end
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'back_html' => :'back_html',
77
+ :'back_image_url' => :'back_image_url',
78
+ :'back_thumbnail_url' => :'back_thumbnail_url',
79
+ :'front_html' => :'front_html',
80
+ :'front_image_url' => :'front_image_url',
81
+ :'front_thumbnail_url' => :'front_thumbnail_url',
82
+ :'order_source' => :'order_source',
83
+ :'postcard_uuid' => :'postcard_uuid',
84
+ :'rendered_pdf_url' => :'rendered_pdf_url',
85
+ :'vendor_rendered' => :'vendor_rendered',
86
+ :'warnings' => :'warnings'
87
+ }
88
+ end
89
+
90
+ # Returns all the JSON keys this model knows about
91
+ def self.acceptable_attributes
92
+ attribute_map.values
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.openapi_types
97
+ {
98
+ :'back_html' => :'String',
99
+ :'back_image_url' => :'String',
100
+ :'back_thumbnail_url' => :'String',
101
+ :'front_html' => :'String',
102
+ :'front_image_url' => :'String',
103
+ :'front_thumbnail_url' => :'String',
104
+ :'order_source' => :'String',
105
+ :'postcard_uuid' => :'String',
106
+ :'rendered_pdf_url' => :'String',
107
+ :'vendor_rendered' => :'Boolean',
108
+ :'warnings' => :'Array<SfvbErrorDetail>'
109
+ }
110
+ end
111
+
112
+ # List of attributes with nullable: true
113
+ def self.openapi_nullable
114
+ Set.new([
115
+ ])
116
+ end
117
+
118
+ # Initializes the object
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ def initialize(attributes = {})
121
+ if (!attributes.is_a?(Hash))
122
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbPostcardProofResponse` initialize method"
123
+ end
124
+
125
+ # check to see if the attribute exists and convert string to symbol for hash key
126
+ attributes = attributes.each_with_object({}) { |(k, v), h|
127
+ if (!self.class.attribute_map.key?(k.to_sym))
128
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbPostcardProofResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
129
+ end
130
+ h[k.to_sym] = v
131
+ }
132
+
133
+ if attributes.key?(:'back_html')
134
+ self.back_html = attributes[:'back_html']
135
+ end
136
+
137
+ if attributes.key?(:'back_image_url')
138
+ self.back_image_url = attributes[:'back_image_url']
139
+ end
140
+
141
+ if attributes.key?(:'back_thumbnail_url')
142
+ self.back_thumbnail_url = attributes[:'back_thumbnail_url']
143
+ end
144
+
145
+ if attributes.key?(:'front_html')
146
+ self.front_html = attributes[:'front_html']
147
+ end
148
+
149
+ if attributes.key?(:'front_image_url')
150
+ self.front_image_url = attributes[:'front_image_url']
151
+ end
152
+
153
+ if attributes.key?(:'front_thumbnail_url')
154
+ self.front_thumbnail_url = attributes[:'front_thumbnail_url']
155
+ end
156
+
157
+ if attributes.key?(:'order_source')
158
+ self.order_source = attributes[:'order_source']
159
+ end
160
+
161
+ if attributes.key?(:'postcard_uuid')
162
+ self.postcard_uuid = attributes[:'postcard_uuid']
163
+ end
164
+
165
+ if attributes.key?(:'rendered_pdf_url')
166
+ self.rendered_pdf_url = attributes[:'rendered_pdf_url']
167
+ end
168
+
169
+ if attributes.key?(:'vendor_rendered')
170
+ self.vendor_rendered = attributes[:'vendor_rendered']
171
+ end
172
+
173
+ if attributes.key?(:'warnings')
174
+ if (value = attributes[:'warnings']).is_a?(Array)
175
+ self.warnings = value
176
+ end
177
+ end
178
+ end
179
+
180
+ # Show invalid properties with the reasons. Usually used together with valid?
181
+ # @return Array for valid properties with the reasons
182
+ def list_invalid_properties
183
+ invalid_properties = Array.new
184
+ invalid_properties
185
+ end
186
+
187
+ # Check to see if the all the properties in the model are valid
188
+ # @return true if the model is valid
189
+ def valid?
190
+ order_source_validator = EnumAttributeValidator.new('String', ["test", "dummy", "none"])
191
+ return false unless order_source_validator.valid?(@order_source)
192
+ true
193
+ end
194
+
195
+ # Custom attribute writer method checking allowed values (enum).
196
+ # @param [Object] order_source Object to be assigned
197
+ def order_source=(order_source)
198
+ validator = EnumAttributeValidator.new('String', ["test", "dummy", "none"])
199
+ unless validator.valid?(order_source)
200
+ fail ArgumentError, "invalid value for \"order_source\", must be one of #{validator.allowable_values}."
201
+ end
202
+ @order_source = order_source
203
+ end
204
+
205
+ # Checks equality by comparing each attribute.
206
+ # @param [Object] Object to be compared
207
+ def ==(o)
208
+ return true if self.equal?(o)
209
+ self.class == o.class &&
210
+ back_html == o.back_html &&
211
+ back_image_url == o.back_image_url &&
212
+ back_thumbnail_url == o.back_thumbnail_url &&
213
+ front_html == o.front_html &&
214
+ front_image_url == o.front_image_url &&
215
+ front_thumbnail_url == o.front_thumbnail_url &&
216
+ order_source == o.order_source &&
217
+ postcard_uuid == o.postcard_uuid &&
218
+ rendered_pdf_url == o.rendered_pdf_url &&
219
+ vendor_rendered == o.vendor_rendered &&
220
+ warnings == o.warnings
221
+ end
222
+
223
+ # @see the `==` method
224
+ # @param [Object] Object to be compared
225
+ def eql?(o)
226
+ self == o
227
+ end
228
+
229
+ # Calculates hash code according to all attributes.
230
+ # @return [Integer] Hash code
231
+ def hash
232
+ [back_html, back_image_url, back_thumbnail_url, front_html, front_image_url, front_thumbnail_url, order_source, postcard_uuid, rendered_pdf_url, vendor_rendered, warnings].hash
233
+ end
234
+
235
+ # Builds the object from hash
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ # @return [Object] Returns the model itself
238
+ def self.build_from_hash(attributes)
239
+ new.build_from_hash(attributes)
240
+ end
241
+
242
+ # Builds the object from hash
243
+ # @param [Hash] attributes Model attributes in the form of hash
244
+ # @return [Object] Returns the model itself
245
+ def build_from_hash(attributes)
246
+ return nil unless attributes.is_a?(Hash)
247
+ attributes = attributes.transform_keys(&:to_sym)
248
+ self.class.openapi_types.each_pair do |key, type|
249
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
250
+ self.send("#{key}=", nil)
251
+ elsif type =~ /\AArray<(.*)>/i
252
+ # check to ensure the input is an array given that the attribute
253
+ # is documented as an array but the input is not
254
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
255
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
256
+ end
257
+ elsif !attributes[self.class.attribute_map[key]].nil?
258
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
259
+ end
260
+ end
261
+
262
+ self
263
+ end
264
+
265
+ # Deserializes the data based on type
266
+ # @param string type Data type
267
+ # @param string value Value to be deserialized
268
+ # @return [Object] Deserialized data
269
+ def _deserialize(type, value)
270
+ case type.to_sym
271
+ when :Time
272
+ Time.parse(value)
273
+ when :Date
274
+ Date.parse(value)
275
+ when :String
276
+ value.to_s
277
+ when :Integer
278
+ value.to_i
279
+ when :Float
280
+ value.to_f
281
+ when :Boolean
282
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
283
+ true
284
+ else
285
+ false
286
+ end
287
+ when :Object
288
+ # generic object (usually a Hash), return directly
289
+ value
290
+ when /\AArray<(?<inner_type>.+)>\z/
291
+ inner_type = Regexp.last_match[:inner_type]
292
+ value.map { |v| _deserialize(inner_type, v) }
293
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
294
+ k_type = Regexp.last_match[:k_type]
295
+ v_type = Regexp.last_match[:v_type]
296
+ {}.tap do |hash|
297
+ value.each do |k, v|
298
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
299
+ end
300
+ end
301
+ else # model
302
+ # models (e.g. Pet) or oneOf
303
+ klass = UltracartClient.const_get(type)
304
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
305
+ end
306
+ end
307
+
308
+ # Returns the string representation of the object
309
+ # @return [String] String presentation of the object
310
+ def to_s
311
+ to_hash.to_s
312
+ end
313
+
314
+ # to_body is an alias to to_hash (backward compatibility)
315
+ # @return [Hash] Returns the object in the form of hash
316
+ def to_body
317
+ to_hash
318
+ end
319
+
320
+ # Returns the object in the form of hash
321
+ # @return [Hash] Returns the object in the form of hash
322
+ def to_hash
323
+ hash = {}
324
+ self.class.attribute_map.each_pair do |attr, param|
325
+ value = self.send(attr)
326
+ if value.nil?
327
+ is_nullable = self.class.openapi_nullable.include?(attr)
328
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
329
+ end
330
+
331
+ hash[param] = _to_hash(value)
332
+ end
333
+ hash
334
+ end
335
+
336
+ # Outputs non-array value in the form of hash
337
+ # For object, use to_hash. Otherwise, just return the value
338
+ # @param [Object] value Any valid value
339
+ # @return [Hash] Returns the value in the form of hash
340
+ def _to_hash(value)
341
+ if value.is_a?(Array)
342
+ value.compact.map { |v| _to_hash(v) }
343
+ elsif value.is_a?(Hash)
344
+ {}.tap do |hash|
345
+ value.each { |k, v| hash[k] = _to_hash(v) }
346
+ end
347
+ elsif value.respond_to? :to_hash
348
+ value.to_hash
349
+ else
350
+ value
351
+ end
352
+ end
353
+
354
+ end
355
+
356
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.220'
14
+ VERSION = '4.1.221'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1154,6 +1154,8 @@ require 'ultracart_api/models/sfvb_page_response'
1154
1154
  require 'ultracart_api/models/sfvb_page_selectors'
1155
1155
  require 'ultracart_api/models/sfvb_page_settings_request'
1156
1156
  require 'ultracart_api/models/sfvb_page_summary'
1157
+ require 'ultracart_api/models/sfvb_postcard_proof_request'
1158
+ require 'ultracart_api/models/sfvb_postcard_proof_response'
1157
1159
  require 'ultracart_api/models/sfvb_preview_access_request'
1158
1160
  require 'ultracart_api/models/sfvb_preview_access_response'
1159
1161
  require 'ultracart_api/models/sfvb_preview_session_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.220
4
+ version: 4.1.221
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -1216,6 +1216,8 @@ files:
1216
1216
  - docs/SfvbPageSelectors.md
1217
1217
  - docs/SfvbPageSettingsRequest.md
1218
1218
  - docs/SfvbPageSummary.md
1219
+ - docs/SfvbPostcardProofRequest.md
1220
+ - docs/SfvbPostcardProofResponse.md
1219
1221
  - docs/SfvbPreviewAccessRequest.md
1220
1222
  - docs/SfvbPreviewAccessResponse.md
1221
1223
  - docs/SfvbPreviewSessionRequest.md
@@ -2576,6 +2578,8 @@ files:
2576
2578
  - lib/ultracart_api/models/sfvb_page_selectors.rb
2577
2579
  - lib/ultracart_api/models/sfvb_page_settings_request.rb
2578
2580
  - lib/ultracart_api/models/sfvb_page_summary.rb
2581
+ - lib/ultracart_api/models/sfvb_postcard_proof_request.rb
2582
+ - lib/ultracart_api/models/sfvb_postcard_proof_response.rb
2579
2583
  - lib/ultracart_api/models/sfvb_preview_access_request.rb
2580
2584
  - lib/ultracart_api/models/sfvb_preview_access_response.rb
2581
2585
  - lib/ultracart_api/models/sfvb_preview_session_request.rb