hubspot-api-client 8.0.0 → 8.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hubspot-api-client.rb +3 -0
- data/lib/hubspot/codegen/cms/hubdb/api/default_api.rb +36 -36
- data/lib/hubspot/codegen/cms/hubdb/configuration.rb +9 -2
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +4 -2
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +240 -0
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +240 -0
- data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +210 -0
- data/lib/hubspot/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acf2e7fb94ef8ce618e5677ab2643da2e03cf787e7d391f02f97e918f1d87080
|
4
|
+
data.tar.gz: ba784c21711dc1d6069c5ab39fdac3d922981e9066530bffcc39c65cd2c5d0b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b161be2d1d0b0c13d717e4ad0e2c3aefe5405d6824c550ed6f5798294cb74e9f19c1c7a04b65cdbe548de6c913987cb16ebf8a5286104a935cfb7447af0fdc5
|
7
|
+
data.tar.gz: 7ad77bfedd7c43dd4c284ac5f26a66a9846cd44d833247fb56377e6efc9ca648f42f5c0ba51f1f4f1ab70c4ec8a783e008befbaee1dc72eb471f33dc85304545
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [8.0.1] - 2020-10-23
|
9
|
+
|
10
|
+
- Update Hubdb client
|
11
|
+
|
8
12
|
## [8.0.0] - 2020-10-20
|
9
13
|
|
10
14
|
- Add hubdb client
|
data/lib/hubspot-api-client.rb
CHANGED
@@ -54,12 +54,15 @@ require 'hubspot/codegen/cms/hubdb/models/batch_input_json_node'
|
|
54
54
|
require 'hubspot/codegen/cms/hubdb/models/batch_input_string'
|
55
55
|
require 'hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors'
|
56
56
|
require 'hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3'
|
57
|
+
require 'hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging'
|
57
58
|
require 'hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3'
|
59
|
+
require 'hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging'
|
58
60
|
require 'hubspot/codegen/cms/hubdb/models/column'
|
59
61
|
require 'hubspot/codegen/cms/hubdb/models/column_input'
|
60
62
|
require 'hubspot/codegen/cms/hubdb/models/error'
|
61
63
|
require 'hubspot/codegen/cms/hubdb/models/error_detail'
|
62
64
|
require 'hubspot/codegen/cms/hubdb/models/foreign_id'
|
65
|
+
require 'hubspot/codegen/cms/hubdb/models/forward_paging'
|
63
66
|
require 'hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request'
|
64
67
|
require 'hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3'
|
65
68
|
require 'hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3_input'
|
@@ -62,7 +62,7 @@ module Hubspot
|
|
62
62
|
post_body = opts[:body]
|
63
63
|
|
64
64
|
# auth_names
|
65
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
65
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
66
66
|
|
67
67
|
# return_type
|
68
68
|
return_type = opts[:return_type]
|
@@ -135,7 +135,7 @@ module Hubspot
|
|
135
135
|
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_string)
|
136
136
|
|
137
137
|
# auth_names
|
138
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
138
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
139
139
|
|
140
140
|
# return_type
|
141
141
|
return_type = opts[:return_type]
|
@@ -210,7 +210,7 @@ module Hubspot
|
|
210
210
|
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_hub_db_table_row_v3)
|
211
211
|
|
212
212
|
# auth_names
|
213
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
213
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
214
214
|
|
215
215
|
# return_type
|
216
216
|
return_type = opts[:return_type]
|
@@ -286,7 +286,7 @@ module Hubspot
|
|
286
286
|
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_string)
|
287
287
|
|
288
288
|
# auth_names
|
289
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
289
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
290
290
|
|
291
291
|
# return_type
|
292
292
|
return_type = opts[:return_type]
|
@@ -359,7 +359,7 @@ module Hubspot
|
|
359
359
|
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_string)
|
360
360
|
|
361
361
|
# auth_names
|
362
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
362
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
363
363
|
|
364
364
|
# return_type
|
365
365
|
return_type = opts[:return_type]
|
@@ -435,7 +435,7 @@ module Hubspot
|
|
435
435
|
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_string)
|
436
436
|
|
437
437
|
# auth_names
|
438
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
438
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
439
439
|
|
440
440
|
# return_type
|
441
441
|
return_type = opts[:return_type]
|
@@ -511,7 +511,7 @@ module Hubspot
|
|
511
511
|
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_hub_db_table_row_v3)
|
512
512
|
|
513
513
|
# auth_names
|
514
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
514
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
515
515
|
|
516
516
|
# return_type
|
517
517
|
return_type = opts[:return_type]
|
@@ -587,7 +587,7 @@ module Hubspot
|
|
587
587
|
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_json_node)
|
588
588
|
|
589
589
|
# auth_names
|
590
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
590
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
591
591
|
|
592
592
|
# return_type
|
593
593
|
return_type = opts[:return_type]
|
@@ -663,7 +663,7 @@ module Hubspot
|
|
663
663
|
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_clone_request)
|
664
664
|
|
665
665
|
# auth_names
|
666
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
666
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
667
667
|
|
668
668
|
# return_type
|
669
669
|
return_type = opts[:return_type]
|
@@ -741,7 +741,7 @@ module Hubspot
|
|
741
741
|
post_body = opts[:body]
|
742
742
|
|
743
743
|
# auth_names
|
744
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
744
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
745
745
|
|
746
746
|
# return_type
|
747
747
|
return_type = opts[:return_type]
|
@@ -810,7 +810,7 @@ module Hubspot
|
|
810
810
|
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_v3_input)
|
811
811
|
|
812
812
|
# auth_names
|
813
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
813
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
814
814
|
|
815
815
|
# return_type
|
816
816
|
return_type = opts[:return_type]
|
@@ -885,7 +885,7 @@ module Hubspot
|
|
885
885
|
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_row_v3_input)
|
886
886
|
|
887
887
|
# auth_names
|
888
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
888
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
889
889
|
|
890
890
|
# return_type
|
891
891
|
return_type = opts[:return_type]
|
@@ -955,7 +955,7 @@ module Hubspot
|
|
955
955
|
post_body = opts[:body]
|
956
956
|
|
957
957
|
# auth_names
|
958
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
958
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
959
959
|
|
960
960
|
# return_type
|
961
961
|
return_type = opts[:return_type]
|
@@ -1025,7 +1025,7 @@ module Hubspot
|
|
1025
1025
|
post_body = opts[:body]
|
1026
1026
|
|
1027
1027
|
# auth_names
|
1028
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1028
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1029
1029
|
|
1030
1030
|
# return_type
|
1031
1031
|
return_type = opts[:return_type]
|
@@ -1064,7 +1064,7 @@ module Hubspot
|
|
1064
1064
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
1065
1065
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
1066
1066
|
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
1067
|
-
# @return [
|
1067
|
+
# @return [CollectionResponseWithTotalHubDbTableV3ForwardPaging]
|
1068
1068
|
def get_all_draft_tables(opts = {})
|
1069
1069
|
data, _status_code, _headers = get_all_draft_tables_with_http_info(opts)
|
1070
1070
|
data
|
@@ -1083,7 +1083,7 @@ module Hubspot
|
|
1083
1083
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
1084
1084
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
1085
1085
|
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
1086
|
-
# @return [Array<(
|
1086
|
+
# @return [Array<(CollectionResponseWithTotalHubDbTableV3ForwardPaging, Integer, Hash)>] CollectionResponseWithTotalHubDbTableV3ForwardPaging data, response status code and response headers
|
1087
1087
|
def get_all_draft_tables_with_http_info(opts = {})
|
1088
1088
|
if @api_client.config.debugging
|
1089
1089
|
@api_client.config.logger.debug 'Calling API: DefaultApi.get_all_draft_tables ...'
|
@@ -1116,13 +1116,13 @@ module Hubspot
|
|
1116
1116
|
post_body = opts[:body]
|
1117
1117
|
|
1118
1118
|
# auth_names
|
1119
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1119
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1120
1120
|
|
1121
1121
|
# return_type
|
1122
1122
|
return_type = opts[:return_type]
|
1123
1123
|
|
1124
1124
|
return_types_map = {
|
1125
|
-
200 => '
|
1125
|
+
200 => 'CollectionResponseWithTotalHubDbTableV3ForwardPaging',
|
1126
1126
|
}
|
1127
1127
|
|
1128
1128
|
new_options = opts.merge(
|
@@ -1155,7 +1155,7 @@ module Hubspot
|
|
1155
1155
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
1156
1156
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
1157
1157
|
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
1158
|
-
# @return [
|
1158
|
+
# @return [CollectionResponseWithTotalHubDbTableV3ForwardPaging]
|
1159
1159
|
def get_all_tables(opts = {})
|
1160
1160
|
data, _status_code, _headers = get_all_tables_with_http_info(opts)
|
1161
1161
|
data
|
@@ -1174,7 +1174,7 @@ module Hubspot
|
|
1174
1174
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
1175
1175
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
1176
1176
|
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
1177
|
-
# @return [Array<(
|
1177
|
+
# @return [Array<(CollectionResponseWithTotalHubDbTableV3ForwardPaging, Integer, Hash)>] CollectionResponseWithTotalHubDbTableV3ForwardPaging data, response status code and response headers
|
1178
1178
|
def get_all_tables_with_http_info(opts = {})
|
1179
1179
|
if @api_client.config.debugging
|
1180
1180
|
@api_client.config.logger.debug 'Calling API: DefaultApi.get_all_tables ...'
|
@@ -1207,13 +1207,13 @@ module Hubspot
|
|
1207
1207
|
post_body = opts[:body]
|
1208
1208
|
|
1209
1209
|
# auth_names
|
1210
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1210
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1211
1211
|
|
1212
1212
|
# return_type
|
1213
1213
|
return_type = opts[:return_type]
|
1214
1214
|
|
1215
1215
|
return_types_map = {
|
1216
|
-
200 => '
|
1216
|
+
200 => 'CollectionResponseWithTotalHubDbTableV3ForwardPaging',
|
1217
1217
|
}
|
1218
1218
|
|
1219
1219
|
new_options = opts.merge(
|
@@ -1280,7 +1280,7 @@ module Hubspot
|
|
1280
1280
|
post_body = opts[:body]
|
1281
1281
|
|
1282
1282
|
# auth_names
|
1283
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1283
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1284
1284
|
|
1285
1285
|
# return_type
|
1286
1286
|
return_type = opts[:return_type]
|
@@ -1358,7 +1358,7 @@ module Hubspot
|
|
1358
1358
|
post_body = opts[:body]
|
1359
1359
|
|
1360
1360
|
# auth_names
|
1361
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1361
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1362
1362
|
|
1363
1363
|
# return_type
|
1364
1364
|
return_type = opts[:return_type]
|
@@ -1433,7 +1433,7 @@ module Hubspot
|
|
1433
1433
|
post_body = opts[:body]
|
1434
1434
|
|
1435
1435
|
# auth_names
|
1436
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1436
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1437
1437
|
|
1438
1438
|
# return_type
|
1439
1439
|
return_type = opts[:return_type]
|
@@ -1503,7 +1503,7 @@ module Hubspot
|
|
1503
1503
|
post_body = opts[:body]
|
1504
1504
|
|
1505
1505
|
# auth_names
|
1506
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1506
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1507
1507
|
|
1508
1508
|
# return_type
|
1509
1509
|
return_type = opts[:return_type]
|
@@ -1581,7 +1581,7 @@ module Hubspot
|
|
1581
1581
|
post_body = opts[:body]
|
1582
1582
|
|
1583
1583
|
# auth_names
|
1584
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1584
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1585
1585
|
|
1586
1586
|
# return_type
|
1587
1587
|
return_type = opts[:return_type]
|
@@ -1613,7 +1613,7 @@ module Hubspot
|
|
1613
1613
|
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
1614
1614
|
# @option opts [Integer] :limit The maximum number of results to return. Default is `1000`.
|
1615
1615
|
# @option opts [Array<String>] :sort Specifies the column names to sort the results by.
|
1616
|
-
# @return [
|
1616
|
+
# @return [CollectionResponseWithTotalHubDbTableRowV3ForwardPaging]
|
1617
1617
|
def read_draft_table_rows(table_id, opts = {})
|
1618
1618
|
data, _status_code, _headers = read_draft_table_rows_with_http_info(table_id, opts)
|
1619
1619
|
data
|
@@ -1627,7 +1627,7 @@ module Hubspot
|
|
1627
1627
|
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
1628
1628
|
# @option opts [Integer] :limit The maximum number of results to return. Default is `1000`.
|
1629
1629
|
# @option opts [Array<String>] :sort Specifies the column names to sort the results by.
|
1630
|
-
# @return [Array<(
|
1630
|
+
# @return [Array<(CollectionResponseWithTotalHubDbTableRowV3ForwardPaging, Integer, Hash)>] CollectionResponseWithTotalHubDbTableRowV3ForwardPaging data, response status code and response headers
|
1631
1631
|
def read_draft_table_rows_with_http_info(table_id, opts = {})
|
1632
1632
|
if @api_client.config.debugging
|
1633
1633
|
@api_client.config.logger.debug 'Calling API: DefaultApi.read_draft_table_rows ...'
|
@@ -1658,13 +1658,13 @@ module Hubspot
|
|
1658
1658
|
post_body = opts[:body]
|
1659
1659
|
|
1660
1660
|
# auth_names
|
1661
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1661
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1662
1662
|
|
1663
1663
|
# return_type
|
1664
1664
|
return_type = opts[:return_type]
|
1665
1665
|
|
1666
1666
|
return_types_map = {
|
1667
|
-
200 => '
|
1667
|
+
200 => 'CollectionResponseWithTotalHubDbTableRowV3ForwardPaging',
|
1668
1668
|
}
|
1669
1669
|
|
1670
1670
|
new_options = opts.merge(
|
@@ -1744,7 +1744,7 @@ module Hubspot
|
|
1744
1744
|
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_row_v3_input)
|
1745
1745
|
|
1746
1746
|
# auth_names
|
1747
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1747
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1748
1748
|
|
1749
1749
|
# return_type
|
1750
1750
|
return_type = opts[:return_type]
|
@@ -1814,7 +1814,7 @@ module Hubspot
|
|
1814
1814
|
post_body = opts[:body]
|
1815
1815
|
|
1816
1816
|
# auth_names
|
1817
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1817
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1818
1818
|
|
1819
1819
|
# return_type
|
1820
1820
|
return_type = opts[:return_type]
|
@@ -1892,7 +1892,7 @@ module Hubspot
|
|
1892
1892
|
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_v3_input)
|
1893
1893
|
|
1894
1894
|
# auth_names
|
1895
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1895
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1896
1896
|
|
1897
1897
|
# return_type
|
1898
1898
|
return_type = opts[:return_type]
|
@@ -1978,7 +1978,7 @@ module Hubspot
|
|
1978
1978
|
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_row_v3_input)
|
1979
1979
|
|
1980
1980
|
# auth_names
|
1981
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
1981
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
1982
1982
|
|
1983
1983
|
# return_type
|
1984
1984
|
return_type = opts[:return_type]
|
@@ -2059,7 +2059,7 @@ module Hubspot
|
|
2059
2059
|
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_v3_live_input)
|
2060
2060
|
|
2061
2061
|
# auth_names
|
2062
|
-
auth_names = opts[:auth_names] || ['oauth2']
|
2062
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
2063
2063
|
|
2064
2064
|
# return_type
|
2065
2065
|
return_type = opts[:return_type]
|
@@ -126,7 +126,7 @@ module Hubspot
|
|
126
126
|
|
127
127
|
def initialize
|
128
128
|
@scheme = 'https'
|
129
|
-
@host = '
|
129
|
+
@host = 'app.hubspot.com'
|
130
130
|
@base_path = ''
|
131
131
|
@api_key = {}
|
132
132
|
@api_key_prefix = {}
|
@@ -194,6 +194,13 @@ module Hubspot
|
|
194
194
|
# Returns Auth Settings hash for api client.
|
195
195
|
def auth_settings
|
196
196
|
{
|
197
|
+
'hapikey' =>
|
198
|
+
{
|
199
|
+
type: 'api_key',
|
200
|
+
in: 'query',
|
201
|
+
key: 'hapikey',
|
202
|
+
value: api_key_with_prefix('hapikey')
|
203
|
+
},
|
197
204
|
'oauth2' =>
|
198
205
|
{
|
199
206
|
type: 'oauth2',
|
@@ -208,7 +215,7 @@ module Hubspot
|
|
208
215
|
def server_settings
|
209
216
|
[
|
210
217
|
{
|
211
|
-
url: "https://
|
218
|
+
url: "https://app.hubspot.com/",
|
212
219
|
description: "No description provided",
|
213
220
|
}
|
214
221
|
]
|
@@ -28,7 +28,7 @@ module Hubspot
|
|
28
28
|
# Attribute type mapping.
|
29
29
|
def self.openapi_types
|
30
30
|
{
|
31
|
-
:'inputs' => :'Array'
|
31
|
+
:'inputs' => :'Array<Object>'
|
32
32
|
}
|
33
33
|
end
|
34
34
|
|
@@ -54,7 +54,9 @@ module Hubspot
|
|
54
54
|
}
|
55
55
|
|
56
56
|
if attributes.key?(:'inputs')
|
57
|
-
|
57
|
+
if (value = attributes[:'inputs']).is_a?(Array)
|
58
|
+
self.inputs = value
|
59
|
+
end
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|
@@ -0,0 +1,240 @@
|
|
1
|
+
=begin
|
2
|
+
#HubDB endpoints
|
3
|
+
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables now support `DRAFT` and `PUBLISHED` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Cms
|
17
|
+
module Hubdb
|
18
|
+
class CollectionResponseWithTotalHubDbTableRowV3ForwardPaging
|
19
|
+
attr_accessor :total
|
20
|
+
|
21
|
+
attr_accessor :results
|
22
|
+
|
23
|
+
attr_accessor :paging
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'total' => :'total',
|
29
|
+
:'results' => :'results',
|
30
|
+
:'paging' => :'paging'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'total' => :'Integer',
|
38
|
+
:'results' => :'Array<HubDbTableRowV3>',
|
39
|
+
:'paging' => :'ForwardPaging'
|
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 `Hubspot::Cms::Hubdb::CollectionResponseWithTotalHubDbTableRowV3ForwardPaging` 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 `Hubspot::Cms::Hubdb::CollectionResponseWithTotalHubDbTableRowV3ForwardPaging`. 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?(:'total')
|
65
|
+
self.total = attributes[:'total']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'results')
|
69
|
+
if (value = attributes[:'results']).is_a?(Array)
|
70
|
+
self.results = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'paging')
|
75
|
+
self.paging = attributes[:'paging']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
if @total.nil?
|
84
|
+
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
85
|
+
end
|
86
|
+
|
87
|
+
if @results.nil?
|
88
|
+
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
89
|
+
end
|
90
|
+
|
91
|
+
invalid_properties
|
92
|
+
end
|
93
|
+
|
94
|
+
# Check to see if the all the properties in the model are valid
|
95
|
+
# @return true if the model is valid
|
96
|
+
def valid?
|
97
|
+
return false if @total.nil?
|
98
|
+
return false if @results.nil?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
total == o.total &&
|
108
|
+
results == o.results &&
|
109
|
+
paging == o.paging
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Integer] Hash code
|
120
|
+
def hash
|
121
|
+
[total, results, paging].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def self.build_from_hash(attributes)
|
128
|
+
new.build_from_hash(attributes)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Builds the object from hash
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
# @return [Object] Returns the model itself
|
134
|
+
def build_from_hash(attributes)
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
136
|
+
self.class.openapi_types.each_pair do |key, type|
|
137
|
+
if type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
142
|
+
end
|
143
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
146
|
+
end
|
147
|
+
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserializes the data based on type
|
152
|
+
# @param string type Data type
|
153
|
+
# @param string value Value to be deserialized
|
154
|
+
# @return [Object] Deserialized data
|
155
|
+
def _deserialize(type, value)
|
156
|
+
case type.to_sym
|
157
|
+
when :DateTime
|
158
|
+
DateTime.parse(value)
|
159
|
+
when :Date
|
160
|
+
Date.parse(value)
|
161
|
+
when :String
|
162
|
+
value.to_s
|
163
|
+
when :Integer
|
164
|
+
value.to_i
|
165
|
+
when :Float
|
166
|
+
value.to_f
|
167
|
+
when :Boolean
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
|
+
true
|
170
|
+
else
|
171
|
+
false
|
172
|
+
end
|
173
|
+
when :Object
|
174
|
+
# generic object (usually a Hash), return directly
|
175
|
+
value
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each do |k, v|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
else # model
|
188
|
+
Hubspot::Cms::Hubdb.const_get(type).build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
if value.nil?
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
213
|
+
end
|
214
|
+
|
215
|
+
hash[param] = _to_hash(value)
|
216
|
+
end
|
217
|
+
hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Outputs non-array value in the form of hash
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
222
|
+
# @param [Object] value Any valid value
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
224
|
+
def _to_hash(value)
|
225
|
+
if value.is_a?(Array)
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
227
|
+
elsif value.is_a?(Hash)
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
230
|
+
end
|
231
|
+
elsif value.respond_to? :to_hash
|
232
|
+
value.to_hash
|
233
|
+
else
|
234
|
+
value
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
@@ -0,0 +1,240 @@
|
|
1
|
+
=begin
|
2
|
+
#HubDB endpoints
|
3
|
+
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables now support `DRAFT` and `PUBLISHED` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Cms
|
17
|
+
module Hubdb
|
18
|
+
class CollectionResponseWithTotalHubDbTableV3ForwardPaging
|
19
|
+
attr_accessor :total
|
20
|
+
|
21
|
+
attr_accessor :results
|
22
|
+
|
23
|
+
attr_accessor :paging
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'total' => :'total',
|
29
|
+
:'results' => :'results',
|
30
|
+
:'paging' => :'paging'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'total' => :'Integer',
|
38
|
+
:'results' => :'Array<HubDbTableV3>',
|
39
|
+
:'paging' => :'ForwardPaging'
|
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 `Hubspot::Cms::Hubdb::CollectionResponseWithTotalHubDbTableV3ForwardPaging` 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 `Hubspot::Cms::Hubdb::CollectionResponseWithTotalHubDbTableV3ForwardPaging`. 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?(:'total')
|
65
|
+
self.total = attributes[:'total']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'results')
|
69
|
+
if (value = attributes[:'results']).is_a?(Array)
|
70
|
+
self.results = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'paging')
|
75
|
+
self.paging = attributes[:'paging']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
if @total.nil?
|
84
|
+
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
85
|
+
end
|
86
|
+
|
87
|
+
if @results.nil?
|
88
|
+
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
89
|
+
end
|
90
|
+
|
91
|
+
invalid_properties
|
92
|
+
end
|
93
|
+
|
94
|
+
# Check to see if the all the properties in the model are valid
|
95
|
+
# @return true if the model is valid
|
96
|
+
def valid?
|
97
|
+
return false if @total.nil?
|
98
|
+
return false if @results.nil?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
total == o.total &&
|
108
|
+
results == o.results &&
|
109
|
+
paging == o.paging
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Integer] Hash code
|
120
|
+
def hash
|
121
|
+
[total, results, paging].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def self.build_from_hash(attributes)
|
128
|
+
new.build_from_hash(attributes)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Builds the object from hash
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
# @return [Object] Returns the model itself
|
134
|
+
def build_from_hash(attributes)
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
136
|
+
self.class.openapi_types.each_pair do |key, type|
|
137
|
+
if type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
142
|
+
end
|
143
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
146
|
+
end
|
147
|
+
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserializes the data based on type
|
152
|
+
# @param string type Data type
|
153
|
+
# @param string value Value to be deserialized
|
154
|
+
# @return [Object] Deserialized data
|
155
|
+
def _deserialize(type, value)
|
156
|
+
case type.to_sym
|
157
|
+
when :DateTime
|
158
|
+
DateTime.parse(value)
|
159
|
+
when :Date
|
160
|
+
Date.parse(value)
|
161
|
+
when :String
|
162
|
+
value.to_s
|
163
|
+
when :Integer
|
164
|
+
value.to_i
|
165
|
+
when :Float
|
166
|
+
value.to_f
|
167
|
+
when :Boolean
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
|
+
true
|
170
|
+
else
|
171
|
+
false
|
172
|
+
end
|
173
|
+
when :Object
|
174
|
+
# generic object (usually a Hash), return directly
|
175
|
+
value
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each do |k, v|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
else # model
|
188
|
+
Hubspot::Cms::Hubdb.const_get(type).build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
if value.nil?
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
213
|
+
end
|
214
|
+
|
215
|
+
hash[param] = _to_hash(value)
|
216
|
+
end
|
217
|
+
hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Outputs non-array value in the form of hash
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
222
|
+
# @param [Object] value Any valid value
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
224
|
+
def _to_hash(value)
|
225
|
+
if value.is_a?(Array)
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
227
|
+
elsif value.is_a?(Hash)
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
230
|
+
end
|
231
|
+
elsif value.respond_to? :to_hash
|
232
|
+
value.to_hash
|
233
|
+
else
|
234
|
+
value
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
@@ -0,0 +1,210 @@
|
|
1
|
+
=begin
|
2
|
+
#HubDB endpoints
|
3
|
+
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables now support `DRAFT` and `PUBLISHED` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Cms
|
17
|
+
module Hubdb
|
18
|
+
class ForwardPaging
|
19
|
+
attr_accessor :_next
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'_next' => :'next'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'_next' => :'NextPage'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
])
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
if (!attributes.is_a?(Hash))
|
45
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::Hubdb::ForwardPaging` initialize method"
|
46
|
+
end
|
47
|
+
|
48
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
50
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
51
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::Hubdb::ForwardPaging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
|
+
end
|
53
|
+
h[k.to_sym] = v
|
54
|
+
}
|
55
|
+
|
56
|
+
if attributes.key?(:'_next')
|
57
|
+
self._next = attributes[:'_next']
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
true
|
72
|
+
end
|
73
|
+
|
74
|
+
# Checks equality by comparing each attribute.
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def ==(o)
|
77
|
+
return true if self.equal?(o)
|
78
|
+
self.class == o.class &&
|
79
|
+
_next == o._next
|
80
|
+
end
|
81
|
+
|
82
|
+
# @see the `==` method
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def eql?(o)
|
85
|
+
self == o
|
86
|
+
end
|
87
|
+
|
88
|
+
# Calculates hash code according to all attributes.
|
89
|
+
# @return [Integer] Hash code
|
90
|
+
def hash
|
91
|
+
[_next].hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# Builds the object from hash
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
# @return [Object] Returns the model itself
|
97
|
+
def self.build_from_hash(attributes)
|
98
|
+
new.build_from_hash(attributes)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def build_from_hash(attributes)
|
105
|
+
return nil unless attributes.is_a?(Hash)
|
106
|
+
self.class.openapi_types.each_pair do |key, type|
|
107
|
+
if type =~ /\AArray<(.*)>/i
|
108
|
+
# check to ensure the input is an array given that the attribute
|
109
|
+
# is documented as an array but the input is not
|
110
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
111
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
112
|
+
end
|
113
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
114
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
115
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
116
|
+
end
|
117
|
+
|
118
|
+
self
|
119
|
+
end
|
120
|
+
|
121
|
+
# Deserializes the data based on type
|
122
|
+
# @param string type Data type
|
123
|
+
# @param string value Value to be deserialized
|
124
|
+
# @return [Object] Deserialized data
|
125
|
+
def _deserialize(type, value)
|
126
|
+
case type.to_sym
|
127
|
+
when :DateTime
|
128
|
+
DateTime.parse(value)
|
129
|
+
when :Date
|
130
|
+
Date.parse(value)
|
131
|
+
when :String
|
132
|
+
value.to_s
|
133
|
+
when :Integer
|
134
|
+
value.to_i
|
135
|
+
when :Float
|
136
|
+
value.to_f
|
137
|
+
when :Boolean
|
138
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
139
|
+
true
|
140
|
+
else
|
141
|
+
false
|
142
|
+
end
|
143
|
+
when :Object
|
144
|
+
# generic object (usually a Hash), return directly
|
145
|
+
value
|
146
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
147
|
+
inner_type = Regexp.last_match[:inner_type]
|
148
|
+
value.map { |v| _deserialize(inner_type, v) }
|
149
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
150
|
+
k_type = Regexp.last_match[:k_type]
|
151
|
+
v_type = Regexp.last_match[:v_type]
|
152
|
+
{}.tap do |hash|
|
153
|
+
value.each do |k, v|
|
154
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
else # model
|
158
|
+
Hubspot::Cms::Hubdb.const_get(type).build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
if value.nil?
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
183
|
+
end
|
184
|
+
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Outputs non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
# @param [Object] value Any valid value
|
193
|
+
# @return [Hash] Returns the value in the form of hash
|
194
|
+
def _to_hash(value)
|
195
|
+
if value.is_a?(Array)
|
196
|
+
value.compact.map { |v| _to_hash(v) }
|
197
|
+
elsif value.is_a?(Hash)
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
200
|
+
end
|
201
|
+
elsif value.respond_to? :to_hash
|
202
|
+
value.to_hash
|
203
|
+
else
|
204
|
+
value
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
data/lib/hubspot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubspot-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.0.
|
4
|
+
version: 8.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HubSpot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -230,12 +230,15 @@ files:
|
|
230
230
|
- lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb
|
231
231
|
- lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb
|
232
232
|
- lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3.rb
|
233
|
+
- lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb
|
233
234
|
- lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3.rb
|
235
|
+
- lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb
|
234
236
|
- lib/hubspot/codegen/cms/hubdb/models/column.rb
|
235
237
|
- lib/hubspot/codegen/cms/hubdb/models/column_input.rb
|
236
238
|
- lib/hubspot/codegen/cms/hubdb/models/error.rb
|
237
239
|
- lib/hubspot/codegen/cms/hubdb/models/error_detail.rb
|
238
240
|
- lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb
|
241
|
+
- lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb
|
239
242
|
- lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb
|
240
243
|
- lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb
|
241
244
|
- lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3_input.rb
|