ultracart_api 3.1.39 → 3.1.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -4
- data/docs/CouponTierAmount.md +1 -0
- data/docs/CouponTierPercent.md +1 -0
- data/docs/CouponTierQuantityAmount.md +1 -0
- data/docs/CouponTierQuantityPercent.md +1 -0
- data/docs/CouponTieredPercentOffShipping.md +1 -0
- data/docs/Item.md +1 -1
- data/docs/ItemReviews.md +2 -0
- data/docs/OrderApi.md +1 -1
- data/docs/OrderSummary.md +1 -0
- data/docs/ScreenRecordingFilterPageView.md +1 -0
- data/docs/ScreenRecordingFilterValuesPageView.md +1 -0
- data/docs/ScreenRecordingHeatmap.md +19 -0
- data/docs/ScreenRecordingHeatmapIndexResponse.md +12 -0
- data/docs/ScreenRecordingHeatmapRequest.md +9 -0
- data/docs/ScreenRecordingHeatmapReset.md +8 -0
- data/docs/ScreenRecordingHeatmapResponse.md +12 -0
- data/docs/ScreenRecordingHeatmapUrl.md +12 -0
- data/docs/ScreenRecordingPageView.md +1 -0
- data/docs/StorefrontApi.md +158 -0
- data/docs/WebhookLog.md +1 -0
- data/lib/ultracart_api.rb +6 -0
- data/lib/ultracart_api/api/order_api.rb +2 -2
- data/lib/ultracart_api/api/storefront_api.rb +176 -0
- data/lib/ultracart_api/models/coupon_tier_amount.rb +26 -1
- data/lib/ultracart_api/models/coupon_tier_percent.rb +26 -1
- data/lib/ultracart_api/models/coupon_tier_quantity_amount.rb +29 -4
- data/lib/ultracart_api/models/coupon_tier_quantity_percent.rb +29 -4
- data/lib/ultracart_api/models/coupon_tiered_percent_off_shipping.rb +26 -1
- data/lib/ultracart_api/models/item.rb +8 -8
- data/lib/ultracart_api/models/item_reviews.rb +24 -4
- data/lib/ultracart_api/models/order_summary.rb +10 -1
- data/lib/ultracart_api/models/screen_recording_filter_page_view.rb +10 -1
- data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +12 -1
- data/lib/ultracart_api/models/screen_recording_heatmap.rb +283 -0
- data/lib/ultracart_api/models/screen_recording_heatmap_index_response.rb +223 -0
- data/lib/ultracart_api/models/screen_recording_heatmap_request.rb +193 -0
- data/lib/ultracart_api/models/screen_recording_heatmap_reset.rb +184 -0
- data/lib/ultracart_api/models/screen_recording_heatmap_response.rb +221 -0
- data/lib/ultracart_api/models/screen_recording_heatmap_url.rb +222 -0
- data/lib/ultracart_api/models/screen_recording_page_view.rb +10 -1
- data/lib/ultracart_api/models/webhook_log.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- metadata +14 -2
data/docs/WebhookLog.md
CHANGED
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**delivery_dts** | **String** | Date/time of delivery | [optional]
|
7
7
|
**duration** | **Integer** | Number of milliseconds to process the notification | [optional]
|
8
|
+
**queue_delay** | **Integer** | Number of milliseconds of delay caused by queuing | [optional]
|
8
9
|
**request** | **String** | Request payload (first 100,000 characters) | [optional]
|
9
10
|
**request_headers** | [**Array<HTTPHeader>**](HTTPHeader.md) | Request headers sent to the server | [optional]
|
10
11
|
**request_id** | **String** | Request id is a unique string that you can look up in the logs | [optional]
|
data/lib/ultracart_api.rb
CHANGED
@@ -504,6 +504,12 @@ require 'ultracart_api/models/screen_recording_filter_values_event'
|
|
504
504
|
require 'ultracart_api/models/screen_recording_filter_values_event_params'
|
505
505
|
require 'ultracart_api/models/screen_recording_filter_values_page_param'
|
506
506
|
require 'ultracart_api/models/screen_recording_filter_values_page_view'
|
507
|
+
require 'ultracart_api/models/screen_recording_heatmap'
|
508
|
+
require 'ultracart_api/models/screen_recording_heatmap_index_response'
|
509
|
+
require 'ultracart_api/models/screen_recording_heatmap_request'
|
510
|
+
require 'ultracart_api/models/screen_recording_heatmap_reset'
|
511
|
+
require 'ultracart_api/models/screen_recording_heatmap_response'
|
512
|
+
require 'ultracart_api/models/screen_recording_heatmap_url'
|
507
513
|
require 'ultracart_api/models/screen_recording_merchant_notes_request'
|
508
514
|
require 'ultracart_api/models/screen_recording_multifield'
|
509
515
|
require 'ultracart_api/models/screen_recording_page_view'
|
@@ -33,7 +33,7 @@ module UltracartClient
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# Adjusts an order total
|
36
|
-
# Adjusts an order total. Adjusts individual items appropriately and considers taxes. Desired total should be provided in the same currency as the order.
|
36
|
+
# Adjusts an order total. Adjusts individual items appropriately and considers taxes. Desired total should be provided in the same currency as the order and must be less than the current total and greater than zero. This call will change the order total. It returns true if the desired total is achieved. If the goal seeking algorithm falls short (usually by pennies), this method returns back false. View the merchant notes for the order for further details.
|
37
37
|
# @param order_id The order id to cancel.
|
38
38
|
# @param desired_total The desired total with no formatting. example 123.45
|
39
39
|
# @param [Hash] opts the optional parameters
|
@@ -44,7 +44,7 @@ module UltracartClient
|
|
44
44
|
end
|
45
45
|
|
46
46
|
# Adjusts an order total
|
47
|
-
# Adjusts an order total. Adjusts individual items appropriately and considers taxes. Desired total should be provided in the same currency as the order.
|
47
|
+
# Adjusts an order total. Adjusts individual items appropriately and considers taxes. Desired total should be provided in the same currency as the order and must be less than the current total and greater than zero. This call will change the order total. It returns true if the desired total is achieved. If the goal seeking algorithm falls short (usually by pennies), this method returns back false. View the merchant notes for the order for further details.
|
48
48
|
# @param order_id The order id to cancel.
|
49
49
|
# @param desired_total The desired total with no formatting. example 123.45
|
50
50
|
# @param [Hash] opts the optional parameters
|
@@ -1033,6 +1033,66 @@ module UltracartClient
|
|
1033
1033
|
end
|
1034
1034
|
return data, status_code, headers
|
1035
1035
|
end
|
1036
|
+
# Delete screen recording heatmap
|
1037
|
+
# Delete screen recording heatmap
|
1038
|
+
# @param storefront_oid
|
1039
|
+
# @param query Query
|
1040
|
+
# @param [Hash] opts the optional parameters
|
1041
|
+
# @return [nil]
|
1042
|
+
def delete_heatmap(storefront_oid, query, opts = {})
|
1043
|
+
delete_heatmap_with_http_info(storefront_oid, query, opts)
|
1044
|
+
nil
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
# Delete screen recording heatmap
|
1048
|
+
# Delete screen recording heatmap
|
1049
|
+
# @param storefront_oid
|
1050
|
+
# @param query Query
|
1051
|
+
# @param [Hash] opts the optional parameters
|
1052
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1053
|
+
def delete_heatmap_with_http_info(storefront_oid, query, opts = {})
|
1054
|
+
if @api_client.config.debugging
|
1055
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.delete_heatmap ...'
|
1056
|
+
end
|
1057
|
+
# verify the required parameter 'storefront_oid' is set
|
1058
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
1059
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.delete_heatmap"
|
1060
|
+
end
|
1061
|
+
# verify the required parameter 'query' is set
|
1062
|
+
if @api_client.config.client_side_validation && query.nil?
|
1063
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling StorefrontApi.delete_heatmap"
|
1064
|
+
end
|
1065
|
+
# resource path
|
1066
|
+
local_var_path = '/storefront/{storefront_oid}/screen_recordings/heatmap'.sub('{' + 'storefront_oid' + '}', storefront_oid.to_s)
|
1067
|
+
|
1068
|
+
# query parameters
|
1069
|
+
query_params = {}
|
1070
|
+
|
1071
|
+
# header parameters
|
1072
|
+
header_params = {}
|
1073
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1074
|
+
# HTTP header 'Accept' (if needed)
|
1075
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1076
|
+
# HTTP header 'Content-Type'
|
1077
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1078
|
+
|
1079
|
+
# form parameters
|
1080
|
+
form_params = {}
|
1081
|
+
|
1082
|
+
# http body (model)
|
1083
|
+
post_body = @api_client.object_to_http_body(query)
|
1084
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1085
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
1086
|
+
:header_params => header_params,
|
1087
|
+
:query_params => query_params,
|
1088
|
+
:form_params => form_params,
|
1089
|
+
:body => post_body,
|
1090
|
+
:auth_names => auth_names)
|
1091
|
+
if @api_client.config.debugging
|
1092
|
+
@api_client.config.logger.debug "API called: StorefrontApi#delete_heatmap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1093
|
+
end
|
1094
|
+
return data, status_code, headers
|
1095
|
+
end
|
1036
1096
|
# Delete library item
|
1037
1097
|
# @param library_item_oid
|
1038
1098
|
# @param [Hash] opts the optional parameters
|
@@ -4438,6 +4498,122 @@ module UltracartClient
|
|
4438
4498
|
end
|
4439
4499
|
return data, status_code, headers
|
4440
4500
|
end
|
4501
|
+
# Get screen recording heatmap
|
4502
|
+
# Get screen recording heatmap
|
4503
|
+
# @param storefront_oid
|
4504
|
+
# @param query Query
|
4505
|
+
# @param [Hash] opts the optional parameters
|
4506
|
+
# @return [ScreenRecordingHeatmapResponse]
|
4507
|
+
def get_heatmap(storefront_oid, query, opts = {})
|
4508
|
+
data, _status_code, _headers = get_heatmap_with_http_info(storefront_oid, query, opts)
|
4509
|
+
data
|
4510
|
+
end
|
4511
|
+
|
4512
|
+
# Get screen recording heatmap
|
4513
|
+
# Get screen recording heatmap
|
4514
|
+
# @param storefront_oid
|
4515
|
+
# @param query Query
|
4516
|
+
# @param [Hash] opts the optional parameters
|
4517
|
+
# @return [Array<(ScreenRecordingHeatmapResponse, Fixnum, Hash)>] ScreenRecordingHeatmapResponse data, response status code and response headers
|
4518
|
+
def get_heatmap_with_http_info(storefront_oid, query, opts = {})
|
4519
|
+
if @api_client.config.debugging
|
4520
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.get_heatmap ...'
|
4521
|
+
end
|
4522
|
+
# verify the required parameter 'storefront_oid' is set
|
4523
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
4524
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.get_heatmap"
|
4525
|
+
end
|
4526
|
+
# verify the required parameter 'query' is set
|
4527
|
+
if @api_client.config.client_side_validation && query.nil?
|
4528
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling StorefrontApi.get_heatmap"
|
4529
|
+
end
|
4530
|
+
# resource path
|
4531
|
+
local_var_path = '/storefront/{storefront_oid}/screen_recordings/heatmap'.sub('{' + 'storefront_oid' + '}', storefront_oid.to_s)
|
4532
|
+
|
4533
|
+
# query parameters
|
4534
|
+
query_params = {}
|
4535
|
+
|
4536
|
+
# header parameters
|
4537
|
+
header_params = {}
|
4538
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
4539
|
+
# HTTP header 'Accept' (if needed)
|
4540
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4541
|
+
# HTTP header 'Content-Type'
|
4542
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
4543
|
+
|
4544
|
+
# form parameters
|
4545
|
+
form_params = {}
|
4546
|
+
|
4547
|
+
# http body (model)
|
4548
|
+
post_body = @api_client.object_to_http_body(query)
|
4549
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
4550
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
4551
|
+
:header_params => header_params,
|
4552
|
+
:query_params => query_params,
|
4553
|
+
:form_params => form_params,
|
4554
|
+
:body => post_body,
|
4555
|
+
:auth_names => auth_names,
|
4556
|
+
:return_type => 'ScreenRecordingHeatmapResponse')
|
4557
|
+
if @api_client.config.debugging
|
4558
|
+
@api_client.config.logger.debug "API called: StorefrontApi#get_heatmap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4559
|
+
end
|
4560
|
+
return data, status_code, headers
|
4561
|
+
end
|
4562
|
+
# Get screen recording heatmap index
|
4563
|
+
# Get screen recording heatmap index
|
4564
|
+
# @param storefront_oid
|
4565
|
+
# @param [Hash] opts the optional parameters
|
4566
|
+
# @return [ScreenRecordingHeatmapIndexResponse]
|
4567
|
+
def get_heatmap_index(storefront_oid, opts = {})
|
4568
|
+
data, _status_code, _headers = get_heatmap_index_with_http_info(storefront_oid, opts)
|
4569
|
+
data
|
4570
|
+
end
|
4571
|
+
|
4572
|
+
# Get screen recording heatmap index
|
4573
|
+
# Get screen recording heatmap index
|
4574
|
+
# @param storefront_oid
|
4575
|
+
# @param [Hash] opts the optional parameters
|
4576
|
+
# @return [Array<(ScreenRecordingHeatmapIndexResponse, Fixnum, Hash)>] ScreenRecordingHeatmapIndexResponse data, response status code and response headers
|
4577
|
+
def get_heatmap_index_with_http_info(storefront_oid, opts = {})
|
4578
|
+
if @api_client.config.debugging
|
4579
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.get_heatmap_index ...'
|
4580
|
+
end
|
4581
|
+
# verify the required parameter 'storefront_oid' is set
|
4582
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
4583
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.get_heatmap_index"
|
4584
|
+
end
|
4585
|
+
# resource path
|
4586
|
+
local_var_path = '/storefront/{storefront_oid}/screen_recordings/heatmap/index'.sub('{' + 'storefront_oid' + '}', storefront_oid.to_s)
|
4587
|
+
|
4588
|
+
# query parameters
|
4589
|
+
query_params = {}
|
4590
|
+
|
4591
|
+
# header parameters
|
4592
|
+
header_params = {}
|
4593
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
4594
|
+
# HTTP header 'Accept' (if needed)
|
4595
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4596
|
+
# HTTP header 'Content-Type'
|
4597
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
4598
|
+
|
4599
|
+
# form parameters
|
4600
|
+
form_params = {}
|
4601
|
+
|
4602
|
+
# http body (model)
|
4603
|
+
post_body = nil
|
4604
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
4605
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
4606
|
+
:header_params => header_params,
|
4607
|
+
:query_params => query_params,
|
4608
|
+
:form_params => form_params,
|
4609
|
+
:body => post_body,
|
4610
|
+
:auth_names => auth_names,
|
4611
|
+
:return_type => 'ScreenRecordingHeatmapIndexResponse')
|
4612
|
+
if @api_client.config.debugging
|
4613
|
+
@api_client.config.logger.debug "API called: StorefrontApi#get_heatmap_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4614
|
+
end
|
4615
|
+
return data, status_code, headers
|
4616
|
+
end
|
4441
4617
|
# Get histogram property names
|
4442
4618
|
# Obtain a list of property names for a given property type
|
4443
4619
|
# @param storefront_oid
|
@@ -17,6 +17,9 @@ module UltracartClient
|
|
17
17
|
# The amount of subtotal discount
|
18
18
|
attr_accessor :discount_amount
|
19
19
|
|
20
|
+
# Quickbooks accounting code.
|
21
|
+
attr_accessor :quickbooks_code
|
22
|
+
|
20
23
|
# The amount of subtotal required to receive the discount amount
|
21
24
|
attr_accessor :subtotal_amount
|
22
25
|
|
@@ -24,6 +27,7 @@ module UltracartClient
|
|
24
27
|
def self.attribute_map
|
25
28
|
{
|
26
29
|
:'discount_amount' => :'discount_amount',
|
30
|
+
:'quickbooks_code' => :'quickbooks_code',
|
27
31
|
:'subtotal_amount' => :'subtotal_amount'
|
28
32
|
}
|
29
33
|
end
|
@@ -32,6 +36,7 @@ module UltracartClient
|
|
32
36
|
def self.swagger_types
|
33
37
|
{
|
34
38
|
:'discount_amount' => :'Float',
|
39
|
+
:'quickbooks_code' => :'String',
|
35
40
|
:'subtotal_amount' => :'Float'
|
36
41
|
}
|
37
42
|
end
|
@@ -48,6 +53,10 @@ module UltracartClient
|
|
48
53
|
self.discount_amount = attributes[:'discount_amount']
|
49
54
|
end
|
50
55
|
|
56
|
+
if attributes.has_key?(:'quickbooks_code')
|
57
|
+
self.quickbooks_code = attributes[:'quickbooks_code']
|
58
|
+
end
|
59
|
+
|
51
60
|
if attributes.has_key?(:'subtotal_amount')
|
52
61
|
self.subtotal_amount = attributes[:'subtotal_amount']
|
53
62
|
end
|
@@ -57,21 +66,37 @@ module UltracartClient
|
|
57
66
|
# @return Array for valid properties with the reasons
|
58
67
|
def list_invalid_properties
|
59
68
|
invalid_properties = Array.new
|
69
|
+
if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
70
|
+
invalid_properties.push('invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.')
|
71
|
+
end
|
72
|
+
|
60
73
|
invalid_properties
|
61
74
|
end
|
62
75
|
|
63
76
|
# Check to see if the all the properties in the model are valid
|
64
77
|
# @return true if the model is valid
|
65
78
|
def valid?
|
79
|
+
return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
66
80
|
true
|
67
81
|
end
|
68
82
|
|
83
|
+
# Custom attribute writer method with validation
|
84
|
+
# @param [Object] quickbooks_code Value to be assigned
|
85
|
+
def quickbooks_code=(quickbooks_code)
|
86
|
+
if !quickbooks_code.nil? && quickbooks_code.to_s.length > 20
|
87
|
+
fail ArgumentError, 'invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.'
|
88
|
+
end
|
89
|
+
|
90
|
+
@quickbooks_code = quickbooks_code
|
91
|
+
end
|
92
|
+
|
69
93
|
# Checks equality by comparing each attribute.
|
70
94
|
# @param [Object] Object to be compared
|
71
95
|
def ==(o)
|
72
96
|
return true if self.equal?(o)
|
73
97
|
self.class == o.class &&
|
74
98
|
discount_amount == o.discount_amount &&
|
99
|
+
quickbooks_code == o.quickbooks_code &&
|
75
100
|
subtotal_amount == o.subtotal_amount
|
76
101
|
end
|
77
102
|
|
@@ -84,7 +109,7 @@ module UltracartClient
|
|
84
109
|
# Calculates hash code according to all attributes.
|
85
110
|
# @return [Fixnum] Hash code
|
86
111
|
def hash
|
87
|
-
[discount_amount, subtotal_amount].hash
|
112
|
+
[discount_amount, quickbooks_code, subtotal_amount].hash
|
88
113
|
end
|
89
114
|
|
90
115
|
# Builds the object from hash
|
@@ -17,6 +17,9 @@ module UltracartClient
|
|
17
17
|
# The percent of subtotal discount
|
18
18
|
attr_accessor :discount_percent
|
19
19
|
|
20
|
+
# Quickbooks accounting code.
|
21
|
+
attr_accessor :quickbooks_code
|
22
|
+
|
20
23
|
# The amount of subtotal required to receive the discount percent
|
21
24
|
attr_accessor :subtotal_amount
|
22
25
|
|
@@ -24,6 +27,7 @@ module UltracartClient
|
|
24
27
|
def self.attribute_map
|
25
28
|
{
|
26
29
|
:'discount_percent' => :'discount_percent',
|
30
|
+
:'quickbooks_code' => :'quickbooks_code',
|
27
31
|
:'subtotal_amount' => :'subtotal_amount'
|
28
32
|
}
|
29
33
|
end
|
@@ -32,6 +36,7 @@ module UltracartClient
|
|
32
36
|
def self.swagger_types
|
33
37
|
{
|
34
38
|
:'discount_percent' => :'Float',
|
39
|
+
:'quickbooks_code' => :'String',
|
35
40
|
:'subtotal_amount' => :'Float'
|
36
41
|
}
|
37
42
|
end
|
@@ -48,6 +53,10 @@ module UltracartClient
|
|
48
53
|
self.discount_percent = attributes[:'discount_percent']
|
49
54
|
end
|
50
55
|
|
56
|
+
if attributes.has_key?(:'quickbooks_code')
|
57
|
+
self.quickbooks_code = attributes[:'quickbooks_code']
|
58
|
+
end
|
59
|
+
|
51
60
|
if attributes.has_key?(:'subtotal_amount')
|
52
61
|
self.subtotal_amount = attributes[:'subtotal_amount']
|
53
62
|
end
|
@@ -57,21 +66,37 @@ module UltracartClient
|
|
57
66
|
# @return Array for valid properties with the reasons
|
58
67
|
def list_invalid_properties
|
59
68
|
invalid_properties = Array.new
|
69
|
+
if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
70
|
+
invalid_properties.push('invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.')
|
71
|
+
end
|
72
|
+
|
60
73
|
invalid_properties
|
61
74
|
end
|
62
75
|
|
63
76
|
# Check to see if the all the properties in the model are valid
|
64
77
|
# @return true if the model is valid
|
65
78
|
def valid?
|
79
|
+
return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
66
80
|
true
|
67
81
|
end
|
68
82
|
|
83
|
+
# Custom attribute writer method with validation
|
84
|
+
# @param [Object] quickbooks_code Value to be assigned
|
85
|
+
def quickbooks_code=(quickbooks_code)
|
86
|
+
if !quickbooks_code.nil? && quickbooks_code.to_s.length > 20
|
87
|
+
fail ArgumentError, 'invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.'
|
88
|
+
end
|
89
|
+
|
90
|
+
@quickbooks_code = quickbooks_code
|
91
|
+
end
|
92
|
+
|
69
93
|
# Checks equality by comparing each attribute.
|
70
94
|
# @param [Object] Object to be compared
|
71
95
|
def ==(o)
|
72
96
|
return true if self.equal?(o)
|
73
97
|
self.class == o.class &&
|
74
98
|
discount_percent == o.discount_percent &&
|
99
|
+
quickbooks_code == o.quickbooks_code &&
|
75
100
|
subtotal_amount == o.subtotal_amount
|
76
101
|
end
|
77
102
|
|
@@ -84,7 +109,7 @@ module UltracartClient
|
|
84
109
|
# Calculates hash code according to all attributes.
|
85
110
|
# @return [Fixnum] Hash code
|
86
111
|
def hash
|
87
|
-
[discount_percent, subtotal_amount].hash
|
112
|
+
[discount_percent, quickbooks_code, subtotal_amount].hash
|
88
113
|
end
|
89
114
|
|
90
115
|
# Builds the object from hash
|
@@ -20,11 +20,15 @@ module UltracartClient
|
|
20
20
|
# The quantity of item purchased (in units)
|
21
21
|
attr_accessor :item_quantity
|
22
22
|
|
23
|
+
# Quickbooks accounting code.
|
24
|
+
attr_accessor :quickbooks_code
|
25
|
+
|
23
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
27
|
def self.attribute_map
|
25
28
|
{
|
26
29
|
:'discount_amount' => :'discount_amount',
|
27
|
-
:'item_quantity' => :'item_quantity'
|
30
|
+
:'item_quantity' => :'item_quantity',
|
31
|
+
:'quickbooks_code' => :'quickbooks_code'
|
28
32
|
}
|
29
33
|
end
|
30
34
|
|
@@ -32,7 +36,8 @@ module UltracartClient
|
|
32
36
|
def self.swagger_types
|
33
37
|
{
|
34
38
|
:'discount_amount' => :'Float',
|
35
|
-
:'item_quantity' => :'Integer'
|
39
|
+
:'item_quantity' => :'Integer',
|
40
|
+
:'quickbooks_code' => :'String'
|
36
41
|
}
|
37
42
|
end
|
38
43
|
|
@@ -51,28 +56,48 @@ module UltracartClient
|
|
51
56
|
if attributes.has_key?(:'item_quantity')
|
52
57
|
self.item_quantity = attributes[:'item_quantity']
|
53
58
|
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'quickbooks_code')
|
61
|
+
self.quickbooks_code = attributes[:'quickbooks_code']
|
62
|
+
end
|
54
63
|
end
|
55
64
|
|
56
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
57
66
|
# @return Array for valid properties with the reasons
|
58
67
|
def list_invalid_properties
|
59
68
|
invalid_properties = Array.new
|
69
|
+
if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
70
|
+
invalid_properties.push('invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.')
|
71
|
+
end
|
72
|
+
|
60
73
|
invalid_properties
|
61
74
|
end
|
62
75
|
|
63
76
|
# Check to see if the all the properties in the model are valid
|
64
77
|
# @return true if the model is valid
|
65
78
|
def valid?
|
79
|
+
return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
66
80
|
true
|
67
81
|
end
|
68
82
|
|
83
|
+
# Custom attribute writer method with validation
|
84
|
+
# @param [Object] quickbooks_code Value to be assigned
|
85
|
+
def quickbooks_code=(quickbooks_code)
|
86
|
+
if !quickbooks_code.nil? && quickbooks_code.to_s.length > 20
|
87
|
+
fail ArgumentError, 'invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.'
|
88
|
+
end
|
89
|
+
|
90
|
+
@quickbooks_code = quickbooks_code
|
91
|
+
end
|
92
|
+
|
69
93
|
# Checks equality by comparing each attribute.
|
70
94
|
# @param [Object] Object to be compared
|
71
95
|
def ==(o)
|
72
96
|
return true if self.equal?(o)
|
73
97
|
self.class == o.class &&
|
74
98
|
discount_amount == o.discount_amount &&
|
75
|
-
item_quantity == o.item_quantity
|
99
|
+
item_quantity == o.item_quantity &&
|
100
|
+
quickbooks_code == o.quickbooks_code
|
76
101
|
end
|
77
102
|
|
78
103
|
# @see the `==` method
|
@@ -84,7 +109,7 @@ module UltracartClient
|
|
84
109
|
# Calculates hash code according to all attributes.
|
85
110
|
# @return [Fixnum] Hash code
|
86
111
|
def hash
|
87
|
-
[discount_amount, item_quantity].hash
|
112
|
+
[discount_amount, item_quantity, quickbooks_code].hash
|
88
113
|
end
|
89
114
|
|
90
115
|
# Builds the object from hash
|