appnigma-sdk 0.2.1 → 2.0.0
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 +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +230 -97
- data/lib/appnigma/checks.rb +29 -5
- data/lib/appnigma/client.rb +38 -37
- data/lib/appnigma/connections.rb +25 -5
- data/lib/appnigma/constants.rb +15 -8
- data/lib/appnigma/crm.rb +63 -6
- data/lib/appnigma/errors.rb +45 -4
- data/lib/appnigma/generated/api/default_api.rb +824 -129
- data/lib/appnigma/generated/api_client.rb +1 -1
- data/lib/appnigma/generated/api_error.rb +1 -1
- data/lib/appnigma/generated/api_model_base.rb +1 -1
- data/lib/appnigma/generated/configuration.rb +1 -1
- data/lib/appnigma/generated/models/action_entry.rb +341 -0
- data/lib/appnigma/generated/models/connection_status.rb +3 -2
- data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
- data/lib/appnigma/generated/models/create_connection_link_output.rb +2 -2
- data/lib/appnigma/generated/models/{post_output.rb → create_portal_link_input.rb} +20 -46
- data/lib/appnigma/generated/models/{pull_output_records_inner.rb → create_portal_link_output.rb} +37 -37
- data/lib/appnigma/generated/models/crm_company.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_write_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_contact.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_write_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_create_input.rb +245 -0
- data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal.rb +1 -1
- data/lib/appnigma/generated/models/{post_input.rb → crm_deal_create_input.rb} +48 -92
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_write_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_email.rb +1 -1
- data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
- data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_phone.rb +1 -1
- data/lib/appnigma/generated/models/{pull_input.rb → crm_update_input.rb} +67 -112
- data/lib/appnigma/generated/models/end_customer.rb +247 -0
- data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
- data/lib/appnigma/generated/models/function_entry.rb +74 -5
- data/lib/appnigma/generated/models/function_owner.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +18 -17
- data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
- data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
- data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
- data/lib/appnigma/generated/models/json_value.rb +1 -1
- data/lib/appnigma/generated/models/list_actions_output.rb +179 -0
- data/lib/appnigma/generated/models/{pull_output.rb → list_connections_output.rb} +23 -21
- data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_platforms_output.rb +179 -0
- data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
- data/lib/appnigma/generated/models/platform_entry.rb +269 -0
- data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +219 -0
- data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
- data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
- data/lib/appnigma/generated/models/ran_as.rb +4 -6
- data/lib/appnigma/generated/models/run_action_input.rb +266 -0
- data/lib/appnigma/generated/models/run_action_output.rb +178 -0
- data/lib/appnigma/generated/models/run_input.rb +39 -26
- data/lib/appnigma/generated/models/run_output.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +41 -3
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +21 -7
- data/lib/appnigma/names.rb +9 -0
- data/lib/appnigma/platforms.rb +18 -0
- data/lib/appnigma/portal.rb +21 -0
- data/lib/appnigma/retry.rb +3 -3
- data/lib/appnigma/transport.rb +4 -4
- data/lib/appnigma/version.rb +2 -2
- metadata +23 -7
- data/lib/appnigma/generated/models/post_input_record_value.rb +0 -104
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Appnigma SDK API
|
|
3
|
+
|
|
4
|
+
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Appnigma::Generated
|
|
17
|
+
class CrmDealWriteOutput < ApiModelBase
|
|
18
|
+
attr_accessor :record
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'record' => :'record'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'record' => :'CrmDeal'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns attribute type mapping
|
|
51
|
+
def self.acceptable_openapi_types
|
|
52
|
+
openapi_types
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns the nullable attributes
|
|
56
|
+
def self.acceptable_openapi_nullable
|
|
57
|
+
openapi_nullable
|
|
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 `Appnigma::Generated::CrmDealWriteOutput` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::CrmDealWriteOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'record')
|
|
77
|
+
self.record = attributes[:'record']
|
|
78
|
+
else
|
|
79
|
+
self.record = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @record.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "record", record cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
return false if @record.nil?
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Custom attribute writer method with validation
|
|
104
|
+
# @param [Object] record Value to be assigned
|
|
105
|
+
def record=(record)
|
|
106
|
+
if record.nil?
|
|
107
|
+
fail ArgumentError, 'record cannot be nil'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
@record = record
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Checks equality by comparing each attribute.
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def ==(o)
|
|
116
|
+
return true if self.equal?(o)
|
|
117
|
+
self.class == o.class &&
|
|
118
|
+
record == o.record
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see the `==` method
|
|
122
|
+
# @param [Object] Object to be compared
|
|
123
|
+
def eql?(o)
|
|
124
|
+
self == o
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Integer] Hash code
|
|
129
|
+
def hash
|
|
130
|
+
[record].hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Builds the object from hash
|
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
135
|
+
# @return [Object] Returns the model itself
|
|
136
|
+
def self.build_from_hash(attributes)
|
|
137
|
+
return nil unless attributes.is_a?(Hash)
|
|
138
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
139
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
140
|
+
map = acceptable_attribute_map
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns the object in the form of hash
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_hash
|
|
161
|
+
hash = {}
|
|
162
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
163
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
164
|
+
value = self.send(attr)
|
|
165
|
+
if value.nil?
|
|
166
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
167
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
hash[param] = _to_hash(value)
|
|
171
|
+
end
|
|
172
|
+
hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
17
|
class CrmGetInput < ApiModelBase
|
|
18
|
-
# Your own id for the end customer.
|
|
18
|
+
# Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
|
|
19
19
|
attr_accessor :end_customer_id
|
|
20
20
|
|
|
21
21
|
# The platform key, such as hubspot.
|
|
@@ -112,11 +112,6 @@ module Appnigma::Generated
|
|
|
112
112
|
invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
116
|
-
if @end_customer_id !~ pattern
|
|
117
|
-
invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
|
|
118
|
-
end
|
|
119
|
-
|
|
120
115
|
if @platform.nil?
|
|
121
116
|
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
122
117
|
end
|
|
@@ -146,7 +141,6 @@ module Appnigma::Generated
|
|
|
146
141
|
def valid?
|
|
147
142
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
148
143
|
return false if @end_customer_id.nil?
|
|
149
|
-
return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
150
144
|
return false if @platform.nil?
|
|
151
145
|
return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
152
146
|
return false if @id.nil?
|
|
@@ -162,11 +156,6 @@ module Appnigma::Generated
|
|
|
162
156
|
fail ArgumentError, 'end_customer_id cannot be nil'
|
|
163
157
|
end
|
|
164
158
|
|
|
165
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
166
|
-
if end_customer_id !~ pattern
|
|
167
|
-
fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
|
|
168
|
-
end
|
|
169
|
-
|
|
170
159
|
@end_customer_id = end_customer_id
|
|
171
160
|
end
|
|
172
161
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
17
|
class CrmListInput < ApiModelBase
|
|
18
|
-
# Your own id for the end customer.
|
|
18
|
+
# Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
|
|
19
19
|
attr_accessor :end_customer_id
|
|
20
20
|
|
|
21
21
|
# The platform key, such as hubspot.
|
|
@@ -119,11 +119,6 @@ module Appnigma::Generated
|
|
|
119
119
|
invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
123
|
-
if @end_customer_id !~ pattern
|
|
124
|
-
invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
|
|
125
|
-
end
|
|
126
|
-
|
|
127
122
|
if @platform.nil?
|
|
128
123
|
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
129
124
|
end
|
|
@@ -157,7 +152,6 @@ module Appnigma::Generated
|
|
|
157
152
|
def valid?
|
|
158
153
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
159
154
|
return false if @end_customer_id.nil?
|
|
160
|
-
return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
161
155
|
return false if @platform.nil?
|
|
162
156
|
return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
163
157
|
return false if !@limit.nil? && @limit > 100
|
|
@@ -174,11 +168,6 @@ module Appnigma::Generated
|
|
|
174
168
|
fail ArgumentError, 'end_customer_id cannot be nil'
|
|
175
169
|
end
|
|
176
170
|
|
|
177
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
178
|
-
if end_customer_id !~ pattern
|
|
179
|
-
fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
|
|
180
|
-
end
|
|
181
|
-
|
|
182
171
|
@end_customer_id = end_customer_id
|
|
183
172
|
end
|
|
184
173
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -14,51 +14,26 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
|
-
class
|
|
18
|
-
# Your own id for the end customer.
|
|
17
|
+
class CrmUpdateInput < ApiModelBase
|
|
18
|
+
# Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
|
|
19
19
|
attr_accessor :end_customer_id
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# The platform key, such as hubspot.
|
|
22
22
|
attr_accessor :platform
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
# The record's id in the CRM.
|
|
25
|
+
attr_accessor :id
|
|
25
26
|
|
|
26
|
-
#
|
|
27
|
-
attr_accessor :
|
|
28
|
-
|
|
29
|
-
# The next marker from the previous page.
|
|
30
|
-
attr_accessor :after
|
|
31
|
-
|
|
32
|
-
class EnumAttributeValidator
|
|
33
|
-
attr_reader :datatype
|
|
34
|
-
attr_reader :allowable_values
|
|
35
|
-
|
|
36
|
-
def initialize(datatype, allowable_values)
|
|
37
|
-
@allowable_values = allowable_values.map do |value|
|
|
38
|
-
case datatype.to_s
|
|
39
|
-
when /Integer/i
|
|
40
|
-
value.to_i
|
|
41
|
-
when /Float/i
|
|
42
|
-
value.to_f
|
|
43
|
-
else
|
|
44
|
-
value
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def valid?(value)
|
|
50
|
-
!value || allowable_values.include?(value)
|
|
51
|
-
end
|
|
52
|
-
end
|
|
27
|
+
# The fields to set. null clears a value; a field left out is left alone.
|
|
28
|
+
attr_accessor :record
|
|
53
29
|
|
|
54
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
31
|
def self.attribute_map
|
|
56
32
|
{
|
|
57
33
|
:'end_customer_id' => :'endCustomerId',
|
|
58
34
|
:'platform' => :'platform',
|
|
59
|
-
:'
|
|
60
|
-
:'
|
|
61
|
-
:'after' => :'after'
|
|
35
|
+
:'id' => :'id',
|
|
36
|
+
:'record' => :'record'
|
|
62
37
|
}
|
|
63
38
|
end
|
|
64
39
|
|
|
@@ -77,9 +52,8 @@ module Appnigma::Generated
|
|
|
77
52
|
{
|
|
78
53
|
:'end_customer_id' => :'String',
|
|
79
54
|
:'platform' => :'String',
|
|
80
|
-
:'
|
|
81
|
-
:'
|
|
82
|
-
:'after' => :'String'
|
|
55
|
+
:'id' => :'String',
|
|
56
|
+
:'record' => :'Hash<String, JsonValue>'
|
|
83
57
|
}
|
|
84
58
|
end
|
|
85
59
|
|
|
@@ -103,14 +77,14 @@ module Appnigma::Generated
|
|
|
103
77
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
104
78
|
def initialize(attributes = {})
|
|
105
79
|
if (!attributes.is_a?(Hash))
|
|
106
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::CrmUpdateInput` initialize method"
|
|
107
81
|
end
|
|
108
82
|
|
|
109
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
110
84
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
111
85
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
86
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
113
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::CrmUpdateInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
114
88
|
end
|
|
115
89
|
h[k.to_sym] = v
|
|
116
90
|
}
|
|
@@ -127,18 +101,18 @@ module Appnigma::Generated
|
|
|
127
101
|
self.platform = nil
|
|
128
102
|
end
|
|
129
103
|
|
|
130
|
-
if attributes.key?(:'
|
|
131
|
-
self.
|
|
104
|
+
if attributes.key?(:'id')
|
|
105
|
+
self.id = attributes[:'id']
|
|
132
106
|
else
|
|
133
|
-
self.
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
if attributes.key?(:'limit')
|
|
137
|
-
self.limit = attributes[:'limit']
|
|
107
|
+
self.id = nil
|
|
138
108
|
end
|
|
139
109
|
|
|
140
|
-
if attributes.key?(:'
|
|
141
|
-
|
|
110
|
+
if attributes.key?(:'record')
|
|
111
|
+
if (value = attributes[:'record']).is_a?(Hash)
|
|
112
|
+
self.record = value
|
|
113
|
+
end
|
|
114
|
+
else
|
|
115
|
+
self.record = nil
|
|
142
116
|
end
|
|
143
117
|
end
|
|
144
118
|
|
|
@@ -151,29 +125,29 @@ module Appnigma::Generated
|
|
|
151
125
|
invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
|
|
152
126
|
end
|
|
153
127
|
|
|
154
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
155
|
-
if @end_customer_id !~ pattern
|
|
156
|
-
invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
|
|
157
|
-
end
|
|
158
|
-
|
|
159
128
|
if @platform.nil?
|
|
160
129
|
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
161
130
|
end
|
|
162
131
|
|
|
163
|
-
|
|
164
|
-
|
|
132
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
133
|
+
if @platform !~ pattern
|
|
134
|
+
invalid_properties.push("invalid value for \"platform\", must conform to the pattern #{pattern}.")
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if @id.nil?
|
|
138
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
165
139
|
end
|
|
166
140
|
|
|
167
|
-
if
|
|
168
|
-
invalid_properties.push('invalid value for "
|
|
141
|
+
if @id.to_s.length > 200
|
|
142
|
+
invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 200.')
|
|
169
143
|
end
|
|
170
144
|
|
|
171
|
-
if
|
|
172
|
-
invalid_properties.push('invalid value for "
|
|
145
|
+
if @id.to_s.length < 1
|
|
146
|
+
invalid_properties.push('invalid value for "id", the character length must be greater than or equal to 1.')
|
|
173
147
|
end
|
|
174
148
|
|
|
175
|
-
if
|
|
176
|
-
invalid_properties.push('invalid value for "
|
|
149
|
+
if @record.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "record", record cannot be nil.')
|
|
177
151
|
end
|
|
178
152
|
|
|
179
153
|
invalid_properties
|
|
@@ -184,16 +158,12 @@ module Appnigma::Generated
|
|
|
184
158
|
def valid?
|
|
185
159
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
186
160
|
return false if @end_customer_id.nil?
|
|
187
|
-
return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
188
161
|
return false if @platform.nil?
|
|
189
|
-
|
|
190
|
-
return false
|
|
191
|
-
return false if @
|
|
192
|
-
|
|
193
|
-
return false
|
|
194
|
-
return false if !@limit.nil? && @limit > 100
|
|
195
|
-
return false if !@limit.nil? && @limit < 1
|
|
196
|
-
return false if !@after.nil? && @after.to_s.length < 1
|
|
162
|
+
return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
163
|
+
return false if @id.nil?
|
|
164
|
+
return false if @id.to_s.length > 200
|
|
165
|
+
return false if @id.to_s.length < 1
|
|
166
|
+
return false if @record.nil?
|
|
197
167
|
true
|
|
198
168
|
end
|
|
199
169
|
|
|
@@ -204,64 +174,50 @@ module Appnigma::Generated
|
|
|
204
174
|
fail ArgumentError, 'end_customer_id cannot be nil'
|
|
205
175
|
end
|
|
206
176
|
|
|
207
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
208
|
-
if end_customer_id !~ pattern
|
|
209
|
-
fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
|
|
210
|
-
end
|
|
211
|
-
|
|
212
177
|
@end_customer_id = end_customer_id
|
|
213
178
|
end
|
|
214
179
|
|
|
215
|
-
# Custom attribute writer method
|
|
216
|
-
# @param [Object] platform
|
|
180
|
+
# Custom attribute writer method with validation
|
|
181
|
+
# @param [Object] platform Value to be assigned
|
|
217
182
|
def platform=(platform)
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
183
|
+
if platform.nil?
|
|
184
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
221
185
|
end
|
|
222
|
-
@platform = platform
|
|
223
|
-
end
|
|
224
186
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
validator = EnumAttributeValidator.new('String', ["contact", "company", "deal"])
|
|
229
|
-
unless validator.valid?(object)
|
|
230
|
-
fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
|
|
187
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
188
|
+
if platform !~ pattern
|
|
189
|
+
fail ArgumentError, "invalid value for \"platform\", must conform to the pattern #{pattern}."
|
|
231
190
|
end
|
|
232
|
-
|
|
191
|
+
|
|
192
|
+
@platform = platform
|
|
233
193
|
end
|
|
234
194
|
|
|
235
195
|
# Custom attribute writer method with validation
|
|
236
|
-
# @param [Object]
|
|
237
|
-
def
|
|
238
|
-
if
|
|
239
|
-
fail ArgumentError, '
|
|
196
|
+
# @param [Object] id Value to be assigned
|
|
197
|
+
def id=(id)
|
|
198
|
+
if id.nil?
|
|
199
|
+
fail ArgumentError, 'id cannot be nil'
|
|
240
200
|
end
|
|
241
201
|
|
|
242
|
-
if
|
|
243
|
-
fail ArgumentError, 'invalid value for "
|
|
202
|
+
if id.to_s.length > 200
|
|
203
|
+
fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 200.'
|
|
244
204
|
end
|
|
245
205
|
|
|
246
|
-
if
|
|
247
|
-
fail ArgumentError, 'invalid value for "
|
|
206
|
+
if id.to_s.length < 1
|
|
207
|
+
fail ArgumentError, 'invalid value for "id", the character length must be greater than or equal to 1.'
|
|
248
208
|
end
|
|
249
209
|
|
|
250
|
-
@
|
|
210
|
+
@id = id
|
|
251
211
|
end
|
|
252
212
|
|
|
253
213
|
# Custom attribute writer method with validation
|
|
254
|
-
# @param [Object]
|
|
255
|
-
def
|
|
256
|
-
if
|
|
257
|
-
fail ArgumentError, '
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
if after.to_s.length < 1
|
|
261
|
-
fail ArgumentError, 'invalid value for "after", the character length must be greater than or equal to 1.'
|
|
214
|
+
# @param [Object] record Value to be assigned
|
|
215
|
+
def record=(record)
|
|
216
|
+
if record.nil?
|
|
217
|
+
fail ArgumentError, 'record cannot be nil'
|
|
262
218
|
end
|
|
263
219
|
|
|
264
|
-
@
|
|
220
|
+
@record = record
|
|
265
221
|
end
|
|
266
222
|
|
|
267
223
|
# Checks equality by comparing each attribute.
|
|
@@ -271,9 +227,8 @@ module Appnigma::Generated
|
|
|
271
227
|
self.class == o.class &&
|
|
272
228
|
end_customer_id == o.end_customer_id &&
|
|
273
229
|
platform == o.platform &&
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
after == o.after
|
|
230
|
+
id == o.id &&
|
|
231
|
+
record == o.record
|
|
277
232
|
end
|
|
278
233
|
|
|
279
234
|
# @see the `==` method
|
|
@@ -285,7 +240,7 @@ module Appnigma::Generated
|
|
|
285
240
|
# Calculates hash code according to all attributes.
|
|
286
241
|
# @return [Integer] Hash code
|
|
287
242
|
def hash
|
|
288
|
-
[end_customer_id, platform,
|
|
243
|
+
[end_customer_id, platform, id, record].hash
|
|
289
244
|
end
|
|
290
245
|
|
|
291
246
|
# Builds the object from hash
|