composio 0.1.6 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +492 -4
  4. data/lib/composio/api/actions_api.rb +107 -0
  5. data/lib/composio/api/analytics_api.rb +181 -0
  6. data/lib/composio/api/apps_api.rb +257 -0
  7. data/lib/composio/api/connections_api.rb +84 -0
  8. data/lib/composio/api/event_logs_api.rb +427 -0
  9. data/lib/composio/api/logs_api.rb +127 -9
  10. data/lib/composio/api/payment_api.rb +430 -0
  11. data/lib/composio/models/action_analytics_dto.rb +250 -0
  12. data/lib/composio/models/action_by_app_dto.rb +237 -0
  13. data/lib/composio/models/action_by_status_dto.rb +237 -0
  14. data/lib/composio/models/action_get_nla_inputs_req_dto.rb +220 -0
  15. data/lib/composio/models/additional_info.rb +220 -0
  16. data/lib/composio/models/analytics_data_req_dto.rb +250 -0
  17. data/lib/composio/models/analytics_data_res_dto.rb +282 -0
  18. data/lib/composio/models/analytics_entity_data_dto.rb +257 -0
  19. data/lib/composio/models/api_key_res_dto.rb +61 -4
  20. data/lib/composio/models/app_name_count_dto.rb +267 -0
  21. data/lib/composio/models/client_unique_user_id_count_dto.rb +237 -0
  22. data/lib/composio/models/connected_account_response_dto.rb +10 -1
  23. data/lib/composio/models/connection_params.rb +22 -6
  24. data/lib/composio/models/connection_with_app_data.rb +22 -6
  25. data/lib/composio/models/connector_list_item_dto.rb +16 -1
  26. data/lib/composio/models/create_checkout_session_req_dto.rb +220 -0
  27. data/lib/composio/models/data.rb +234 -0
  28. data/lib/composio/models/entity_query_req_dto.rb +216 -0
  29. data/lib/composio/models/fetch_query_dto.rb +278 -0
  30. data/lib/composio/models/get_connection_info_response_dto.rb +250 -0
  31. data/lib/composio/models/get_connector_list_res_dto.rb +0 -1
  32. data/lib/composio/models/get_logs_dto.rb +10 -10
  33. data/lib/composio/models/{job_status.rb → get_logs_dto_status.rb} +6 -6
  34. data/lib/composio/models/ingest_data_dto.rb +298 -0
  35. data/lib/composio/models/ingest_data_response_dto.rb +220 -0
  36. data/lib/composio/models/integrations_with_counts_dto.rb +297 -0
  37. data/lib/composio/models/invite_member_req_dto.rb +14 -4
  38. data/lib/composio/models/last_time_period.rb +40 -0
  39. data/lib/composio/models/member_info_res_dto.rb +324 -0
  40. data/lib/composio/models/{connection_with_app_data_created_at.rb → member_info_res_dto_created_at.rb} +1 -1
  41. data/lib/composio/models/member_res_dto.rb +16 -1
  42. data/lib/composio/models/member_res_dto_role.rb +36 -0
  43. data/lib/composio/models/open_api_spec_list_res_dto.rb +17 -74
  44. data/lib/composio/models/parameter.rb +248 -0
  45. data/lib/composio/models/plan.rb +38 -0
  46. data/lib/composio/models/role.rb +36 -0
  47. data/lib/composio/models/state.rb +41 -0
  48. data/lib/composio/models/status.rb +7 -4
  49. data/lib/composio/models/t_connection_count_dto.rb +236 -0
  50. data/lib/composio/models/time_period_req_dto.rb +216 -0
  51. data/lib/composio/models/top_entities_res_dto.rb +223 -0
  52. data/lib/composio/models/update_member_req_dto.rb +236 -0
  53. data/lib/composio/models/update_member_req_dto_role.rb +36 -0
  54. data/lib/composio/models/webhook_req_dto.rb +221 -0
  55. data/lib/composio/models/webhook_secret_res_dto.rb +221 -0
  56. data/lib/composio/version.rb +1 -1
  57. data/lib/composio.rb +43 -2
  58. data/spec/api/actions_api_spec.rb +13 -0
  59. data/spec/api/analytics_api_spec.rb +51 -0
  60. data/spec/api/apps_api_spec.rb +34 -0
  61. data/spec/api/connections_api_spec.rb +11 -0
  62. data/spec/api/event_logs_api_spec.rb +83 -0
  63. data/spec/api/logs_api_spec.rb +13 -1
  64. data/spec/api/payment_api_spec.rb +83 -0
  65. data/spec/models/action_analytics_dto_spec.rb +40 -0
  66. data/spec/models/action_by_app_dto_spec.rb +34 -0
  67. data/spec/models/action_by_status_dto_spec.rb +34 -0
  68. data/spec/models/action_get_nla_inputs_req_dto_spec.rb +28 -0
  69. data/spec/models/additional_info_spec.rb +28 -0
  70. data/spec/models/analytics_data_req_dto_spec.rb +32 -0
  71. data/spec/models/analytics_data_res_dto_spec.rb +52 -0
  72. data/spec/models/analytics_entity_data_dto_spec.rb +40 -0
  73. data/spec/models/api_key_res_dto_spec.rb +18 -0
  74. data/spec/models/app_name_count_dto_spec.rb +46 -0
  75. data/spec/models/client_unique_user_id_count_dto_spec.rb +34 -0
  76. data/spec/models/connected_account_response_dto_spec.rb +6 -0
  77. data/spec/models/connection_params_spec.rb +6 -0
  78. data/spec/models/connection_with_app_data_spec.rb +6 -0
  79. data/spec/models/connector_list_item_dto_spec.rb +6 -0
  80. data/spec/models/create_checkout_session_req_dto_spec.rb +28 -0
  81. data/spec/models/data_spec.rb +34 -0
  82. data/spec/models/entity_query_req_dto_spec.rb +28 -0
  83. data/spec/models/fetch_query_dto_spec.rb +34 -0
  84. data/spec/models/get_connection_info_response_dto_spec.rb +40 -0
  85. data/spec/models/get_logs_dto_spec.rb +1 -1
  86. data/spec/models/get_logs_dto_status_spec.rb +22 -0
  87. data/spec/models/ingest_data_dto_spec.rb +64 -0
  88. data/spec/models/ingest_data_response_dto_spec.rb +28 -0
  89. data/spec/models/integrations_with_counts_dto_spec.rb +58 -0
  90. data/spec/models/invite_member_req_dto_spec.rb +6 -0
  91. data/spec/models/last_time_period_spec.rb +22 -0
  92. data/spec/models/{connection_with_app_data_created_at_spec.rb → member_info_res_dto_created_at_spec.rb} +2 -2
  93. data/spec/models/member_info_res_dto_spec.rb +76 -0
  94. data/spec/models/member_res_dto_role_spec.rb +22 -0
  95. data/spec/models/member_res_dto_spec.rb +6 -0
  96. data/spec/models/open_api_spec_list_res_dto_spec.rb +5 -29
  97. data/spec/models/parameter_spec.rb +40 -0
  98. data/spec/models/plan_spec.rb +22 -0
  99. data/spec/models/role_spec.rb +22 -0
  100. data/spec/models/state_spec.rb +22 -0
  101. data/spec/models/t_connection_count_dto_spec.rb +34 -0
  102. data/spec/models/time_period_req_dto_spec.rb +28 -0
  103. data/spec/models/top_entities_res_dto_spec.rb +28 -0
  104. data/spec/models/update_member_req_dto_role_spec.rb +22 -0
  105. data/spec/models/update_member_req_dto_spec.rb +34 -0
  106. data/spec/models/webhook_req_dto_spec.rb +28 -0
  107. data/spec/models/webhook_secret_res_dto_spec.rb +28 -0
  108. metadata +215 -110
  109. data/spec/models/job_status_spec.rb +0 -22
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Composio OpenAPI
3
+
4
+ #Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Composio
13
+ class IngestDataResponseDTO
14
+ attr_accessor :is_ingested
15
+
16
+ # Attribute mapping from ruby-style variable name to JSON key.
17
+ def self.attribute_map
18
+ {
19
+ :'is_ingested' => :'isIngested'
20
+ }
21
+ end
22
+
23
+ # Returns all the JSON keys this model knows about
24
+ def self.acceptable_attributes
25
+ attribute_map.values
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'is_ingested' => :'Boolean'
32
+ }
33
+ end
34
+
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::IngestDataResponseDTO` initialize method"
46
+ end
47
+
48
+ # check to see if the attribute exists and convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::IngestDataResponseDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
+ end
53
+ h[k.to_sym] = v
54
+ }
55
+
56
+ if attributes.key?(:'is_ingested')
57
+ self.is_ingested = attributes[:'is_ingested']
58
+ end
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ if @is_ingested.nil?
66
+ invalid_properties.push('invalid value for "is_ingested", is_ingested cannot be nil.')
67
+ end
68
+
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ return false if @is_ingested.nil?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ is_ingested == o.is_ingested
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [is_ingested].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = Composio.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -0,0 +1,297 @@
1
+ =begin
2
+ #Composio OpenAPI
3
+
4
+ #Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Composio
13
+ # Detailed integration analytics data, including a breakdown of connection count, trigger count, and request logs count for each integration
14
+ class IntegrationsWithCountsDTO
15
+ # Unique identifier for the integration
16
+ attr_accessor :id
17
+
18
+ # Name of the app
19
+ attr_accessor :app_name
20
+
21
+ # Name of the integration
22
+ attr_accessor :integration_name
23
+
24
+ # Count of connections for the integration
25
+ attr_accessor :connection_count
26
+
27
+ # Count of triggers for the integration
28
+ attr_accessor :trigger_count
29
+
30
+ # Count of request logs for the integration
31
+ attr_accessor :request_logs_count
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'id' => :'id',
37
+ :'app_name' => :'appName',
38
+ :'integration_name' => :'integrationName',
39
+ :'connection_count' => :'connectionCount',
40
+ :'trigger_count' => :'triggerCount',
41
+ :'request_logs_count' => :'requestLogsCount'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'id' => :'String',
54
+ :'app_name' => :'String',
55
+ :'integration_name' => :'String',
56
+ :'connection_count' => :'Float',
57
+ :'trigger_count' => :'Float',
58
+ :'request_logs_count' => :'Float'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::IntegrationsWithCountsDTO` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!self.class.attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::IntegrationsWithCountsDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'id')
84
+ self.id = attributes[:'id']
85
+ end
86
+
87
+ if attributes.key?(:'app_name')
88
+ self.app_name = attributes[:'app_name']
89
+ end
90
+
91
+ if attributes.key?(:'integration_name')
92
+ self.integration_name = attributes[:'integration_name']
93
+ end
94
+
95
+ if attributes.key?(:'connection_count')
96
+ self.connection_count = attributes[:'connection_count']
97
+ end
98
+
99
+ if attributes.key?(:'trigger_count')
100
+ self.trigger_count = attributes[:'trigger_count']
101
+ end
102
+
103
+ if attributes.key?(:'request_logs_count')
104
+ self.request_logs_count = attributes[:'request_logs_count']
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ invalid_properties = Array.new
112
+ if @id.nil?
113
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
114
+ end
115
+
116
+ if @app_name.nil?
117
+ invalid_properties.push('invalid value for "app_name", app_name cannot be nil.')
118
+ end
119
+
120
+ if @integration_name.nil?
121
+ invalid_properties.push('invalid value for "integration_name", integration_name cannot be nil.')
122
+ end
123
+
124
+ if @connection_count.nil?
125
+ invalid_properties.push('invalid value for "connection_count", connection_count cannot be nil.')
126
+ end
127
+
128
+ if @trigger_count.nil?
129
+ invalid_properties.push('invalid value for "trigger_count", trigger_count cannot be nil.')
130
+ end
131
+
132
+ if @request_logs_count.nil?
133
+ invalid_properties.push('invalid value for "request_logs_count", request_logs_count cannot be nil.')
134
+ end
135
+
136
+ invalid_properties
137
+ end
138
+
139
+ # Check to see if the all the properties in the model are valid
140
+ # @return true if the model is valid
141
+ def valid?
142
+ return false if @id.nil?
143
+ return false if @app_name.nil?
144
+ return false if @integration_name.nil?
145
+ return false if @connection_count.nil?
146
+ return false if @trigger_count.nil?
147
+ return false if @request_logs_count.nil?
148
+ true
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ id == o.id &&
157
+ app_name == o.app_name &&
158
+ integration_name == o.integration_name &&
159
+ connection_count == o.connection_count &&
160
+ trigger_count == o.trigger_count &&
161
+ request_logs_count == o.request_logs_count
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Integer] Hash code
172
+ def hash
173
+ [id, app_name, integration_name, connection_count, trigger_count, request_logs_count].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def self.build_from_hash(attributes)
180
+ new.build_from_hash(attributes)
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ attributes = attributes.transform_keys(&:to_sym)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
191
+ self.send("#{key}=", nil)
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
196
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
197
+ end
198
+ elsif !attributes[self.class.attribute_map[key]].nil?
199
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def _deserialize(type, value)
211
+ case type.to_sym
212
+ when :Time
213
+ Time.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value.to_s
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ # models (e.g. Pet) or oneOf
244
+ klass = Composio.const_get(type)
245
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ if value.nil?
268
+ is_nullable = self.class.openapi_nullable.include?(attr)
269
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
270
+ end
271
+
272
+ hash[param] = _to_hash(value)
273
+ end
274
+ hash
275
+ end
276
+
277
+ # Outputs non-array value in the form of hash
278
+ # For object, use to_hash. Otherwise, just return the value
279
+ # @param [Object] value Any valid value
280
+ # @return [Hash] Returns the value in the form of hash
281
+ def _to_hash(value)
282
+ if value.is_a?(Array)
283
+ value.compact.map { |v| _to_hash(v) }
284
+ elsif value.is_a?(Hash)
285
+ {}.tap do |hash|
286
+ value.each { |k, v| hash[k] = _to_hash(v) }
287
+ end
288
+ elsif value.respond_to? :to_hash
289
+ value.to_hash
290
+ else
291
+ value
292
+ end
293
+ end
294
+
295
+ end
296
+
297
+ end
@@ -20,12 +20,16 @@ module Composio
20
20
  # The host to verify the member
