ultracart_api 4.0.148 → 4.0.150

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: c8539747b236c55f3f90ad2ee87644f3d0018180033fc1a7b549aee7da175c07
4
- data.tar.gz: 0476175b2a24e06997ed0630da3024b753f895197c545b4a15ba81d1d543f6fa
3
+ metadata.gz: dd15e88c50b561801ba160b9143a5417cd996cef952b5abd40f7640463be4835
4
+ data.tar.gz: 572237452c72000d9723b4c50f169afd9fb588a6eb78fa6f295fc62ae4511e39
5
5
  SHA512:
6
- metadata.gz: dc96a83ce571f471ec72e1b2f6a9a8b201b16997186b2c8c4010b74301b810eaca95ec298db2712b365bcfb5599aafb8ba2a78af1f1bd3053983f730572c8891
7
- data.tar.gz: e5a5051d6ccd8d577b99f0d073bc80b2ae9b8cb7c1dc6ae4fe70290881ef26c20f4f5739dc9d05d659ac6fa663cb3992018414a2af314606bbde4e0649c73617
6
+ metadata.gz: a316b801fa4b51b3b0feaa65fd02556151eb0d4438e0c5b4ee19551503824b9510ddffd563b9df05624d56ff512d2a52441904f6876e45256aefada274cad417
7
+ data.tar.gz: 151d1ab14c42185fd75cca296a8e6d9288ec597fb0a12f2483ffbc43289ba3b729568f22eabebaafac2e9a3506cc58343538d57ae07572f0e9b467ef63f3bfbc
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.148
10
+ - Package version: 4.0.150
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.148.gem
27
+ gem install ./ultracart_api-4.0.150.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.148.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.150.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.148'
36
+ gem 'ultracart_api', '~> 4.0.150'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -1154,6 +1154,7 @@ Class | Method | HTTP request | Description
1154
1154
  - [UltracartClient::ReportFilter](docs/ReportFilter.md)
1155
1155
  - [UltracartClient::ReportFilterConnection](docs/ReportFilterConnection.md)
1156
1156
  - [UltracartClient::ReportPage](docs/ReportPage.md)
1157
+ - [UltracartClient::ReportPageFilter](docs/ReportPageFilter.md)
1157
1158
  - [UltracartClient::ReportPageVisualization](docs/ReportPageVisualization.md)
1158
1159
  - [UltracartClient::ReportPageVisualizationDimension](docs/ReportPageVisualizationDimension.md)
1159
1160
  - [UltracartClient::ReportPageVisualizationMetric](docs/ReportPageVisualizationMetric.md)
@@ -1352,6 +1353,8 @@ Not every change is committed to every SDK.
1352
1353
 
1353
1354
  | Version | Date | Comments |
1354
1355
  | --: | :-: | --- |
1356
+ | 4.0.150 | 04/21/2023 | internal development - data warehouse |
1357
+ | 4.0.149 | 04/19/2023 | internal development - data warehouse |
1355
1358
  | 4.0.148 | 04/19/2023 | internal dev - data warehouse |
1356
1359
  | 4.0.147 | 04/17/2023 | OrderPaymentTransaction - expose the transaction id |
1357
1360
  | 4.0.146 | 04/11/2023 | missing sezzle payment constant |
data/docs/Report.md CHANGED
@@ -8,6 +8,7 @@
8
8
  | **data_sources** | [**Array<ReportDataSource>**](ReportDataSource.md) | | [optional] |
9
9
  | **default_dataset_id** | **String** | | [optional] |
10
10
  | **default_project_id** | **String** | | [optional] |
11
+ | **filters** | [**Array<ReportFilter>**](ReportFilter.md) | | [optional] |
11
12
  | **merchant_id** | **String** | | [optional] |
12
13
  | **name** | **String** | | [optional] |
13
14
  | **pages** | [**Array<ReportPage>**](ReportPage.md) | | [optional] |
