ultracart_api 4.1.19 → 4.1.21

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -10
  3. data/docs/CustomDashboardSchedule.md +26 -0
  4. data/docs/{ChargebackDisputesResponse.md → CustomDashboardScheduleResponse.md} +4 -4
  5. data/docs/CustomDashboardSchedulesResponse.md +26 -0
  6. data/docs/CustomReport.md +2 -0
  7. data/docs/CustomReportAccountConfig.md +2 -0
  8. data/docs/CustomReportAnalysisRequest.md +20 -0
  9. data/docs/{ChargebackDisputeResponse.md → CustomReportAnalysisResponse.md} +4 -4
  10. data/docs/CustomReportChartPngUploadResponse.md +28 -0
  11. data/docs/DatawarehouseApi.md +329 -0
  12. data/docs/EmailCampaign.md +4 -0
  13. data/docs/ItemTag.md +1 -1
  14. data/docs/OrderApi.md +56 -0
  15. data/docs/ReplaceOrderItemIdRequest.md +24 -0
  16. data/lib/ultracart_api/api/datawarehouse_api.rb +429 -0
  17. data/lib/ultracart_api/api/order_api.rb +78 -0
  18. data/lib/ultracart_api/models/custom_dashboard_schedule.rb +258 -0
  19. data/lib/ultracart_api/models/{chargeback_disputes_response.rb → custom_dashboard_schedule_response.rb} +13 -15
  20. data/lib/ultracart_api/models/custom_dashboard_schedules_response.rb +259 -0
  21. data/lib/ultracart_api/models/custom_report.rb +10 -1
  22. data/lib/ultracart_api/models/custom_report_account_config.rb +10 -1
  23. data/lib/ultracart_api/models/custom_report_analysis_request.rb +228 -0
  24. data/lib/ultracart_api/models/{chargeback_dispute_response.rb → custom_report_analysis_response.rb} +13 -13
  25. data/lib/ultracart_api/models/custom_report_chart_png_upload_response.rb +265 -0
  26. data/lib/ultracart_api/models/email_campaign.rb +21 -1
  27. data/lib/ultracart_api/models/item_tag.rb +1 -1
  28. data/lib/ultracart_api/models/order_payment.rb +2 -2
  29. data/lib/ultracart_api/models/replace_order_item_id_request.rb +280 -0
  30. data/lib/ultracart_api/version.rb +1 -1
  31. data/lib/ultracart_api.rb +7 -4
  32. metadata +16 -10
  33. data/docs/ChargebackApi.md +0 -297
  34. data/docs/ChargebackDispute.md +0 -62
  35. data/lib/ultracart_api/api/chargeback_api.rb +0 -410
  36. data/lib/ultracart_api/models/chargeback_dispute.rb +0 -649
@@ -34,6 +34,8 @@ module UltracartClient
34
34
  # Date/time that custom reporting was opted in to
35
35
  attr_accessor :opt_in_date
36
36
 
37
+ attr_accessor :read_only
38
+
37
39
  attr_accessor :sql_budget
38
40
 
39
41
  attr_accessor :sql_usage
@@ -48,6 +50,7 @@ module UltracartClient
48
50
  :'opt_in' => :'opt_in',
49
51
  :'opt_in_by_user' => :'opt_in_by_user',
50
52
  :'opt_in_date' => :'opt_in_date',
53
+ :'read_only' => :'read_only',
51
54
  :'sql_budget' => :'sql_budget',
52
55
  :'sql_usage' => :'sql_usage'
53
56
  }
@@ -68,6 +71,7 @@ module UltracartClient
68
71
  :'opt_in' => :'Boolean',
69
72
  :'opt_in_by_user' => :'String',
70
73
  :'opt_in_date' => :'String',
74
+ :'read_only' => :'Boolean',
71
75
  :'sql_budget' => :'Float',
72
76
  :'sql_usage' => :'Float'
73
77
  }
@@ -122,6 +126,10 @@ module UltracartClient
122
126
  self.opt_in_date = attributes[:'opt_in_date']
123
127
  end
124
128
 
