notifo-io-easierlife 1.0.0 → 1.0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +599 -97
- data/Rakefile +0 -2
- data/docs/AddAllowedTopicDto.md +4 -15
- data/docs/AddContributorDto.md +5 -17
- data/docs/AppContributorDto.md +6 -19
- data/docs/AppDetailsDto.md +19 -45
- data/docs/AppDto.md +9 -25
- data/docs/AppsApi.md +181 -363
- data/docs/Body.md +7 -0
- data/docs/ConfigsApi.md +28 -68
- data/docs/ConfirmMode.md +3 -12
- data/docs/CreateEmailTemplateDto.md +4 -15
- data/docs/EmailTemplateDto.md +6 -19
- data/docs/EmailTemplatesDto.md +6 -0
- data/docs/EmailVerificationStatus.md +3 -12
- data/docs/ErrorDto.md +8 -23
- data/docs/EventDto.md +15 -37
- data/docs/EventProperties.md +6 -0
- data/docs/EventsApi.md +43 -80
- data/docs/IsoDayOfWeek.md +3 -12
- data/docs/ListResponseDtoOfEventDto.md +5 -17
- data/docs/ListResponseDtoOfLogEntryDto.md +5 -17
- data/docs/ListResponseDtoOfMediaDto.md +5 -17
- data/docs/ListResponseDtoOfSubscriptionDto.md +5 -17
- data/docs/ListResponseDtoOfTemplateDto.md +5 -17
- data/docs/ListResponseDtoOfTopicDto.md +5 -17
- data/docs/ListResponseDtoOfUserDto.md +5 -17
- data/docs/LocalizedText.md +6 -0
- data/docs/LogEntryDto.md +7 -21
- data/docs/LogsApi.md +25 -44
- data/docs/MediaApi.md +118 -212
- data/docs/MediaDto.md +10 -27
- data/docs/MediaMetadata.md +6 -0
- data/docs/MediaType.md +3 -12
- data/docs/NotificationFormattingDto.md +11 -29
- data/docs/NotificationSend.md +3 -12
- data/docs/NotificationSettingDto.md +5 -17
- data/docs/ProfileDto.md +11 -29
- data/docs/PublishDto.md +13 -33
- data/docs/PublishManyDto.md +4 -15
- data/docs/ResizeMode.md +3 -12
- data/docs/SchedulingDto.md +7 -21
- data/docs/SchedulingType.md +3 -12
- data/docs/SubscriptionDto.md +5 -17
- data/docs/TemplateDto.md +6 -19
- data/docs/TemplatesApi.md +61 -116
- data/docs/TopicDto.md +6 -19
- data/docs/TopicsApi.md +25 -44
- data/docs/UpdateProfileDto.md +9 -25
- data/docs/UpsertAppDto.md +13 -33
- data/docs/UpsertTemplateDto.md +6 -19
- data/docs/UpsertTemplatesDto.md +4 -15
- data/docs/UpsertUserDto.md +11 -29
- data/docs/UpsertUsersDto.md +4 -15
- data/docs/UserApi.md +84 -176
- data/docs/UserDto.md +13 -33
- data/docs/UsersApi.md +173 -337
- data/git_push.sh +7 -10
- data/lib/swagger_client.rb +93 -0
- data/lib/{notifo → swagger_client}/api/apps_api.rb +131 -203
- data/lib/{notifo → swagger_client}/api/configs_api.rb +15 -31
- data/lib/{notifo → swagger_client}/api/events_api.rb +30 -46
- data/lib/{notifo → swagger_client}/api/logs_api.rb +13 -22
- data/lib/{notifo → swagger_client}/api/media_api.rb +61 -98
- data/lib/{notifo → swagger_client}/api/templates_api.rb +40 -63
- data/lib/{notifo → swagger_client}/api/topics_api.rb +13 -22
- data/lib/{notifo → swagger_client}/api/user_api.rb +52 -89
- data/lib/{notifo → swagger_client}/api/users_api.rb +122 -187
- data/lib/{notifo → swagger_client}/api_client.rb +55 -57
- data/lib/{notifo → swagger_client}/api_error.rb +6 -6
- data/lib/{notifo → swagger_client}/configuration.rb +12 -84
- data/lib/{notifo → swagger_client}/models/add_allowed_topic_dto.rb +16 -47
- data/lib/swagger_client/models/add_contributor_dto.rb +227 -0
- data/lib/swagger_client/models/app_contributor_dto.rb +242 -0
- data/lib/{notifo → swagger_client}/models/app_details_dto.rb +31 -106
- data/lib/{notifo → swagger_client}/models/app_dto.rb +21 -90
- data/lib/swagger_client/models/body.rb +206 -0
- data/lib/swagger_client/models/confirm_mode.rb +29 -0
- data/lib/{notifo → swagger_client}/models/create_email_template_dto.rb +16 -47
- data/lib/swagger_client/models/email_template_dto.rb +237 -0
- data/lib/swagger_client/models/email_templates_dto.rb +201 -0
- data/lib/swagger_client/models/email_verification_status.rb +30 -0
- data/lib/{notifo → swagger_client}/models/error_dto.rb +20 -36
- data/lib/{notifo → swagger_client}/models/event_dto.rb +27 -117
- data/lib/swagger_client/models/event_properties.rb +201 -0
- data/lib/swagger_client/models/iso_day_of_week.rb +34 -0
- data/lib/{notifo/models/list_response_dto_of_subscription_dto.rb → swagger_client/models/list_response_dto_of_event_dto.rb} +18 -30
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_log_entry_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_media_dto.rb +17 -29
- data/lib/{notifo/models/list_response_dto_of_event_dto.rb → swagger_client/models/list_response_dto_of_subscription_dto.rb} +18 -30
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_template_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_topic_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_user_dto.rb +17 -29
- data/lib/swagger_client/models/localized_text.rb +201 -0
- data/lib/{notifo → swagger_client}/models/log_entry_dto.rb +19 -88
- data/lib/{notifo → swagger_client}/models/media_dto.rb +23 -113
- data/lib/swagger_client/models/media_metadata.rb +201 -0
- data/lib/swagger_client/models/media_type.rb +30 -0
- data/lib/{notifo → swagger_client}/models/notification_formatting_dto.rb +30 -56
- data/lib/swagger_client/models/notification_send.rb +30 -0
- data/lib/{notifo → swagger_client}/models/notification_setting_dto.rb +26 -39
- data/lib/{notifo → swagger_client}/models/profile_dto.rb +23 -76
- data/lib/{notifo → swagger_client}/models/publish_dto.rb +26 -63
- data/lib/{notifo → swagger_client}/models/publish_many_dto.rb +16 -28
- data/lib/swagger_client/models/resize_mode.rb +33 -0
- data/lib/{notifo → swagger_client}/models/scheduling_dto.rb +19 -32
- data/lib/swagger_client/models/scheduling_type.rb +28 -0
- data/lib/{notifo → swagger_client}/models/subscription_dto.rb +17 -49
- data/lib/{notifo → swagger_client}/models/template_dto.rb +18 -49
- data/lib/{notifo → swagger_client}/models/topic_dto.rb +18 -68
- data/lib/{notifo → swagger_client}/models/update_profile_dto.rb +21 -39
- data/lib/{notifo → swagger_client}/models/upsert_app_dto.rb +25 -47
- data/lib/{notifo → swagger_client}/models/upsert_template_dto.rb +18 -50
- data/lib/{notifo → swagger_client}/models/upsert_templates_dto.rb +16 -28
- data/lib/{notifo → swagger_client}/models/upsert_user_dto.rb +23 -43
- data/lib/{notifo → swagger_client}/models/upsert_users_dto.rb +16 -28
- data/lib/{notifo → swagger_client}/models/user_dto.rb +25 -80
- data/lib/swagger_client/version.rb +14 -0
- data/spec/api/apps_api_spec.rb +14 -15
- data/spec/api/configs_api_spec.rb +8 -9
- data/spec/api/events_api_spec.rb +9 -10
- data/spec/api/logs_api_spec.rb +8 -9
- data/spec/api/media_api_spec.rb +13 -14
- data/spec/api/templates_api_spec.rb +9 -10
- data/spec/api/topics_api_spec.rb +8 -9
- data/spec/api/user_api_spec.rb +10 -11
- data/spec/api/users_api_spec.rb +11 -12
- data/spec/api_client_spec.rb +34 -35
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +7 -8
- data/spec/models/add_allowed_topic_dto_spec.rb +16 -10
- data/spec/models/add_contributor_dto_spec.rb +16 -10
- data/spec/models/app_contributor_dto_spec.rb +16 -10
- data/spec/models/app_details_dto_spec.rb +16 -10
- data/spec/models/app_dto_spec.rb +16 -10
- data/spec/models/body_spec.rb +40 -0
- data/spec/models/confirm_mode_spec.rb +16 -10
- data/spec/models/create_email_template_dto_spec.rb +16 -10
- data/spec/models/email_template_dto_spec.rb +16 -10
- data/spec/models/email_templates_dto_spec.rb +34 -0
- data/spec/models/email_verification_status_spec.rb +16 -10
- data/spec/models/error_dto_spec.rb +16 -10
- data/spec/models/event_dto_spec.rb +16 -10
- data/spec/models/event_properties_spec.rb +34 -0
- data/spec/models/iso_day_of_week_spec.rb +16 -10
- data/spec/models/list_response_dto_of_event_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_media_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_subscription_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_template_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_topic_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_user_dto_spec.rb +16 -10
- data/spec/models/localized_text_spec.rb +34 -0
- data/spec/models/log_entry_dto_spec.rb +16 -10
- data/spec/models/media_dto_spec.rb +16 -10
- data/spec/models/media_metadata_spec.rb +34 -0
- data/spec/models/media_type_spec.rb +16 -10
- data/spec/models/notification_formatting_dto_spec.rb +16 -10
- data/spec/models/notification_send_spec.rb +16 -10
- data/spec/models/notification_setting_dto_spec.rb +17 -11
- data/spec/models/profile_dto_spec.rb +16 -10
- data/spec/models/publish_dto_spec.rb +16 -10
- data/spec/models/publish_many_dto_spec.rb +16 -10
- data/spec/models/resize_mode_spec.rb +16 -10
- data/spec/models/scheduling_dto_spec.rb +16 -10
- data/spec/models/scheduling_type_spec.rb +16 -10
- data/spec/models/subscription_dto_spec.rb +16 -10
- data/spec/models/template_dto_spec.rb +16 -10
- data/spec/models/topic_dto_spec.rb +16 -10
- data/spec/models/update_profile_dto_spec.rb +16 -10
- data/spec/models/upsert_app_dto_spec.rb +16 -10
- data/spec/models/upsert_template_dto_spec.rb +16 -10
- data/spec/models/upsert_templates_dto_spec.rb +16 -10
- data/spec/models/upsert_user_dto_spec.rb +16 -10
- data/spec/models/upsert_users_dto_spec.rb +16 -10
- data/spec/models/user_dto_spec.rb +16 -10
- data/spec/spec_helper.rb +5 -6
- data/{notifo.gemspec → swagger_client.gemspec} +9 -9
- metadata +101 -60
- data/lib/notifo.rb +0 -89
- data/lib/notifo/models/add_contributor_dto.rb +0 -277
- data/lib/notifo/models/app_contributor_dto.rb +0 -311
- data/lib/notifo/models/confirm_mode.rb +0 -38
- data/lib/notifo/models/email_template_dto.rb +0 -288
- data/lib/notifo/models/email_verification_status.rb +0 -39
- data/lib/notifo/models/iso_day_of_week.rb +0 -43
- data/lib/notifo/models/media_type.rb +0 -39
- data/lib/notifo/models/notification_send.rb +0 -39
- data/lib/notifo/models/resize_mode.rb +0 -42
- data/lib/notifo/models/scheduling_type.rb +0 -37
- data/lib/notifo/version.rb +0 -15
- data/notifo-io-1.0.0.gem +0 -0
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class UpdateProfileDto
|
18
16
|
# The full name of the user.
|
19
17
|
attr_accessor :full_name
|
@@ -45,46 +43,35 @@ module Notifo
|
|
45
43
|
}
|
46
44
|
end
|
47
45
|
|
48
|
-
# Returns all the JSON keys this model knows about
|
49
|
-
def self.acceptable_attributes
|
50
|
-
attribute_map.values
|
51
|
-
end
|
52
|
-
|
53
46
|
# Attribute type mapping.
|
54
47
|
def self.openapi_types
|
55
48
|
{
|
56
|
-
:'full_name' => :'
|
57
|
-
:'email_address' => :'
|
58
|
-
:'phone_number' => :'
|
59
|
-
:'preferred_language' => :'
|
60
|
-
:'preferred_timezone' => :'
|
61
|
-
:'settings' => :'
|
49
|
+
:'full_name' => :'Object',
|
50
|
+
:'email_address' => :'Object',
|
51
|
+
:'phone_number' => :'Object',
|
52
|
+
:'preferred_language' => :'Object',
|
53
|
+
:'preferred_timezone' => :'Object',
|
54
|
+
:'settings' => :'Object'
|
62
55
|
}
|
63
56
|
end
|
64
57
|
|
65
58
|
# List of attributes with nullable: true
|
66
59
|
def self.openapi_nullable
|
67
60
|
Set.new([
|
68
|
-
:'full_name',
|
69
|
-
:'email_address',
|
70
|
-
:'phone_number',
|
71
|
-
:'preferred_language',
|
72
|
-
:'preferred_timezone',
|
73
|
-
:'settings'
|
74
61
|
])
|
75
62
|
end
|
76
|
-
|
63
|
+
|
77
64
|
# Initializes the object
|
78
65
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
66
|
def initialize(attributes = {})
|
80
67
|
if (!attributes.is_a?(Hash))
|
81
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::UpdateProfileDto` initialize method"
|
82
69
|
end
|
83
70
|
|
84
71
|
# check to see if the attribute exists and convert string to symbol for hash key
|
85
72
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
73
|
if (!self.class.attribute_map.key?(k.to_sym))
|
87
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::UpdateProfileDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
75
|
end
|
89
76
|
h[k.to_sym] = v
|
90
77
|
}
|
@@ -167,9 +154,7 @@ module Notifo
|
|
167
154
|
def build_from_hash(attributes)
|
168
155
|
return nil unless attributes.is_a?(Hash)
|
169
156
|
self.class.openapi_types.each_pair do |key, type|
|
170
|
-
if
|
171
|
-
self.send("#{key}=", nil)
|
172
|
-
elsif type =~ /\AArray<(.*)>/i
|
157
|
+
if type =~ /\AArray<(.*)>/i
|
173
158
|
# check to ensure the input is an array given that the attribute
|
174
159
|
# is documented as an array but the input is not
|
175
160
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -177,6 +162,8 @@ module Notifo
|
|
177
162
|
end
|
178
163
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
164
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
165
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
166
|
+
self.send("#{key}=", nil)
|
180
167
|
end
|
181
168
|
end
|
182
169
|
|
@@ -189,8 +176,8 @@ module Notifo
|
|
189
176
|
# @return [Object] Deserialized data
|
190
177
|
def _deserialize(type, value)
|
191
178
|
case type.to_sym
|
192
|
-
when :
|
193
|
-
|
179
|
+
when :DateTime
|
180
|
+
DateTime.parse(value)
|
194
181
|
when :Date
|
195
182
|
Date.parse(value)
|
196
183
|
when :String
|
@@ -220,9 +207,7 @@ module Notifo
|
|
220
207
|
end
|
221
208
|
end
|
222
209
|
else # model
|
223
|
-
|
224
|
-
klass = Notifo.const_get(type)
|
225
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
210
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
226
211
|
end
|
227
212
|
end
|
228
213
|
|
@@ -270,8 +255,5 @@ module Notifo
|
|
270
255
|
else
|
271
256
|
value
|
272
257
|
end
|
273
|
-
end
|
274
|
-
|
275
|
-
end
|
276
|
-
|
258
|
+
end end
|
277
259
|
end
|
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class UpsertAppDto
|
18
16
|
# The app name.
|
19
17
|
attr_accessor :name
|
@@ -61,54 +59,39 @@ module Notifo
|
|
61
59
|
}
|
62
60
|
end
|
63
61
|
|
64
|
-
# Returns all the JSON keys this model knows about
|
65
|
-
def self.acceptable_attributes
|
66
|
-
attribute_map.values
|
67
|
-
end
|
68
|
-
|
69
62
|
# Attribute type mapping.
|
70
63
|
def self.openapi_types
|
71
64
|
{
|
72
|
-
:'name' => :'
|
73
|
-
:'languages' => :'
|
74
|
-
:'email_address' => :'
|
75
|
-
:'email_name' => :'
|
76
|
-
:'firebase_project' => :'
|
77
|
-
:'firebase_credential' => :'
|
78
|
-
:'webhook_url' => :'
|
79
|
-
:'confirm_url' => :'
|
80
|
-
:'allow_email' => :'
|
81
|
-
:'allow_sms' => :'
|
65
|
+
:'name' => :'Object',
|
66
|
+
:'languages' => :'Object',
|
67
|
+
:'email_address' => :'Object',
|
68
|
+
:'email_name' => :'Object',
|
69
|
+
:'firebase_project' => :'Object',
|
70
|
+
:'firebase_credential' => :'Object',
|
71
|
+
:'webhook_url' => :'Object',
|
72
|
+
:'confirm_url' => :'Object',
|
73
|
+
:'allow_email' => :'Object',
|
74
|
+
:'allow_sms' => :'Object'
|
82
75
|
}
|
83
76
|
end
|
84
77
|
|
85
78
|
# List of attributes with nullable: true
|
86
79
|
def self.openapi_nullable
|
87
80
|
Set.new([
|
88
|
-
:'name',
|
89
|
-
:'languages',
|
90
|
-
:'email_address',
|
91
|
-
:'email_name',
|
92
|
-
:'firebase_project',
|
93
|
-
:'firebase_credential',
|
94
|
-
:'webhook_url',
|
95
|
-
:'confirm_url',
|
96
|
-
:'allow_email',
|
97
|
-
:'allow_sms'
|
98
81
|
])
|
99
82
|
end
|
100
|
-
|
83
|
+
|
101
84
|
# Initializes the object
|
102
85
|
# @param [Hash] attributes Model attributes in the form of hash
|
103
86
|
def initialize(attributes = {})
|
104
87
|
if (!attributes.is_a?(Hash))
|
105
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::UpsertAppDto` initialize method"
|
106
89
|
end
|
107
90
|
|
108
91
|
# check to see if the attribute exists and convert string to symbol for hash key
|
109
92
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
110
93
|
if (!self.class.attribute_map.key?(k.to_sym))
|
111
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::UpsertAppDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
112
95
|
end
|
113
96
|
h[k.to_sym] = v
|
114
97
|
}
|
@@ -211,9 +194,7 @@ module Notifo
|
|
211
194
|
def build_from_hash(attributes)
|
212
195
|
return nil unless attributes.is_a?(Hash)
|
213
196
|
self.class.openapi_types.each_pair do |key, type|
|
214
|
-
if
|
215
|
-
self.send("#{key}=", nil)
|
216
|
-
elsif type =~ /\AArray<(.*)>/i
|
197
|
+
if type =~ /\AArray<(.*)>/i
|
217
198
|
# check to ensure the input is an array given that the attribute
|
218
199
|
# is documented as an array but the input is not
|
219
200
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -221,6 +202,8 @@ module Notifo
|
|
221
202
|
end
|
222
203
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
223
204
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
205
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
206
|
+
self.send("#{key}=", nil)
|
224
207
|
end
|
225
208
|
end
|
226
209
|
|
@@ -233,8 +216,8 @@ module Notifo
|
|
233
216
|
# @return [Object] Deserialized data
|
234
217
|
def _deserialize(type, value)
|
235
218
|
case type.to_sym
|
236
|
-
when :
|
237
|
-
|
219
|
+
when :DateTime
|
220
|
+
DateTime.parse(value)
|
238
221
|
when :Date
|
239
222
|
Date.parse(value)
|
240
223
|
when :String
|
@@ -264,9 +247,7 @@ module Notifo
|
|
264
247
|
end
|
265
248
|
end
|
266
249
|
else # model
|
267
|
-
|
268
|
-
klass = Notifo.const_get(type)
|
269
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
250
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
270
251
|
end
|
271
252
|
end
|
272
253
|
|
@@ -314,8 +295,5 @@ module Notifo
|
|
314
295
|
else
|
315
296
|
value
|
316
297
|
end
|
317
|
-
end
|
318
|
-
|
319
|
-
end
|
320
|
-
|
298
|
+
end end
|
321
299
|
end
|
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class UpsertTemplateDto
|
18
16
|
# The code of the template.
|
19
17
|
attr_accessor :code
|
@@ -32,38 +30,32 @@ module Notifo
|
|
32
30
|
}
|
33
31
|
end
|
34
32
|
|
35
|
-
# Returns all the JSON keys this model knows about
|
36
|
-
def self.acceptable_attributes
|
37
|
-
attribute_map.values
|
38
|
-
end
|
39
|
-
|
40
33
|
# Attribute type mapping.
|
41
34
|
def self.openapi_types
|
42
35
|
{
|
43
|
-
:'code' => :'
|
44
|
-
:'formatting' => :'
|
45
|
-
:'settings' => :'
|
36
|
+
:'code' => :'Object',
|
37
|
+
:'formatting' => :'Object',
|
38
|
+
:'settings' => :'Object'
|
46
39
|
}
|
47
40
|
end
|
48
41
|
|
49
42
|
# List of attributes with nullable: true
|
50
43
|
def self.openapi_nullable
|
51
44
|
Set.new([
|
52
|
-
:'settings'
|
53
45
|
])
|
54
46
|
end
|
55
|
-
|
47
|
+
|
56
48
|
# Initializes the object
|
57
49
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
50
|
def initialize(attributes = {})
|
59
51
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::UpsertTemplateDto` initialize method"
|
61
53
|
end
|
62
54
|
|
63
55
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
56
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
57
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::UpsertTemplateDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
59
|
end
|
68
60
|
h[k.to_sym] = v
|
69
61
|
}
|
@@ -91,10 +83,6 @@ module Notifo
|
|
91
83
|
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
92
84
|
end
|
93
85
|
|
94
|
-
if @code.to_s.length < 1
|
95
|
-
invalid_properties.push('invalid value for "code", the character length must be great than or equal to 1.')
|
96
|
-
end
|
97
|
-
|
98
86
|
if @formatting.nil?
|
99
87
|
invalid_properties.push('invalid value for "formatting", formatting cannot be nil.')
|
100
88
|
end
|
@@ -106,25 +94,10 @@ module Notifo
|
|
106
94
|
# @return true if the model is valid
|
107
95
|
def valid?
|
108
96
|
return false if @code.nil?
|
109
|
-
return false if @code.to_s.length < 1
|
110
97
|
return false if @formatting.nil?
|
111
98
|
true
|
112
99
|
end
|
113
100
|
|
114
|
-
# Custom attribute writer method with validation
|
115
|
-
# @param [Object] code Value to be assigned
|
116
|
-
def code=(code)
|
117
|
-
if code.nil?
|
118
|
-
fail ArgumentError, 'code cannot be nil'
|
119
|
-
end
|
120
|
-
|
121
|
-
if code.to_s.length < 1
|
122
|
-
fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 1.'
|
123
|
-
end
|
124
|
-
|
125
|
-
@code = code
|
126
|
-
end
|
127
|
-
|
128
101
|
# Checks equality by comparing each attribute.
|
129
102
|
# @param [Object] Object to be compared
|
130
103
|
def ==(o)
|
@@ -160,9 +133,7 @@ module Notifo
|
|
160
133
|
def build_from_hash(attributes)
|
161
134
|
return nil unless attributes.is_a?(Hash)
|
162
135
|
self.class.openapi_types.each_pair do |key, type|
|
163
|
-
if
|
164
|
-
self.send("#{key}=", nil)
|
165
|
-
elsif type =~ /\AArray<(.*)>/i
|
136
|
+
if type =~ /\AArray<(.*)>/i
|
166
137
|
# check to ensure the input is an array given that the attribute
|
167
138
|
# is documented as an array but the input is not
|
168
139
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -170,6 +141,8 @@ module Notifo
|
|
170
141
|
end
|
171
142
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
172
143
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
144
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
145
|
+
self.send("#{key}=", nil)
|
173
146
|
end
|
174
147
|
end
|
175
148
|
|
@@ -182,8 +155,8 @@ module Notifo
|
|
182
155
|
# @return [Object] Deserialized data
|
183
156
|
def _deserialize(type, value)
|
184
157
|
case type.to_sym
|
185
|
-
when :
|
186
|
-
|
158
|
+
when :DateTime
|
159
|
+
DateTime.parse(value)
|
187
160
|
when :Date
|
188
161
|
Date.parse(value)
|
189
162
|
when :String
|
@@ -213,9 +186,7 @@ module Notifo
|
|
213
186
|
end
|
214
187
|
end
|
215
188
|
else # model
|
216
|
-
|
217
|
-
klass = Notifo.const_get(type)
|
218
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
219
190
|
end
|
220
191
|
end
|
221
192
|
|
@@ -263,8 +234,5 @@ module Notifo
|
|
263
234
|
else
|
264
235
|
value
|
265
236
|
end
|
266
|
-
end
|
267
|
-
|
268
|
-
end
|
269
|
-
|
237
|
+
end end
|
270
238
|
end
|
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class UpsertTemplatesDto
|
18
16
|
# The templates to update.
|
19
17
|
attr_accessor :requests
|
@@ -25,15 +23,10 @@ module Notifo
|
|
25
23
|
}
|
26
24
|
end
|
27
25
|
|
28
|
-
# Returns all the JSON keys this model knows about
|
29
|
-
def self.acceptable_attributes
|
30
|
-
attribute_map.values
|
31
|
-
end
|
32
|
-
|
33
26
|
# Attribute type mapping.
|
34
27
|
def self.openapi_types
|
35
28
|
{
|
36
|
-
:'requests' => :'
|
29
|
+
:'requests' => :'Object'
|
37
30
|
}
|
38
31
|
end
|
39
32
|
|
@@ -42,18 +35,18 @@ module Notifo
|
|
42
35
|
Set.new([
|
43
36
|
])
|
44
37
|
end
|
45
|
-
|
38
|
+
|
46
39
|
# Initializes the object
|
47
40
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
41
|
def initialize(attributes = {})
|
49
42
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::UpsertTemplatesDto` initialize method"
|
51
44
|
end
|
52
45
|
|
53
46
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
47
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
48
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::UpsertTemplatesDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
50
|
end
|
58
51
|
h[k.to_sym] = v
|
59
52
|
}
|
@@ -116,9 +109,7 @@ module Notifo
|
|
116
109
|
def build_from_hash(attributes)
|
117
110
|
return nil unless attributes.is_a?(Hash)
|
118
111
|
self.class.openapi_types.each_pair do |key, type|
|
119
|
-
if
|
120
|
-
self.send("#{key}=", nil)
|
121
|
-
elsif type =~ /\AArray<(.*)>/i
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
122
113
|
# check to ensure the input is an array given that the attribute
|
123
114
|
# is documented as an array but the input is not
|
124
115
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -126,6 +117,8 @@ module Notifo
|
|
126
117
|
end
|
127
118
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
128
119
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
129
122
|
end
|
130
123
|
end
|
131
124
|
|
@@ -138,8 +131,8 @@ module Notifo
|
|
138
131
|
# @return [Object] Deserialized data
|
139
132
|
def _deserialize(type, value)
|
140
133
|
case type.to_sym
|
141
|
-
when :
|
142
|
-
|
134
|
+
when :DateTime
|
135
|
+
DateTime.parse(value)
|
143
136
|
when :Date
|
144
137
|
Date.parse(value)
|
145
138
|
when :String
|
@@ -169,9 +162,7 @@ module Notifo
|
|
169
162
|
end
|
170
163
|
end
|
171
164
|
else # model
|
172
|
-
|
173
|
-
klass = Notifo.const_get(type)
|
174
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
165
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
175
166
|
end
|
176
167
|
end
|
177
168
|
|
@@ -219,8 +210,5 @@ module Notifo
|
|
219
210
|
else
|
220
211
|
value
|
221
212
|
end
|
222
|
-
end
|
223
|
-
|
224
|
-
end
|
225
|
-
|
213
|
+
end end
|
226
214
|
end
|