@@ -24,6 +25,7 @@ instance = UltracartClient::Report.new(
24
25
  data_sources: null,
25
26
  default_dataset_id: null,
26
27
  default_project_id: null,
28
+ filters: null,
27
29
  merchant_id: null,
28
30
  name: null,
29
31
  pages: null,
@@ -4,7 +4,12 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **name** | **String** | | [optional] |
7
+ | **_in** | **Boolean** | | [optional] |
8
+ | **n** | **String** | | [optional] |
9
+ | **vd** | **String** | | [optional] |
10
+ | **vdt** | **String** | | [optional] |
11
+ | **vn** | **Float** | | [optional] |
12
+ | **vs** | **String** | | [optional] |
8
13
 
9
14
  ## Example
10
15
 
@@ -12,7 +17,12 @@
12
17
  require 'ultracart_api'
13
18
 
14
19
  instance = UltracartClient::ReportDataSetColumn.new(
15
- name: null
20
+ _in: null,
21
+ n: null,
22
+ vd: null,
23
+ vdt: null,
24
+ vn: null,
25
+ vs: null
16
26
  )
17
27
  ```
18
28
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **columns** | [**Array<ReportDataSetColumn>**](ReportDataSetColumn.md) | | [optional] |
7
+ | **c** | [**Array<ReportDataSetColumn>**](ReportDataSetColumn.md) | | [optional] |
8
8
 
9
9
  ## Example
10
10
 
@@ -12,7 +12,7 @@
12
12
  require 'ultracart_api'
13
13
 
14
14
  instance = UltracartClient::ReportDataSetRow.new(
15
- columns: null
15
+ c: null
16
16
  )
17
17
  ```
18
18
 
data/docs/ReportFilter.md CHANGED
@@ -4,10 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **config** | **String** | A JSON representation of the configuration for this visualization | [optional] |
8
7
  | **connections** | [**Array<ReportFilterConnection>**](ReportFilterConnection.md) | How this filter connects to the data sources and columns | [optional] |
9
8
  | **name** | **String** | | [optional] |
10
- | **styles** | **String** | A JSON representation of the style configuration for this visualization | [optional] |
11
9
  | **timezone** | **String** | The timezone that the date range is querying on. | [optional] |
12
10
  | **type** | **String** | Type of filter | [optional] |
13
11
  | **uuid** | **String** | Unique UUID assigned to the filter. Assists when returning values that the filter can use. | [optional] |
@@ -19,10 +17,8 @@
19
17
  require 'ultracart_api'
20
18
 
21
19
  instance = UltracartClient::ReportFilter.new(
22
- config: null,
23
20
  connections: null,
24
21
  name: null,
25
- styles: null,
26
22
  timezone: null,
27
23
  type: null,
28
24
  uuid: null,
data/docs/ReportPage.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **filters** | [**Array<ReportFilter>**](ReportFilter.md) | | [optional] |
7
+ | **filters** | [**Array<ReportPageFilter>**](ReportPageFilter.md) | | [optional] |
8
8
  | **height** | **Float** | Height of the report page in inches | [optional] |
9
9
  | **title** | **String** | | [optional] |
10
10
  | **visualizations** | [**Array<ReportPageVisualization>**](ReportPageVisualization.md) | Visualizations on the report page. | [optional] |
@@ -0,0 +1,24 @@
1
+ # UltracartClient::ReportPageFilter
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **config** | **String** | A JSON representation of the configuration for this visualization | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **styles** | **String** | A JSON representation of the style configuration for this visualization | [optional] |
10
+ | **uuid** | **String** | Unique UUID assigned to the filter. Assists when returning values that the filter can use. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ultracart_api'
16
+
17
+ instance = UltracartClient::ReportPageFilter.new(
18
+ config: null,
19
+ name: null,
20
+ styles: null,
21
+ uuid: null
22
+ )
23
+ ```
24
+
@@ -23,6 +23,8 @@ module UltracartClient
23
23
 
24
24
  attr_accessor :default_project_id
25
25
 
26
+ attr_accessor :filters
27
+
26
28
  attr_accessor :merchant_id
27
29
 
28
30
  attr_accessor :name
@@ -64,6 +66,7 @@ module UltracartClient
64
66
  :'data_sources' => :'data_sources',
65
67
  :'default_dataset_id' => :'default_dataset_id',
66
68
  :'default_project_id' => :'default_project_id',
69
+ :'filters' => :'filters',
67
70
  :'merchant_id' => :'merchant_id',
68
71
  :'name' => :'name',
69
72
  :'pages' => :'pages',
@@ -84,6 +87,7 @@ module UltracartClient
84
87
  :'data_sources' => :'Array<ReportDataSource>',
85
88
  :'default_dataset_id' => :'String',
86
89
  :'default_project_id' => :'String',
90
+ :'filters' => :'Array<ReportFilter>',
87
91
  :'merchant_id' => :'String',
88
92
  :'name' => :'String',
89
93
  :'pages' => :'Array<ReportPage>',
@@ -131,6 +135,12 @@ module UltracartClient
131
135
  self.default_project_id = attributes[:'default_project_id']
132
136
  end
133
137
 
138
+ if attributes.key?(:'filters')
139
+ if (value = attributes[:'filters']).is_a?(Array)
140
+ self.filters = value
141
+ end
142
+ end
143
+
134
144
  if attributes.key?(:'merchant_id')
135
145
  self.merchant_id = attributes[:'merchant_id']
136
146
  end
@@ -188,6 +198,7 @@ module UltracartClient
188
198
  data_sources == o.data_sources &&
189
199
  default_dataset_id == o.default_dataset_id &&
190
200
  default_project_id == o.default_project_id &&
201
+ filters == o.filters &&
191
202
  merchant_id == o.merchant_id &&
192
203
  name == o.name &&
193
204
  pages == o.pages &&
@@ -204,7 +215,7 @@ module UltracartClient
204
215
  # Calculates hash code according to all attributes.
205
216
  # @return [Integer] Hash code
206
217
  def hash
207
- [active, data_sources, default_dataset_id, default_project_id, merchant_id, name, pages, report_oid, security_level].hash
218
+ [active, data_sources, default_dataset_id, default_project_id, filters, merchant_id, name, pages, report_oid, security_level].hash
208
219
  end
209
220
 
210
221
  # Builds the object from hash
@@ -15,12 +15,27 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ReportDataSetColumn
18
- attr_accessor :name
18
+ attr_accessor :_in
19
+
20
+ attr_accessor :n
21
+
22
+ attr_accessor :vd
23
+
24
+ attr_accessor :vdt
25
+
26
+ attr_accessor :vn
27
+
28
+ attr_accessor :vs
19
29
 
20
30
  # Attribute mapping from ruby-style variable name to JSON key.
21
31
  def self.attribute_map
22
32
  {
23
- :'name' => :'name'
33
+ :'_in' => :'in',
34
+ :'n' => :'n',
35
+ :'vd' => :'vd',
36
+ :'vdt' => :'vdt',
37
+ :'vn' => :'vn',
38
+ :'vs' => :'vs'
24
39
  }
25
40
  end
26
41
 
@@ -32,7 +47,12 @@ module UltracartClient
32
47
  # Attribute type mapping.
33
48
  def self.openapi_types
34
49
  {
35
- :'name' => :'String'
50
+ :'_in' => :'Boolean',
51
+ :'n' => :'String',
52
+ :'vd' => :'String',
53
+ :'vdt' => :'String',
54
+ :'vn' => :'Float',
55
+ :'vs' => :'String'
36
56
  }
37
57
  end
38
58
 
@@ -57,8 +77,28 @@ module UltracartClient
57
77
  h[k.to_sym] = v
58
78
  }
59
79
 
60
- if attributes.key?(:'name')
61
- self.name = attributes[:'name']
80
+ if attributes.key?(:'_in')
81
+ self._in = attributes[:'_in']
82
+ end
83
+
84
+ if attributes.key?(:'n')
85
+ self.n = attributes[:'n']
86
+ end
87
+
88
+ if attributes.key?(:'vd')
89
+ self.vd = attributes[:'vd']
90
+ end
91
+
92
+ if attributes.key?(:'vdt')
93
+ self.vdt = attributes[:'vdt']
94
+ end
95
+
96
+ if attributes.key?(:'vn')
97
+ self.vn = attributes[:'vn']
98
+ end
99
+
100
+ if attributes.key?(:'vs')
101
+ self.vs = attributes[:'vs']
62
102
  end
63
103
  end
64
104
 
@@ -80,7 +120,12 @@ module UltracartClient
80
120
  def ==(o)
81
121
  return true if self.equal?(o)
82
122
  self.class == o.class &&
83
- name == o.name
123
+ _in == o._in &&
124
+ n == o.n &&
125
+ vd == o.vd &&
126
+ vdt == o.vdt &&
127
+ vn == o.vn &&
128
+ vs == o.vs
84
129
  end
85
130
 
86
131
  # @see the `==` method
@@ -92,7 +137,7 @@ module UltracartClient
92
137
  # Calculates hash code according to all attributes.
93
138
  # @return [Integer] Hash code
94
139
  def hash
95
- [name].hash
140
+ [_in, n, vd, vdt, vn, vs].hash
96
141
  end
97
142
 
98
143
  # Builds the object from hash
@@ -15,12 +15,12 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ReportDataSetRow
18
- attr_accessor :columns
18
+ attr_accessor :c
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
- :'columns' => :'columns'
23
+ :'c' => :'c'
24
24
  }
25
25
  end
26
26
 
@@ -32,7 +32,7 @@ module UltracartClient
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'columns' => :'Array<ReportDataSetColumn>'
35
+ :'c' => :'Array<ReportDataSetColumn>'
36
36
  }
37
37
  end
38
38
 
@@ -57,9 +57,9 @@ module UltracartClient
57
57
  h[k.to_sym] = v
58
58
  }
59
59
 
60
- if attributes.key?(:'columns')
61
- if (value = attributes[:'columns']).is_a?(Array)
62
- self.columns = value
60
+ if attributes.key?(:'c')
61
+ if (value = attributes[:'c']).is_a?(Array)
62
+ self.c = value
63
63
  end
64
64
  end
65
65
  end
@@ -82,7 +82,7 @@ module UltracartClient
82
82
  def ==(o)
83
83
  return true if self.equal?(o)
84
84
  self.class == o.class &&
85
- columns == o.columns
85
+ c == o.c
86
86
  end
87
87
 
88
88
  # @see the `==` method
@@ -94,7 +94,7 @@ module UltracartClient
94
94
  # Calculates hash code according to all attributes.
95
95
  # @return [Integer] Hash code
96
96
  def hash
97
- [columns].hash
97
+ [c].hash
98
98
  end
99
99
 
100
100
  # Builds the object from hash
@@ -15,17 +15,11 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ReportFilter
18
- # A JSON representation of the configuration for this visualization
19
- attr_accessor :config
20
-
21
18
  # How this filter connects to the data sources and columns
22
19
  attr_accessor :connections
23
20
 
24
21
  attr_accessor :name
25
22
 
26
- # A JSON representation of the style configuration for this visualization
27
- attr_accessor :styles
28
-
29
23
  # The timezone that the date range is querying on.
30
24
  attr_accessor :timezone
31
25
 
@@ -63,10 +57,8 @@ module UltracartClient
63
57
  # Attribute mapping from ruby-style variable name to JSON key.
64
58
  def self.attribute_map
65
59
  {
66
- :'config' => :'config',
67
60
  :'connections' => :'connections',
68
61
  :'name' => :'name',
69
- :'styles' => :'styles',
70
62
  :'timezone' => :'timezone',
71
63
  :'type' => :'type',
72
64
  :'uuid' => :'uuid',
@@ -82,10 +74,8 @@ module UltracartClient
82
74
  # Attribute type mapping.
83
75
  def self.openapi_types
84
76
  {
85
- :'config' => :'String',
86
77
  :'connections' => :'Array<ReportFilterConnection>',
87
78
  :'name' => :'String',
88
- :'styles' => :'String',
89
79
  :'timezone' => :'String',
90
80
  :'type' => :'String',
91
81
  :'uuid' => :'String',
@@ -114,10 +104,6 @@ module UltracartClient
114
104
  h[k.to_sym] = v
115
105
  }
116
106
 
117
- if attributes.key?(:'config')
118
- self.config = attributes[:'config']
119
- end
120
-
121
107
  if attributes.key?(:'connections')
122
108
  if (value = attributes[:'connections']).is_a?(Array)
123
109
  self.connections = value
@@ -128,10 +114,6 @@ module UltracartClient
128
114
  self.name = attributes[:'name']
129
115
  end
130
116
 
131
- if attributes.key?(:'styles')
132
- self.styles = attributes[:'styles']
133
- end
134
-
135
117
  if attributes.key?(:'timezone')
136
118
  self.timezone = attributes[:'timezone']
137
119
  end
@@ -181,10 +163,8 @@ module UltracartClient
181
163
  def ==(o)
182
164
  return true if self.equal?(o)
183
165
  self.class == o.class &&
184
- config == o.config &&
185
166
  connections == o.connections &&
186
167
  name == o.name &&
187
- styles == o.styles &&
188
168
  timezone == o.timezone &&
189
169
  type == o.type &&
190
170
  uuid == o.uuid &&
@@ -200,7 +180,7 @@ module UltracartClient
200
180
  # Calculates hash code according to all attributes.
201
181
  # @return [Integer] Hash code
202
182
  def hash
203
- [config, connections, name, styles, timezone, type, uuid, values].hash
183
+ [connections, name, timezone, type, uuid, values].hash
204
184
  end
205
185
 
206
186
  # Builds the object from hash
@@ -47,7 +47,7 @@ module UltracartClient
47
47
  # Attribute type mapping.
48
48
  def self.openapi_types
49
49
  {
50
- :'filters' => :'Array<ReportFilter>',
50
+ :'filters' => :'Array<ReportPageFilter>',
51
51
  :'height' => :'Float',
52
52
  :'title' => :'String',
53
53
  :'visualizations' => :'Array<ReportPageVisualization>',
@@ -0,0 +1,249 @@
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 ReportPageFilter
18
+ # A JSON representation of the configuration for this visualization
19
+ attr_accessor :config
20
+
21
+ attr_accessor :name
22
+
23
+ # A JSON representation of the style configuration for this visualization
24
+ attr_accessor :styles
25
+
26
+ # Unique UUID assigned to the filter. Assists when returning values that the filter can use.
27
+ attr_accessor :uuid
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'config' => :'config',
33
+ :'name' => :'name',
34
+ :'styles' => :'styles',
35
+ :'uuid' => :'uuid'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'config' => :'String',
48
+ :'name' => :'String',
49
+ :'styles' => :'String',
50
+ :'uuid' => :'String'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ReportPageFilter` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ReportPageFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'config')
76
+ self.config = attributes[:'config']
77
+ end
78
+
79
+ if attributes.key?(:'name')
80
+ self.name = attributes[:'name']
81
+ end
82
+
83
+ if attributes.key?(:'styles')
84
+ self.styles = attributes[:'styles']
85
+ end
86
+
87
+ if attributes.key?(:'uuid')
88
+ self.uuid = attributes[:'uuid']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ config == o.config &&
111
+ name == o.name &&
112
+ styles == o.styles &&
113
+ uuid == o.uuid
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [config, name, styles, uuid].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ new.build_from_hash(attributes)
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ self.class.openapi_types.each_pair do |key, type|
142
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
143
+ self.send("#{key}=", nil)
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
148
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ end
150
+ elsif !attributes[self.class.attribute_map[key]].nil?
151
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ end
153
+ end
154
+
155
+ self
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def _deserialize(type, value)
163
+ case type.to_sym
164
+ when :Time
165
+ Time.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :Boolean
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ # models (e.g. Pet) or oneOf
196
+ klass = UltracartClient.const_get(type)
197
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.148'
14
+ VERSION = '4.0.150'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -661,6 +661,7 @@ require 'ultracart_api/models/report_execute_queries_request'
661
661
  require 'ultracart_api/models/report_filter'
662
662
  require 'ultracart_api/models/report_filter_connection'
663
663
  require 'ultracart_api/models/report_page'
664
+ require 'ultracart_api/models/report_page_filter'
664
665
  require 'ultracart_api/models/report_page_visualization'
665
666
  require 'ultracart_api/models/report_page_visualization_dimension'
666
667
  require 'ultracart_api/models/report_page_visualization_metric'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.148
4
+ version: 4.0.150
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-19 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -720,6 +720,7 @@ files:
720
720
  - docs/ReportFilter.md
721
721
  - docs/ReportFilterConnection.md
722
722
  - docs/ReportPage.md
723
+ - docs/ReportPageFilter.md
723
724
  - docs/ReportPageVisualization.md
724
725
  - docs/ReportPageVisualizationDimension.md
725
726
  - docs/ReportPageVisualizationMetric.md
@@ -1519,6 +1520,7 @@ files:
1519
1520
  - lib/ultracart_api/models/report_filter.rb
1520
1521
  - lib/ultracart_api/models/report_filter_connection.rb
1521
1522
  - lib/ultracart_api/models/report_page.rb
1523
+ - lib/ultracart_api/models/report_page_filter.rb
1522
1524
  - lib/ultracart_api/models/report_page_visualization.rb
1523
1525
  - lib/ultracart_api/models/report_page_visualization_dimension.rb
1524
1526
  - lib/ultracart_api/models/report_page_visualization_metric.rb