129
+ if attributes.key?(:'read_only')
130
+ self.read_only = attributes[:'read_only']
131
+ end
132
+
125
133
  if attributes.key?(:'sql_budget')
126
134
  self.sql_budget = attributes[:'sql_budget']
127
135
  end
@@ -156,6 +164,7 @@ module UltracartClient
156
164
  opt_in == o.opt_in &&
157
165
  opt_in_by_user == o.opt_in_by_user &&
158
166
  opt_in_date == o.opt_in_date &&
167
+ read_only == o.read_only &&
159
168
  sql_budget == o.sql_budget &&
160
169
  sql_usage == o.sql_usage
161
170
  end
@@ -169,7 +178,7 @@ module UltracartClient
169
178
  # Calculates hash code according to all attributes.
170
179
  # @return [Integer] Hash code
171
180
  def hash
172
- [ai_budget, ai_usage, merchant_id, novice_sql_comments, opt_in, opt_in_by_user, opt_in_date, sql_budget, sql_usage].hash
181
+ [ai_budget, ai_usage, merchant_id, novice_sql_comments, opt_in, opt_in_by_user, opt_in_date, read_only, sql_budget, sql_usage].hash
173
182
  end
174
183
 
175
184
  # Builds the object from hash
@@ -0,0 +1,228 @@
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 CustomReportAnalysisRequest
18
+ attr_accessor :png_url
19
+
20
+ attr_accessor :result_url
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'png_url' => :'png_url',
26
+ :'result_url' => :'result_url'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'png_url' => :'String',
39
+ :'result_url' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomReportAnalysisRequest` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomReportAnalysisRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'png_url')
65
+ self.png_url = attributes[:'png_url']
66
+ end
67
+
68
+ if attributes.key?(:'result_url')
69
+ self.result_url = attributes[:'result_url']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ png_url == o.png_url &&
92
+ result_url == o.result_url
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [png_url, result_url].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ # models (e.g. Pet) or oneOf
175
+ klass = UltracartClient.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -14,11 +14,11 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module UltracartClient
17
- class ChargebackDisputeResponse
18
- attr_accessor :chargeback
19
-
17
+ class CustomReportAnalysisResponse
20
18
  attr_accessor :error
21
19
 
20
+ attr_accessor :html
21
+
22
22
  attr_accessor :metadata
23
23
 
24
24
  # Indicates if API call was successful
@@ -29,8 +29,8 @@ module UltracartClient
29
29
  # Attribute mapping from ruby-style variable name to JSON key.
30
30
  def self.attribute_map
31
31
  {
32
- :'chargeback' => :'chargeback',
33
32
  :'error' => :'error',
33
+ :'html' => :'html',
34
34
  :'metadata' => :'metadata',
35
35
  :'success' => :'success',
36
36
  :'warning' => :'warning'
@@ -45,8 +45,8 @@ module UltracartClient
45
45
  # Attribute type mapping.
46
46
  def self.openapi_types
47
47
  {
48
- :'chargeback' => :'ChargebackDispute',
49
48
  :'error' => :'Error',
49
+ :'html' => :'String',
50
50
  :'metadata' => :'ResponseMetadata',
51
51
  :'success' => :'Boolean',
52
52
  :'warning' => :'Warning'
@@ -63,25 +63,25 @@ module UltracartClient
63
63
  # @param [Hash] attributes Model attributes in the form of hash
64
64
  def initialize(attributes = {})
65
65
  if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChargebackDisputeResponse` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomReportAnalysisResponse` initialize method"
67
67
  end
68
68
 
69
69
  # check to see if the attribute exists and convert string to symbol for hash key
70
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
71
71
  if (!self.class.attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChargebackDisputeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomReportAnalysisResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
73
  end
74
74
  h[k.to_sym] = v
75
75
  }
76
76
 
77
- if attributes.key?(:'chargeback')
78
- self.chargeback = attributes[:'chargeback']
79
- end
80
-
81
77
  if attributes.key?(:'error')
82
78
  self.error = attributes[:'error']
83
79
  end
84
80
 
81
+ if attributes.key?(:'html')
82
+ self.html = attributes[:'html']
83
+ end
84
+
85
85
  if attributes.key?(:'metadata')
86
86
  self.metadata = attributes[:'metadata']
87
87
  end
@@ -113,8 +113,8 @@ module UltracartClient
113
113
  def ==(o)
114
114
  return true if self.equal?(o)
115
115
  self.class == o.class &&
116
- chargeback == o.chargeback &&
117
116
  error == o.error &&
117
+ html == o.html &&
118
118
  metadata == o.metadata &&
119
119
  success == o.success &&
120
120
  warning == o.warning
@@ -129,7 +129,7 @@ module UltracartClient
129
129
  # Calculates hash code according to all attributes.
130
130
  # @return [Integer] Hash code
131
131
  def hash
132
- [chargeback, error, metadata, success, warning].hash
132
+ [error, html, metadata, success, warning].hash
133
133
  end
134
134
 
135
135
  # Builds the object from hash
@@ -0,0 +1,265 @@
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 CustomReportChartPngUploadResponse
18
+ attr_accessor :error
19
+
20
+ attr_accessor :metadata
21
+
22
+ attr_accessor :signed_download_url
23
+
24
+ attr_accessor :signed_upload_url
25
+
26
+ # Indicates if API call was successful
27
+ attr_accessor :success
28
+
29
+ attr_accessor :warning
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'error' => :'error',
35
+ :'metadata' => :'metadata',
36
+ :'signed_download_url' => :'signed_download_url',
37
+ :'signed_upload_url' => :'signed_upload_url',
38
+ :'success' => :'success',
39
+ :'warning' => :'warning'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'error' => :'Error',
52
+ :'metadata' => :'ResponseMetadata',
53
+ :'signed_download_url' => :'String',
54
+ :'signed_upload_url' => :'String',
55
+ :'success' => :'Boolean',
56
+ :'warning' => :'Warning'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomReportChartPngUploadResponse` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomReportChartPngUploadResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'error')
82
+ self.error = attributes[:'error']
83
+ end
84
+
85
+ if attributes.key?(:'metadata')
86
+ self.metadata = attributes[:'metadata']
87
+ end
88
+
89
+ if attributes.key?(:'signed_download_url')
90
+ self.signed_download_url = attributes[:'signed_download_url']
91
+ end
92
+
93
+ if attributes.key?(:'signed_upload_url')
94
+ self.signed_upload_url = attributes[:'signed_upload_url']
95
+ end
96
+
97
+ if attributes.key?(:'success')
98
+ self.success = attributes[:'success']
99
+ end
100
+
101
+ if attributes.key?(:'warning')
102
+ self.warning = attributes[:'warning']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ true
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ error == o.error &&
125
+ metadata == o.metadata &&
126
+ signed_download_url == o.signed_download_url &&
127
+ signed_upload_url == o.signed_upload_url &&
128
+ success == o.success &&
129
+ warning == o.warning
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [error, metadata, signed_download_url, signed_upload_url, success, warning].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ new.build_from_hash(attributes)
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ self.class.openapi_types.each_pair do |key, type|
158
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
159
+ self.send("#{key}=", nil)
160
+ elsif type =~ /\AArray<(.*)>/i
161
+ # check to ensure the input is an array given that the attribute
162
+ # is documented as an array but the input is not
163
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
164
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
165
+ end
166
+ elsif !attributes[self.class.attribute_map[key]].nil?
167
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
168
+ end
169
+ end
170
+
171
+ self
172
+ end
173
+
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def _deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = UltracartClient.const_get(type)
213
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+
263
+ end
264
+
265
+ end
@@ -66,6 +66,12 @@ module UltracartClient
66
66
  # True if this campaign is prevented from sending at this time due to spam complaints.
