hooksniff 0.1.0 → 0.3.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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -1
  3. data/lib/openapi_client/api/admin_api.rb +452 -0
  4. data/lib/openapi_client/api/alerts_api.rb +322 -0
  5. data/lib/openapi_client/api/analytics_api.rb +208 -0
  6. data/lib/openapi_client/api/api_keys_api.rb +252 -0
  7. data/lib/openapi_client/api/audit_log_api.rb +140 -0
  8. data/lib/openapi_client/api/auth_api.rb +1080 -0
  9. data/lib/openapi_client/api/billing_api.rb +500 -0
  10. data/lib/openapi_client/api/contact_api.rb +88 -0
  11. data/lib/openapi_client/api/custom_domains_api.rb +253 -0
  12. data/lib/openapi_client/api/customer_portal_api.rb +700 -0
  13. data/lib/openapi_client/api/delivery_details_api.rb +146 -0
  14. data/lib/openapi_client/api/devices_api.rb +202 -0
  15. data/lib/openapi_client/api/embed_api.rb +128 -0
  16. data/lib/openapi_client/api/endpoints_api.rb +468 -0
  17. data/lib/openapi_client/api/events_api.rb +75 -0
  18. data/lib/openapi_client/api/health_api.rb +193 -0
  19. data/lib/openapi_client/api/inbound_api.rb +170 -0
  20. data/lib/openapi_client/api/notifications_api.rb +309 -0
  21. data/lib/openapi_client/api/o_auth_api.rb +181 -0
  22. data/lib/openapi_client/api/outbound_ips_api.rb +77 -0
  23. data/lib/openapi_client/api/playground_api.rb +143 -0
  24. data/lib/openapi_client/api/rate_limits_api.rb +252 -0
  25. data/lib/openapi_client/api/routing_api.rb +393 -0
  26. data/lib/openapi_client/api/schemas_api.rb +268 -0
  27. data/lib/openapi_client/api/search_api.rb +96 -0
  28. data/lib/openapi_client/api/simulator_api.rb +82 -0
  29. data/lib/openapi_client/api/sso_api.rb +241 -0
  30. data/lib/openapi_client/api/stats_api.rb +77 -0
  31. data/lib/openapi_client/api/stream_api.rb +88 -0
  32. data/lib/openapi_client/api/teams_api.rb +476 -0
  33. data/lib/openapi_client/api/templates_api.rb +213 -0
  34. data/lib/openapi_client/api/transforms_api.rb +368 -0
  35. data/lib/openapi_client/api/webhooks_api.rb +534 -0
  36. data/lib/openapi_client/api_client.rb +397 -0
  37. data/lib/openapi_client/api_error.rb +58 -0
  38. data/lib/openapi_client/api_model_base.rb +88 -0
  39. data/lib/openapi_client/configuration.rb +312 -0
  40. data/lib/openapi_client/models/admin_revenue_get200_response_inner.rb +165 -0
  41. data/lib/openapi_client/models/admin_sdk_update_post_request.rb +156 -0
  42. data/lib/openapi_client/models/admin_users_id_plan_put_request.rb +181 -0
  43. data/lib/openapi_client/models/admin_users_id_status_put_request.rb +147 -0
  44. data/lib/openapi_client/models/alert_rule.rb +237 -0
  45. data/lib/openapi_client/models/api_key_info.rb +185 -0
  46. data/lib/openapi_client/models/apply_template_request.rb +173 -0
  47. data/lib/openapi_client/models/apply_template_response.rb +156 -0
  48. data/lib/openapi_client/models/auth2fa_enable_post200_response.rb +156 -0
  49. data/lib/openapi_client/models/auth_login_post200_response.rb +104 -0
  50. data/lib/openapi_client/models/auth_response.rb +167 -0
  51. data/lib/openapi_client/models/batch_replay_request.rb +166 -0
  52. data/lib/openapi_client/models/batch_response.rb +160 -0
  53. data/lib/openapi_client/models/batch_response_errors_inner.rb +156 -0
  54. data/lib/openapi_client/models/batch_webhook_request.rb +166 -0
  55. data/lib/openapi_client/models/billing_portal_post200_response.rb +147 -0
  56. data/lib/openapi_client/models/change_password_request.rb +199 -0
  57. data/lib/openapi_client/models/change_role_request.rb +188 -0
  58. data/lib/openapi_client/models/confirm2fa_request.rb +182 -0
  59. data/lib/openapi_client/models/contact_request.rb +242 -0
  60. data/lib/openapi_client/models/contact_response.rb +156 -0
  61. data/lib/openapi_client/models/create_alert_request.rb +277 -0
  62. data/lib/openapi_client/models/create_api_key_response.rb +175 -0
  63. data/lib/openapi_client/models/create_endpoint_request.rb +288 -0
  64. data/lib/openapi_client/models/create_team_request.rb +164 -0
  65. data/lib/openapi_client/models/create_transform_rule_request.rb +216 -0
  66. data/lib/openapi_client/models/create_webhook_request.rb +201 -0
  67. data/lib/openapi_client/models/custom_domains_post_request.rb +147 -0
  68. data/lib/openapi_client/models/customer_response.rb +256 -0
  69. data/lib/openapi_client/models/delivery.rb +246 -0
  70. data/lib/openapi_client/models/delivery_attempt.rb +205 -0
  71. data/lib/openapi_client/models/delivery_list_response.rb +176 -0
  72. data/lib/openapi_client/models/delivery_trend_response.rb +158 -0
  73. data/lib/openapi_client/models/delivery_trend_response_buckets_inner.rb +174 -0
  74. data/lib/openapi_client/models/device_token_response.rb +174 -0
  75. data/lib/openapi_client/models/disable2fa_request.rb +164 -0
  76. data/lib/openapi_client/models/enable2fa_request.rb +164 -0
  77. data/lib/openapi_client/models/endpoint.rb +321 -0
  78. data/lib/openapi_client/models/endpoint_health.rb +183 -0
  79. data/lib/openapi_client/models/endpoints_endpoint_id_transforms_test_post_request.rb +156 -0
  80. data/lib/openapi_client/models/endpoints_id_rotate_secret_post200_response.rb +156 -0
  81. data/lib/openapi_client/models/error.rb +165 -0
  82. data/lib/openapi_client/models/forgot_password_request.rb +164 -0
  83. data/lib/openapi_client/models/invite_request.rb +207 -0
  84. data/lib/openapi_client/models/invoice_response.rb +183 -0
  85. data/lib/openapi_client/models/latency_trend_response.rb +167 -0
  86. data/lib/openapi_client/models/latency_trend_response_buckets_inner.rb +165 -0
  87. data/lib/openapi_client/models/login_request.rb +190 -0
  88. data/lib/openapi_client/models/notification.rb +193 -0
  89. data/lib/openapi_client/models/notification_list_response.rb +167 -0
  90. data/lib/openapi_client/models/notification_preferences.rb +201 -0
  91. data/lib/openapi_client/models/notifications_unread_count_get200_response.rb +147 -0
  92. data/lib/openapi_client/models/outbound_ips_response.rb +158 -0
  93. data/lib/openapi_client/models/paginated_users.rb +176 -0
  94. data/lib/openapi_client/models/playground_get200_response.rb +160 -0
  95. data/lib/openapi_client/models/portal_notifications_put200_response.rb +156 -0
  96. data/lib/openapi_client/models/portal_profile.rb +184 -0
  97. data/lib/openapi_client/models/refresh_token_request.rb +164 -0
  98. data/lib/openapi_client/models/register_device_request.rb +208 -0
  99. data/lib/openapi_client/models/register_request.rb +201 -0
  100. data/lib/openapi_client/models/register_schema_request.rb +191 -0
  101. data/lib/openapi_client/models/resend_verification_request.rb +164 -0
  102. data/lib/openapi_client/models/reset_password_request.rb +199 -0
  103. data/lib/openapi_client/models/retry_policy.rb +216 -0
  104. data/lib/openapi_client/models/routing_info.rb +193 -0
  105. data/lib/openapi_client/models/search_result.rb +158 -0
  106. data/lib/openapi_client/models/simulator_post_request.rb +165 -0
  107. data/lib/openapi_client/models/sso_config_post_request.rb +190 -0
  108. data/lib/openapi_client/models/stats_response.rb +210 -0
  109. data/lib/openapi_client/models/stream_params.rb +201 -0
  110. data/lib/openapi_client/models/subscription_response.rb +201 -0
  111. data/lib/openapi_client/models/success_rate_response.rb +183 -0
  112. data/lib/openapi_client/models/system_stats.rb +185 -0
  113. data/lib/openapi_client/models/system_stats_plan_breakdown_inner.rb +156 -0
  114. data/lib/openapi_client/models/system_status.rb +210 -0
  115. data/lib/openapi_client/models/system_status_components_inner.rb +184 -0
  116. data/lib/openapi_client/models/team.rb +165 -0
  117. data/lib/openapi_client/models/team_detail_response.rb +169 -0
  118. data/lib/openapi_client/models/team_invite.rb +174 -0
  119. data/lib/openapi_client/models/team_member.rb +193 -0
  120. data/lib/openapi_client/models/test_webhook_request.rb +199 -0
  121. data/lib/openapi_client/models/test_webhook_response.rb +174 -0
  122. data/lib/openapi_client/models/transform_rule.rb +201 -0
  123. data/lib/openapi_client/models/two_factor_required_response.rb +165 -0
  124. data/lib/openapi_client/models/update_endpoint_request.rb +278 -0
  125. data/lib/openapi_client/models/update_notification_preferences.rb +195 -0
  126. data/lib/openapi_client/models/update_profile_request.rb +190 -0
  127. data/lib/openapi_client/models/update_routing_request.rb +190 -0
  128. data/lib/openapi_client/models/upgrade_request.rb +209 -0
  129. data/lib/openapi_client/models/upgrade_response.rb +166 -0
  130. data/lib/openapi_client/models/usage_response.rb +201 -0
  131. data/lib/openapi_client/models/user_summary.rb +193 -0
  132. data/lib/openapi_client/models/validate_event_request.rb +164 -0
  133. data/lib/openapi_client/models/verify2fa_request.rb +208 -0
  134. data/lib/openapi_client/models/verify_email_request.rb +164 -0
  135. data/lib/openapi_client/models/webhook_template.rb +183 -0
  136. data/lib/openapi_client/version.rb +15 -0
  137. data/lib/openapi_client.rb +169 -0
  138. metadata +139 -10
  139. data/lib/hooksniff/client.rb +0 -213
  140. data/lib/hooksniff/errors.rb +0 -43
  141. data/lib/hooksniff/models.rb +0 -136
  142. data/lib/hooksniff/verification.rb +0 -134
  143. data/lib/hooksniff/version.rb +0 -5
  144. data/lib/hooksniff.rb +0 -19