21
21
  attr_accessor :verify_host
22
22
 
23
+ # The role that will be assignied to the invited user
24
+ attr_accessor :role
25
+
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'email' => :'email',
27
30
  :'name' => :'name',
28
- :'verify_host' => :'verifyHost'
31
+ :'verify_host' => :'verifyHost',
32
+ :'role' => :'role'
29
33
  }
30
34
  end
31
35
 
@@ -39,7 +43,8 @@ module Composio
39
43
  {
40
44
  :'email' => :'String',
41
45
  :'name' => :'String',
42
- :'verify_host' => :'String'
46
+ :'verify_host' => :'String',
47
+ :'role' => :'Role'
43
48
  }
44
49
  end
45
50
 
@@ -75,6 +80,10 @@ module Composio
75
80
  if attributes.key?(:'verify_host')
76
81
  self.verify_host = attributes[:'verify_host']
77
82
  end
83
+
84
+ if attributes.key?(:'role')
85
+ self.role = attributes[:'role']
86
+ end
78
87
  end
79
88
 
80
89
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -112,7 +121,8 @@ module Composio
112
121
  self.class == o.class &&
113
122
  email == o.email &&
114
123
  name == o.name &&
115
- verify_host == o.verify_host
124
+ verify_host == o.verify_host &&
125
+ role == o.role
116
126
  end
117
127
 
118
128
  # @see the `==` method
@@ -124,7 +134,7 @@ module Composio
124
134
  # Calculates hash code according to all attributes.
125
135
  # @return [Integer] Hash code
126
136
  def hash
127
- [email, name, verify_host].hash
137
+ [email, name, verify_host, role].hash
128
138
  end
129
139
 
130
140
  # Builds the object from hash
@@ -0,0 +1,40 @@
1
+ =begin
2
+ #Composio OpenAPI
3
+
4
+ #Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Composio
13
+ class LastTimePeriod
14
+ DAY = "DAY".freeze
15
+ WEEK = "WEEK".freeze
16
+ MONTH = "MONTH".freeze
17
+ SIX_MONTH = "SIX_MONTH".freeze
18
+ YEAR = "YEAR".freeze
19
+ FIVE_YEAR = "FIVE_YEAR".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [DAY, WEEK, MONTH, SIX_MONTH, YEAR, FIVE_YEAR].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if LastTimePeriod.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #LastTimePeriod"
38
+ end
39
+ end
40
+ end