late-sdk 0.0.68 → 0.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +62 -0
  3. data/docs/AddBroadcastRecipientsRequest.md +20 -0
  4. data/docs/BroadcastsApi.md +699 -0
  5. data/docs/BulkCreateContactsRequest.md +24 -0
  6. data/docs/BulkCreateContactsRequestContactsInner.md +28 -0
  7. data/docs/CommentAutomationsApi.md +428 -0
  8. data/docs/ContactsApi.md +500 -0
  9. data/docs/CreateBroadcastRequest.md +32 -0
  10. data/docs/CreateBroadcastRequestMessage.md +20 -0
  11. data/docs/CreateBroadcastRequestMessageAttachmentsInner.md +22 -0
  12. data/docs/CreateBroadcastRequestSegmentFilters.md +20 -0
  13. data/docs/CreateBroadcastRequestTemplate.md +22 -0
  14. data/docs/CreateCommentAutomationRequest.md +36 -0
  15. data/docs/CreateContactRequest.md +38 -0
  16. data/docs/CreateCustomFieldRequest.md +26 -0
  17. data/docs/CreateSequenceRequest.md +32 -0
  18. data/docs/CreateSequenceRequestStepsInner.md +24 -0
  19. data/docs/CreateSequenceRequestStepsInnerMessage.md +18 -0
  20. data/docs/CustomFieldsApi.md +419 -0
  21. data/docs/EnrollContactsRequest.md +20 -0
  22. data/docs/ListCommentAutomations200Response.md +20 -0
  23. data/docs/ListCommentAutomations200ResponseAutomationsInner.md +42 -0
  24. data/docs/ListCommentAutomations200ResponseAutomationsInnerStats.md +24 -0
  25. data/docs/ScheduleBroadcastRequest.md +18 -0
  26. data/docs/SequencesApi.md +697 -0
  27. data/docs/SetContactFieldValueRequest.md +18 -0
  28. data/docs/UpdateCommentAutomationRequest.md +28 -0
  29. data/docs/UpdateContactRequest.md +32 -0
  30. data/docs/UpdateCustomFieldRequest.md +20 -0
  31. data/docs/WhatsAppApi.md +25 -25
  32. data/lib/late-sdk/api/broadcasts_api.rb +689 -0
  33. data/lib/late-sdk/api/comment_automations_api.rb +420 -0
  34. data/lib/late-sdk/api/contacts_api.rb +503 -0
  35. data/lib/late-sdk/api/custom_fields_api.rb +424 -0
  36. data/lib/late-sdk/api/sequences_api.rb +681 -0
  37. data/lib/late-sdk/api/whats_app_api.rb +50 -50
  38. data/lib/late-sdk/models/add_broadcast_recipients_request.rb +160 -0
  39. data/lib/late-sdk/models/bulk_create_contacts_request.rb +253 -0
  40. data/lib/late-sdk/models/bulk_create_contacts_request_contacts_inner.rb +228 -0
  41. data/lib/late-sdk/models/create_broadcast_request.rb +302 -0
  42. data/lib/late-sdk/models/create_broadcast_request_message.rb +158 -0
  43. data/lib/late-sdk/models/create_broadcast_request_message_attachments_inner.rb +165 -0
  44. data/lib/late-sdk/models/create_broadcast_request_segment_filters.rb +158 -0
  45. data/lib/late-sdk/models/create_broadcast_request_template.rb +168 -0
  46. data/lib/late-sdk/models/create_comment_automation_request.rb +359 -0
  47. data/lib/late-sdk/models/create_contact_request.rb +276 -0
  48. data/lib/late-sdk/models/create_custom_field_request.rb +262 -0
  49. data/lib/late-sdk/models/create_sequence_request.rb +308 -0
  50. data/lib/late-sdk/models/create_sequence_request_steps_inner.rb +208 -0
  51. data/lib/late-sdk/models/create_sequence_request_steps_inner_message.rb +147 -0
  52. data/lib/late-sdk/models/enroll_contacts_request.rb +178 -0
  53. data/lib/late-sdk/models/list_comment_automations200_response.rb +158 -0
  54. data/lib/late-sdk/models/list_comment_automations200_response_automations_inner.rb +303 -0
  55. data/lib/late-sdk/models/list_comment_automations200_response_automations_inner_stats.rb +174 -0
  56. data/lib/late-sdk/models/schedule_broadcast_request.rb +164 -0
  57. data/lib/late-sdk/models/set_contact_field_value_request.rb +150 -0
  58. data/lib/late-sdk/models/update_comment_automation_request.rb +228 -0
  59. data/lib/late-sdk/models/update_contact_request.rb +212 -0
  60. data/lib/late-sdk/models/update_custom_field_request.rb +158 -0
  61. data/lib/late-sdk/version.rb +1 -1
  62. data/lib/late-sdk.rb +28 -0
  63. data/openapi.yaml +809 -13
  64. data/spec/api/broadcasts_api_spec.rb +154 -0
  65. data/spec/api/comment_automations_api_spec.rb +108 -0
  66. data/spec/api/contacts_api_spec.rb +122 -0
  67. data/spec/api/custom_fields_api_spec.rb +105 -0
  68. data/spec/api/sequences_api_spec.rb +153 -0
  69. data/spec/api/whats_app_api_spec.rb +25 -25
  70. data/spec/models/add_broadcast_recipients_request_spec.rb +42 -0
  71. data/spec/models/bulk_create_contacts_request_contacts_inner_spec.rb +66 -0
  72. data/spec/models/bulk_create_contacts_request_spec.rb +54 -0
  73. data/spec/models/create_broadcast_request_message_attachments_inner_spec.rb +48 -0
  74. data/spec/models/create_broadcast_request_message_spec.rb +42 -0
  75. data/spec/models/create_broadcast_request_segment_filters_spec.rb +42 -0
  76. data/spec/models/create_broadcast_request_spec.rb +82 -0
  77. data/spec/models/create_broadcast_request_template_spec.rb +48 -0
  78. data/spec/models/create_comment_automation_request_spec.rb +94 -0
  79. data/spec/models/create_contact_request_spec.rb +96 -0
  80. data/spec/models/create_custom_field_request_spec.rb +64 -0
  81. data/spec/models/create_sequence_request_spec.rb +82 -0
  82. data/spec/models/create_sequence_request_steps_inner_message_spec.rb +36 -0
  83. data/spec/models/create_sequence_request_steps_inner_spec.rb +54 -0
  84. data/spec/models/enroll_contacts_request_spec.rb +42 -0
  85. data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +116 -0
  86. data/spec/models/list_comment_automations200_response_automations_inner_stats_spec.rb +54 -0
  87. data/spec/models/list_comment_automations200_response_spec.rb +42 -0
  88. data/spec/models/schedule_broadcast_request_spec.rb +36 -0
  89. data/spec/models/set_contact_field_value_request_spec.rb +36 -0
  90. data/spec/models/update_comment_automation_request_spec.rb +70 -0
  91. data/spec/models/update_contact_request_spec.rb +78 -0
  92. data/spec/models/update_custom_field_request_spec.rb +42 -0
  93. data/zernio-sdk-0.0.69.gem +0 -0
  94. metadata +114 -2
  95. data/zernio-sdk-0.0.68.gem +0 -0