67
67
  attr_accessor :prevent_sending_due_to_spam
68
68
 
69
+ # True if the campaign should repeat on a monthly basis
70
+ attr_accessor :repeat_monthly
71
+
72
+ # True if the campaign should repeat on a weekly basis
73
+ attr_accessor :repeat_weekly
74
+
69
75
  # Revenue associated with campaign
70
76
  attr_accessor :revenue_formatted
71
77
 
@@ -113,6 +119,8 @@ module UltracartClient
113
119
  :'name' => :'name',
114
120
  :'open_rate_formatted' => :'open_rate_formatted',
115
121
  :'prevent_sending_due_to_spam' => :'prevent_sending_due_to_spam',
122
+ :'repeat_monthly' => :'repeat_monthly',
123
+ :'repeat_weekly' => :'repeat_weekly',
116
124
  :'revenue_formatted' => :'revenue_formatted',
117
125
  :'revenue_per_customer_formatted' => :'revenue_per_customer_formatted',
118
126
  :'scheduled_dts' => :'scheduled_dts',
@@ -150,6 +158,8 @@ module UltracartClient
150
158
  :'name' => :'String',
151
159
  :'open_rate_formatted' => :'String',
152
160
  :'prevent_sending_due_to_spam' => :'Boolean',
161
+ :'repeat_monthly' => :'Boolean',
162
+ :'repeat_weekly' => :'Boolean',
153
163
  :'revenue_formatted' => :'String',