@@ -0,0 +1,169 @@
1
+ =begin
2
+ #HookSniff API
3
+
4
+ #Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@hooksniff.vercel.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class TeamDetailResponse < ApiModelBase
18
+ attr_accessor :team
19
+
20
+ attr_accessor :members
21
+
22
+ attr_accessor :invites
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'team' => :'team',
28
+ :'members' => :'members',
29
+ :'invites' => :'invites'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'team' => :'Team',
47
+ :'members' => :'Array<TeamMember>',
48
+ :'invites' => :'Array<TeamInvite>'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TeamDetailResponse` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::TeamDetailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'team')
75
+ self.team = attributes[:'team']
76
+ end
77
+
78
+ if attributes.key?(:'members')
79
+ if (value = attributes[:'members']).is_a?(Array)
80
+ self.members = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'invites')
85
+ if (value = attributes[:'invites']).is_a?(Array)
86
+ self.invites = value
87
+ end
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ team == o.team &&
112
+ members == o.members &&
113
+ invites == o.invites
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [team, members, invites].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
+ end
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
147
+ end
148
+ new(transformed_hash)
149
+ end
150
+
151
+ # Returns the object in the form of hash
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_hash
154
+ hash = {}
155
+ self.class.attribute_map.each_pair do |attr, param|
156
+ value = self.send(attr)
157
+ if value.nil?
158
+ is_nullable = self.class.openapi_nullable.include?(attr)
159
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
160
+ end
161
+
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ end
168
+
169
+ end
@@ -0,0 +1,174 @@
1
+ =begin
2
+ #HookSniff API
3
+
4
+ #Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@hooksniff.vercel.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class TeamInvite < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :email
21
+
22
+ attr_accessor :role
23
+
24
+ attr_accessor :created_at
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'email' => :'email',
31
+ :'role' => :'role',
32
+ :'created_at' => :'created_at'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'id' => :'String',
50
+ :'email' => :'String',
51
+ :'role' => :'String',
52
+ :'created_at' => :'Time'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TeamInvite` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::TeamInvite`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'id')
79
+ self.id = attributes[:'id']
80
+ end
81
+
82
+ if attributes.key?(:'email')
83
+ self.email = attributes[:'email']
84
+ end
85
+
86
+ if attributes.key?(:'role')
87
+ self.role = attributes[:'role']
88
+ end
89
+
90
+ if attributes.key?(:'created_at')
91
+ self.created_at = attributes[:'created_at']
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
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ id == o.id &&
116
+ email == o.email &&
117
+ role == o.role &&
118
+ created_at == o.created_at
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
+ [id, email, role, created_at].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
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end
@@ -0,0 +1,193 @@
1
+ =begin
2
+ #HookSniff API
3
+
4
+ #Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@hooksniff.vercel.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class TeamMember < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :user_id
21
+
22
+ attr_accessor :email
23
+
24
+ attr_accessor :name
25
+
26
+ attr_accessor :role
27
+
28
+ attr_accessor :joined_at
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'id' => :'id',
34
+ :'user_id' => :'user_id',
35
+ :'email' => :'email',
36
+ :'name' => :'name',
37
+ :'role' => :'role',
38
+ :'joined_at' => :'joined_at'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'id' => :'String',
56
+ :'user_id' => :'String',
57
+ :'email' => :'String',
58
+ :'name' => :'String',
59
+ :'role' => :'String',
60
+ :'joined_at' => :'Time'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'name',
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TeamMember` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::TeamMember`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'id')
88
+ self.id = attributes[:'id']
89
+ end
90
+
91
+ if attributes.key?(:'user_id')
92
+ self.user_id = attributes[:'user_id']
93
+ end
94
+
95
+ if attributes.key?(:'email')
96
+ self.email = attributes[:'email']
97
+ end
98
+
99
+ if attributes.key?(:'name')
100
+ self.name = attributes[:'name']
101
+ end
102
+
103
+ if attributes.key?(:'role')
104
+ self.role = attributes[:'role']
105
+ end
106
+
107
+ if attributes.key?(:'joined_at')
108
+ self.joined_at = attributes[:'joined_at']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
+ true
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ id == o.id &&
133
+ user_id == o.user_id &&
134
+ email == o.email &&
135
+ name == o.name &&
136
+ role == o.role &&
137
+ joined_at == o.joined_at
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [id, user_id, email, name, role, joined_at].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end