@@ -0,0 +1,228 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class UpdateCommentAutomationRequest < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :keywords
21
+
22
+ attr_accessor :match_mode
23
+
24
+ attr_accessor :dm_message
25
+
26
+ attr_accessor :comment_reply
27
+
28
+ attr_accessor :is_active
29
+
30
+ class EnumAttributeValidator
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
33
+
34
+ def initialize(datatype, allowable_values)
35
+ @allowable_values = allowable_values.map do |value|
36
+ case datatype.to_s
37
+ when /Integer/i
38
+ value.to_i
39
+ when /Float/i
40
+ value.to_f
41
+ else
42
+ value
43
+ end
44
+ end
45
+ end
46
+
47
+ def valid?(value)
48
+ !value || allowable_values.include?(value)
49
+ end
50
+ end
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'name' => :'name',
56
+ :'keywords' => :'keywords',
57
+ :'match_mode' => :'matchMode',
58
+ :'dm_message' => :'dmMessage',
59
+ :'comment_reply' => :'commentReply',
60
+ :'is_active' => :'isActive'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'name' => :'String',
78
+ :'keywords' => :'Array<String>',
79
+ :'match_mode' => :'String',
80
+ :'dm_message' => :'String',
81
+ :'comment_reply' => :'String',
82
+ :'is_active' => :'Boolean'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateCommentAutomationRequest` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ acceptable_attribute_map = self.class.acceptable_attribute_map
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!acceptable_attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateCommentAutomationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'name')
109
+ self.name = attributes[:'name']
110
+ end
111
+
112
+ if attributes.key?(:'keywords')
113
+ if (value = attributes[:'keywords']).is_a?(Array)
114
+ self.keywords = value
115
+ end
116
+ end
117
+
118
+ if attributes.key?(:'match_mode')
119
+ self.match_mode = attributes[:'match_mode']
120
+ end
121
+
122
+ if attributes.key?(:'dm_message')
123
+ self.dm_message = attributes[:'dm_message']
124
+ end
125
+
126
+ if attributes.key?(:'comment_reply')
127
+ self.comment_reply = attributes[:'comment_reply']
128
+ end
129
+
130
+ if attributes.key?(:'is_active')
131
+ self.is_active = attributes[:'is_active']
132
+ end
133
+ end
134
+
135
+ # Show invalid properties with the reasons. Usually used together with valid?
136
+ # @return Array for valid properties with the reasons
137
+ def list_invalid_properties
138
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
139
+ invalid_properties = Array.new
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ warn '[DEPRECATED] the `valid?` method is obsolete'
147
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
148
+ return false unless match_mode_validator.valid?(@match_mode)
149
+ true
150
+ end
151
+
152
+ # Custom attribute writer method checking allowed values (enum).
153
+ # @param [Object] match_mode Object to be assigned
154
+ def match_mode=(match_mode)
155
+ validator = EnumAttributeValidator.new('String', ["exact", "contains"])
156
+ unless validator.valid?(match_mode)
157
+ fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
158
+ end
159
+ @match_mode = match_mode
160
+ end
161
+
162
+ # Checks equality by comparing each attribute.
163
+ # @param [Object] Object to be compared
164
+ def ==(o)
165
+ return true if self.equal?(o)
166
+ self.class == o.class &&
167
+ name == o.name &&
168
+ keywords == o.keywords &&
169
+ match_mode == o.match_mode &&
170
+ dm_message == o.dm_message &&
171
+ comment_reply == o.comment_reply &&
172
+ is_active == o.is_active
173
+ end
174
+
175
+ # @see the `==` method
176
+ # @param [Object] Object to be compared
177
+ def eql?(o)
178
+ self == o
179
+ end
180
+
181
+ # Calculates hash code according to all attributes.
182
+ # @return [Integer] Hash code
183
+ def hash
184
+ [name, keywords, match_mode, dm_message, comment_reply, is_active].hash
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def self.build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ attributes = attributes.transform_keys(&:to_sym)
193
+ transformed_hash = {}
194
+ openapi_types.each_pair do |key, type|
195
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = nil
197
+ elsif type =~ /\AArray<(.*)>/i
198
+ # check to ensure the input is an array given that the attribute
199
+ # is documented as an array but the input is not
200
+ if attributes[attribute_map[key]].is_a?(Array)
201
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
202
+ end
203
+ elsif !attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
205
+ end
206
+ end
207
+ new(transformed_hash)
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -0,0 +1,212 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class UpdateContactRequest < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :email
21
+
22
+ attr_accessor :company
23
+
24
+ attr_accessor :avatar_url
25
+
26
+ attr_accessor :tags
27
+
28
+ attr_accessor :is_subscribed
29
+
30
+ attr_accessor :is_blocked
31
+
32
+ attr_accessor :notes
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'name' => :'name',
38
+ :'email' => :'email',
39
+ :'company' => :'company',
40
+ :'avatar_url' => :'avatarUrl',
41
+ :'tags' => :'tags',
42
+ :'is_subscribed' => :'isSubscribed',
43
+ :'is_blocked' => :'isBlocked',
44
+ :'notes' => :'notes'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'name' => :'String',
62
+ :'email' => :'String',
63
+ :'company' => :'String',
64
+ :'avatar_url' => :'String',
65
+ :'tags' => :'Array<String>',
66
+ :'is_subscribed' => :'Boolean',
67
+ :'is_blocked' => :'Boolean',
68
+ :'notes' => :'String'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateContactRequest` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateContactRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'name')
95
+ self.name = attributes[:'name']
96
+ end
97
+
98
+ if attributes.key?(:'email')
99
+ self.email = attributes[:'email']
100
+ end
101
+
102
+ if attributes.key?(:'company')
103
+ self.company = attributes[:'company']
104
+ end
105
+
106
+ if attributes.key?(:'avatar_url')
107
+ self.avatar_url = attributes[:'avatar_url']
108
+ end
109
+
110
+ if attributes.key?(:'tags')
111
+ if (value = attributes[:'tags']).is_a?(Array)
112
+ self.tags = value
113
+ end
114
+ end
115
+
116
+ if attributes.key?(:'is_subscribed')
117
+ self.is_subscribed = attributes[:'is_subscribed']
118
+ end
119
+
120
+ if attributes.key?(:'is_blocked')
121
+ self.is_blocked = attributes[:'is_blocked']
122
+ end
123
+
124
+ if attributes.key?(:'notes')
125
+ self.notes = attributes[:'notes']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
+ invalid_properties = Array.new
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ true
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ name == o.name &&
150
+ email == o.email &&
151
+ company == o.company &&
152
+ avatar_url == o.avatar_url &&
153
+ tags == o.tags &&
154
+ is_subscribed == o.is_subscribed &&
155
+ is_blocked == o.is_blocked &&
156
+ notes == o.notes
157
+ end
158
+
159
+ # @see the `==` method
160
+ # @param [Object] Object to be compared
161
+ def eql?(o)
162
+ self == o
163
+ end
164
+
165
+ # Calculates hash code according to all attributes.
166
+ # @return [Integer] Hash code
167
+ def hash
168
+ [name, email, company, avatar_url, tags, is_subscribed, is_blocked, notes].hash
169
+ end
170
+
171
+ # Builds the object from hash
172
+ # @param [Hash] attributes Model attributes in the form of hash
173
+ # @return [Object] Returns the model itself
174
+ def self.build_from_hash(attributes)
175
+ return nil unless attributes.is_a?(Hash)
176
+ attributes = attributes.transform_keys(&:to_sym)
177
+ transformed_hash = {}
178
+ openapi_types.each_pair do |key, type|
179
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = nil
181
+ elsif type =~ /\AArray<(.*)>/i
182
+ # check to ensure the input is an array given that the attribute
183
+ # is documented as an array but the input is not
184
+ if attributes[attribute_map[key]].is_a?(Array)
185
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
186
+ end
187
+ elsif !attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
189
+ end
190
+ end
191
+ new(transformed_hash)
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ end
211
+
212
+ end
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class UpdateCustomFieldRequest < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :options
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'name' => :'name',
26
+ :'options' => :'options'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'name' => :'String',
44
+ :'options' => :'Array<String>'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateCustomFieldRequest` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateCustomFieldRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'name')
71
+ self.name = attributes[:'name']
72
+ end
73
+
74
+ if attributes.key?(:'options')
75
+ if (value = attributes[:'options']).is_a?(Array)
76
+ self.options = value
77
+ end
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ name == o.name &&
102
+ options == o.options
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [name, options].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Late
14
- VERSION = '0.0.68'
14
+ VERSION = '0.0.69'
15
15
  end