154
164
  :'revenue_per_customer_formatted' => :'String',
155
165
  :'scheduled_dts' => :'String',
@@ -253,6 +263,14 @@ module UltracartClient
253
263
  self.prevent_sending_due_to_spam = attributes[:'prevent_sending_due_to_spam']
254
264
  end
255
265
 
266
+ if attributes.key?(:'repeat_monthly')
267
+ self.repeat_monthly = attributes[:'repeat_monthly']
268
+ end
269
+
270
+ if attributes.key?(:'repeat_weekly')
271
+ self.repeat_weekly = attributes[:'repeat_weekly']
272
+ end
273
+
256
274
  if attributes.key?(:'revenue_formatted')
257
275
  self.revenue_formatted = attributes[:'revenue_formatted']
258
276
  end
@@ -340,6 +358,8 @@ module UltracartClient
340
358
  name == o.name &&
341
359
  open_rate_formatted == o.open_rate_formatted &&
342
360
  prevent_sending_due_to_spam == o.prevent_sending_due_to_spam &&
361
+ repeat_monthly == o.repeat_monthly &&
362
+ repeat_weekly == o.repeat_weekly &&
343
363
  revenue_formatted == o.revenue_formatted &&
344
364
  revenue_per_customer_formatted == o.revenue_per_customer_formatted &&
345
365
  scheduled_dts == o.scheduled_dts &&
@@ -360,7 +380,7 @@ module UltracartClient
360
380
  # Calculates hash code according to all attributes.
361
381
  # @return [Integer] Hash code
362
382
  def hash
363
- [click_rate_formatted, created_dts, deleted, email_campaign_uuid, email_communication_sequence_uuid, end_once_customer_purchases, end_once_customer_purchases_anywhere, esp_campaign_folder_uuid, esp_domain_user, esp_domain_uuid, esp_friendly_name, library_item_oid, memberships, merchant_id, name, open_rate_formatted, prevent_sending_due_to_spam, revenue_formatted, revenue_per_customer_formatted, scheduled_dts, screenshot_large_full_url, sms_esp_twilio_uuid, sms_phone_number, status, status_dts, storefront_oid].hash
383
+ [click_rate_formatted, created_dts, deleted, email_campaign_uuid, email_communication_sequence_uuid, end_once_customer_purchases, end_once_customer_purchases_anywhere, esp_campaign_folder_uuid, esp_domain_user, esp_domain_uuid, esp_friendly_name, library_item_oid, memberships, merchant_id, name, open_rate_formatted, prevent_sending_due_to_spam, repeat_monthly, repeat_weekly, revenue_formatted, revenue_per_customer_formatted, scheduled_dts, screenshot_large_full_url, sms_esp_twilio_uuid, sms_phone_number, status, status_dts, storefront_oid].hash
364
384
  end
365
385
 
366
386
  # Builds the object from hash
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ItemTag
18
- # tag_tpe
18
+ # tag_type
19
19
  attr_accessor :tag_type
20
20
 
21
21
  # tag_value