appnigma-sdk 0.1.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 +7 -0
- data/LICENSE +21 -0
- data/README.md +359 -0
- data/lib/appnigma/checks.rb +90 -0
- data/lib/appnigma/client.rb +118 -0
- data/lib/appnigma/connections.rb +31 -0
- data/lib/appnigma/constants.rb +80 -0
- data/lib/appnigma/crm.rb +40 -0
- data/lib/appnigma/errors.rb +135 -0
- data/lib/appnigma/generated/api/default_api.rb +972 -0
- data/lib/appnigma/generated/api_client.rb +441 -0
- data/lib/appnigma/generated/api_error.rb +58 -0
- data/lib/appnigma/generated/api_model_base.rb +88 -0
- data/lib/appnigma/generated/configuration.rb +392 -0
- data/lib/appnigma/generated/models/connection_status.rb +41 -0
- data/lib/appnigma/generated/models/create_connection_link_input.rb +265 -0
- data/lib/appnigma/generated/models/create_connection_link_output.rb +205 -0
- data/lib/appnigma/generated/models/crm_company.rb +322 -0
- data/lib/appnigma/generated/models/crm_company_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_company_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_contact.rb +404 -0
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_custom_field.rb +189 -0
- data/lib/appnigma/generated/models/crm_deal.rb +479 -0
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_email.rb +249 -0
- data/lib/appnigma/generated/models/crm_get_input.rb +272 -0
- data/lib/appnigma/generated/models/crm_labelled.rb +190 -0
- data/lib/appnigma/generated/models/crm_list_input.rb +303 -0
- data/lib/appnigma/generated/models/crm_phone.rb +249 -0
- data/lib/appnigma/generated/models/function_entry.rb +346 -0
- data/lib/appnigma/generated/models/function_owner.rb +105 -0
- data/lib/appnigma/generated/models/function_owner_one_of.rb +201 -0
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +227 -0
- data/lib/appnigma/generated/models/get_connection_output.rb +251 -0
- data/lib/appnigma/generated/models/get_guide_output.rb +178 -0
- data/lib/appnigma/generated/models/json_value.rb +106 -0
- data/lib/appnigma/generated/models/list_functions_output.rb +179 -0
- data/lib/appnigma/generated/models/platform_request_input.rb +314 -0
- data/lib/appnigma/generated/models/platform_request_input_body.rb +104 -0
- data/lib/appnigma/generated/models/platform_request_output.rb +221 -0
- data/lib/appnigma/generated/models/post_input.rb +327 -0
- data/lib/appnigma/generated/models/post_input_record_value.rb +104 -0
- data/lib/appnigma/generated/models/post_output.rb +203 -0
- data/lib/appnigma/generated/models/pull_input.rb +335 -0
- data/lib/appnigma/generated/models/pull_output.rb +191 -0
- data/lib/appnigma/generated/models/pull_output_records_inner.rb +205 -0
- data/lib/appnigma/generated/models/run_input.rb +332 -0
- data/lib/appnigma/generated/models/run_output.rb +164 -0
- data/lib/appnigma/generated/models/sdk_error.rb +177 -0
- data/lib/appnigma/generated/models/sdk_error_error.rb +254 -0
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +211 -0
- data/lib/appnigma/generated/models/sdk_problem.rb +205 -0
- data/lib/appnigma/generated/version.rb +15 -0
- data/lib/appnigma/generated.rb +82 -0
- data/lib/appnigma/names.rb +62 -0
- data/lib/appnigma/retry.rb +80 -0
- data/lib/appnigma/transport.rb +138 -0
- data/lib/appnigma/version.rb +9 -0
- data/lib/appnigma.rb +16 -0
- metadata +155 -0
|
@@ -0,0 +1,205 @@
|
|
|
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: 1.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 CreateConnectionLinkOutput < ApiModelBase
|
|
18
|
+
# Send the end customer here. It works once and lasts 15 minutes; opening it does not spend it, pressing Connect on the page does.
|
|
19
|
+
attr_accessor :url
|
|
20
|
+
|
|
21
|
+
# ISO 8601, in UTC
|
|
22
|
+
attr_accessor :expires_at
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'url' => :'url',
|
|
28
|
+
:'expires_at' => :'expiresAt'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'url' => :'String',
|
|
46
|
+
:'expires_at' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns attribute type mapping
|
|
57
|
+
def self.acceptable_openapi_types
|
|
58
|
+
openapi_types
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns the nullable attributes
|
|
62
|
+
def self.acceptable_openapi_nullable
|
|
63
|
+
openapi_nullable
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::CreateConnectionLinkOutput` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::CreateConnectionLinkOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'url')
|
|
83
|
+
self.url = attributes[:'url']
|
|
84
|
+
else
|
|
85
|
+
self.url = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'expires_at')
|
|
89
|
+
self.expires_at = attributes[:'expires_at']
|
|
90
|
+
else
|
|
91
|
+
self.expires_at = nil
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
if @url.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if @expires_at.nil?
|
|
105
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
|
+
return false if @url.nil?
|
|
116
|
+
return false if @expires_at.nil?
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] url Value to be assigned
|
|
122
|
+
def url=(url)
|
|
123
|
+
if url.nil?
|
|
124
|
+
fail ArgumentError, 'url cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@url = url
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] expires_at Value to be assigned
|
|
132
|
+
def expires_at=(expires_at)
|
|
133
|
+
if expires_at.nil?
|
|
134
|
+
fail ArgumentError, 'expires_at cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
@expires_at = expires_at
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Checks equality by comparing each attribute.
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def ==(o)
|
|
143
|
+
return true if self.equal?(o)
|
|
144
|
+
self.class == o.class &&
|
|
145
|
+
url == o.url &&
|
|
146
|
+
expires_at == o.expires_at
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[url, expires_at].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
|
166
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
167
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
168
|
+
map = acceptable_attribute_map
|
|
169
|
+
transformed_hash = {}
|
|
170
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
171
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
172
|
+
transformed_hash["#{key}"] = nil
|
|
173
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
174
|
+
# check to ensure the input is an array given that the attribute
|
|
175
|
+
# is documented as an array but the input is not
|
|
176
|
+
if attributes[map[key]].is_a?(Array)
|
|
177
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
178
|
+
end
|
|
179
|
+
elsif !attributes[map[key]].nil?
|
|
180
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
new(transformed_hash)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
191
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
192
|
+
value = self.send(attr)
|
|
193
|
+
if value.nil?
|
|
194
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
end
|
|
@@ -0,0 +1,322 @@
|
|
|
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: 1.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 CrmCompany < ApiModelBase
|
|
18
|
+
# The record's id in the CRM
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :platform
|
|
22
|
+
|
|
23
|
+
# ISO 8601, in UTC
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
# ISO 8601, in UTC
|
|
27
|
+
attr_accessor :updated_at
|
|
28
|
+
|
|
29
|
+
# The CRM's custom properties, by their internal name
|
|
30
|
+
attr_accessor :custom_fields
|
|
31
|
+
|
|
32
|
+
# The record exactly as the CRM sent it
|
|
33
|
+
attr_accessor :raw
|
|
34
|
+
|
|
35
|
+
attr_accessor :name
|
|
36
|
+
|
|
37
|
+
attr_accessor :domain
|
|
38
|
+
|
|
39
|
+
attr_accessor :owner_id
|
|
40
|
+
|
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
|
+
def self.attribute_map
|
|
43
|
+
{
|
|
44
|
+
:'id' => :'id',
|
|
45
|
+
:'platform' => :'platform',
|
|
46
|
+
:'created_at' => :'createdAt',
|
|
47
|
+
:'updated_at' => :'updatedAt',
|
|
48
|
+
:'custom_fields' => :'customFields',
|
|
49
|
+
:'raw' => :'raw',
|
|
50
|
+
:'name' => :'name',
|
|
51
|
+
:'domain' => :'domain',
|
|
52
|
+
:'owner_id' => :'ownerId'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
acceptable_attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'id' => :'String',
|
|
70
|
+
:'platform' => :'String',
|
|
71
|
+
:'created_at' => :'String',
|
|
72
|
+
:'updated_at' => :'String',
|
|
73
|
+
:'custom_fields' => :'Hash<String, CrmCustomField>',
|
|
74
|
+
:'raw' => :'Object',
|
|
75
|
+
:'name' => :'String',
|
|
76
|
+
:'domain' => :'String',
|
|
77
|
+
:'owner_id' => :'String'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# List of attributes with nullable: true
|
|
82
|
+
def self.openapi_nullable
|
|
83
|
+
Set.new([
|
|
84
|
+
:'created_at',
|
|
85
|
+
:'updated_at',
|
|
86
|
+
:'name',
|
|
87
|
+
:'domain',
|
|
88
|
+
:'owner_id'
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns attribute type mapping
|
|
93
|
+
def self.acceptable_openapi_types
|
|
94
|
+
openapi_types
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Returns the nullable attributes
|
|
98
|
+
def self.acceptable_openapi_nullable
|
|
99
|
+
openapi_nullable
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Initializes the object
|
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
104
|
+
def initialize(attributes = {})
|
|
105
|
+
if (!attributes.is_a?(Hash))
|
|
106
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::CrmCompany` initialize method"
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
110
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
111
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::CrmCompany`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
114
|
+
end
|
|
115
|
+
h[k.to_sym] = v
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'id')
|
|
119
|
+
self.id = attributes[:'id']
|
|
120
|
+
else
|
|
121
|
+
self.id = nil
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'platform')
|
|
125
|
+
self.platform = attributes[:'platform']
|
|
126
|
+
else
|
|
127
|
+
self.platform = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'created_at')
|
|
131
|
+
self.created_at = attributes[:'created_at']
|
|
132
|
+
else
|
|
133
|
+
self.created_at = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'updated_at')
|
|
137
|
+
self.updated_at = attributes[:'updated_at']
|
|
138
|
+
else
|
|
139
|
+
self.updated_at = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'custom_fields')
|
|
143
|
+
if (value = attributes[:'custom_fields']).is_a?(Hash)
|
|
144
|
+
self.custom_fields = value
|
|
145
|
+
end
|
|
146
|
+
else
|
|
147
|
+
self.custom_fields = nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'raw')
|
|
151
|
+
self.raw = attributes[:'raw']
|
|
152
|
+
else
|
|
153
|
+
self.raw = nil
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'name')
|
|
157
|
+
self.name = attributes[:'name']
|
|
158
|
+
else
|
|
159
|
+
self.name = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'domain')
|
|
163
|
+
self.domain = attributes[:'domain']
|
|
164
|
+
else
|
|
165
|
+
self.domain = nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'owner_id')
|
|
169
|
+
self.owner_id = attributes[:'owner_id']
|
|
170
|
+
else
|
|
171
|
+
self.owner_id = nil
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
176
|
+
# @return Array for valid properties with the reasons
|
|
177
|
+
def list_invalid_properties
|
|
178
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
179
|
+
invalid_properties = Array.new
|
|
180
|
+
if @id.nil?
|
|
181
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if @platform.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @custom_fields.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "custom_fields", custom_fields cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @raw.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "raw", raw cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
invalid_properties
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Check to see if the all the properties in the model are valid
|
|
200
|
+
# @return true if the model is valid
|
|
201
|
+
def valid?
|
|
202
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
203
|
+
return false if @id.nil?
|
|
204
|
+
return false if @platform.nil?
|
|
205
|
+
return false if @custom_fields.nil?
|
|
206
|
+
return false if @raw.nil?
|
|
207
|
+
true
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Custom attribute writer method with validation
|
|
211
|
+
# @param [Object] id Value to be assigned
|
|
212
|
+
def id=(id)
|
|
213
|
+
if id.nil?
|
|
214
|
+
fail ArgumentError, 'id cannot be nil'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
@id = id
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Custom attribute writer method with validation
|
|
221
|
+
# @param [Object] platform Value to be assigned
|
|
222
|
+
def platform=(platform)
|
|
223
|
+
if platform.nil?
|
|
224
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
@platform = platform
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Custom attribute writer method with validation
|
|
231
|
+
# @param [Object] custom_fields Value to be assigned
|
|
232
|
+
def custom_fields=(custom_fields)
|
|
233
|
+
if custom_fields.nil?
|
|
234
|
+
fail ArgumentError, 'custom_fields cannot be nil'
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
@custom_fields = custom_fields
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Custom attribute writer method with validation
|
|
241
|
+
# @param [Object] raw Value to be assigned
|
|
242
|
+
def raw=(raw)
|
|
243
|
+
if raw.nil?
|
|
244
|
+
fail ArgumentError, 'raw cannot be nil'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
@raw = raw
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Checks equality by comparing each attribute.
|
|
251
|
+
# @param [Object] Object to be compared
|
|
252
|
+
def ==(o)
|
|
253
|
+
return true if self.equal?(o)
|
|
254
|
+
self.class == o.class &&
|
|
255
|
+
id == o.id &&
|
|
256
|
+
platform == o.platform &&
|
|
257
|
+
created_at == o.created_at &&
|
|
258
|
+
updated_at == o.updated_at &&
|
|
259
|
+
custom_fields == o.custom_fields &&
|
|
260
|
+
raw == o.raw &&
|
|
261
|
+
name == o.name &&
|
|
262
|
+
domain == o.domain &&
|
|
263
|
+
owner_id == o.owner_id
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# @see the `==` method
|
|
267
|
+
# @param [Object] Object to be compared
|
|
268
|
+
def eql?(o)
|
|
269
|
+
self == o
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Calculates hash code according to all attributes.
|
|
273
|
+
# @return [Integer] Hash code
|
|
274
|
+
def hash
|
|
275
|
+
[id, platform, created_at, updated_at, custom_fields, raw, name, domain, owner_id].hash
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Builds the object from hash
|
|
279
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
280
|
+
# @return [Object] Returns the model itself
|
|
281
|
+
def self.build_from_hash(attributes)
|
|
282
|
+
return nil unless attributes.is_a?(Hash)
|
|
283
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
284
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
285
|
+
map = acceptable_attribute_map
|
|
286
|
+
transformed_hash = {}
|
|
287
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
288
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
289
|
+
transformed_hash["#{key}"] = nil
|
|
290
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
291
|
+
# check to ensure the input is an array given that the attribute
|
|
292
|
+
# is documented as an array but the input is not
|
|
293
|
+
if attributes[map[key]].is_a?(Array)
|
|
294
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
295
|
+
end
|
|
296
|
+
elsif !attributes[map[key]].nil?
|
|
297
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
new(transformed_hash)
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Returns the object in the form of hash
|
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
|
305
|
+
def to_hash
|
|
306
|
+
hash = {}
|
|
307
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
308
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
309
|
+
value = self.send(attr)
|
|
310
|
+
if value.nil?
|
|
311
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
312
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
hash[param] = _to_hash(value)
|
|
316
|
+
end
|
|
317
|
+
hash
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
end
|
|
@@ -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: 1.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 CrmCompanyGetOutput < 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' => :'CrmCompany'
|
|
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::CrmCompanyGetOutput` 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::CrmCompanyGetOutput`. 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
|