trieve_ruby_client 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -13
- data/docs/AddChunkToGroupData.md +1 -1
- data/docs/ChunkApi.md +25 -29
- data/docs/ChunkGroupApi.md +26 -32
- data/docs/GetEventsData.md +1 -1
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +28 -32
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +36 -46
- data/lib/trieve_ruby_client/api/dataset_api.rb +1 -1
- data/lib/trieve_ruby_client/api/events_api.rb +1 -1
- data/lib/trieve_ruby_client/api/file_api.rb +1 -1
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
- data/lib/trieve_ruby_client/api/message_api.rb +1 -1
- data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +1 -1
- data/lib/trieve_ruby_client/api/user_api.rb +1 -1
- data/lib/trieve_ruby_client/api_client.rb +1 -1
- data/lib/trieve_ruby_client/api_error.rb +1 -1
- data/lib/trieve_ruby_client/configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +2 -2
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/event.rb +1 -1
- data/lib/trieve_ruby_client/models/event_return.rb +1 -1
- data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/file.rb +1 -1
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +1 -1
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/range.rb +1 -1
- data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
- data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
- data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
- data/lib/trieve_ruby_client/models/topic.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
- data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
- data/lib/trieve_ruby_client/version.rb +2 -2
- data/lib/trieve_ruby_client.rb +1 -1
- data/openapi-generator.yaml +1 -1
- data/openapi.json +111 -173
- data/spec/api/auth_api_spec.rb +16 -18
- data/spec/api/chunk_api_spec.rb +30 -43
- data/spec/api/chunk_group_api_spec.rb +54 -33
- data/spec/api/dataset_api_spec.rb +19 -19
- data/spec/api/events_api_spec.rb +10 -10
- data/spec/api/file_api_spec.rb +15 -15
- data/spec/api/health_api_spec.rb +9 -7
- data/spec/api/invitation_api_spec.rb +9 -9
- data/spec/api/message_api_spec.rb +15 -15
- data/spec/api/organization_api_spec.rb +19 -19
- data/spec/api/stripe_api_spec.rb +15 -7
- data/spec/api/topic_api_spec.rb +15 -15
- data/spec/api/user_api_spec.rb +13 -13
- data/spec/models/add_chunk_to_group_data_spec.rb +8 -8
- data/spec/models/api_key_dto_spec.rb +8 -8
- data/spec/models/auth_query_spec.rb +1 -1
- data/spec/models/batch_queued_chunk_response_spec.rb +1 -1
- data/spec/models/bookmark_data_spec.rb +8 -8
- data/spec/models/bookmark_group_result_spec.rb +8 -8
- data/spec/models/chat_message_proxy_spec.rb +8 -8
- data/spec/models/chunk_data_spec.rb +1 -1
- data/spec/models/chunk_filter_spec.rb +8 -8
- data/spec/models/chunk_group_and_file_spec.rb +8 -8
- data/spec/models/chunk_group_spec.rb +8 -8
- data/spec/models/chunk_metadata_spec.rb +8 -8
- data/spec/models/chunk_metadata_with_file_data_spec.rb +8 -8
- data/spec/models/client_dataset_configuration_spec.rb +8 -8
- data/spec/models/create_chunk_data_spec.rb +11 -87
- data/spec/models/create_chunk_group_data_spec.rb +8 -8
- data/spec/models/create_dataset_request_spec.rb +8 -8
- data/spec/models/create_message_data_spec.rb +8 -8
- data/spec/models/create_organization_data_spec.rb +8 -8
- data/spec/models/create_topic_data_spec.rb +8 -8
- data/spec/models/dataset_and_usage_spec.rb +8 -8
- data/spec/models/dataset_dto_spec.rb +8 -8
- data/spec/models/dataset_spec.rb +8 -8
- data/spec/models/dataset_usage_count_spec.rb +8 -8
- data/spec/models/delete_dataset_request_spec.rb +8 -8
- data/spec/models/delete_topic_data_spec.rb +8 -8
- data/spec/models/delete_user_api_key_request_spec.rb +8 -8
- data/spec/models/edit_message_data_spec.rb +8 -8
- data/spec/models/error_response_body_spec.rb +8 -8
- data/spec/models/event_return_spec.rb +8 -8
- data/spec/models/event_spec.rb +8 -8
- data/spec/models/field_condition_spec.rb +8 -8
- data/spec/models/file_dto_spec.rb +8 -8
- data/spec/models/file_spec.rb +8 -8
- data/spec/models/generate_chunks_request_spec.rb +8 -8
- data/spec/models/get_events_data_spec.rb +1 -1
- data/spec/models/get_groups_for_chunks_data_spec.rb +8 -8
- data/spec/models/group_data_spec.rb +8 -8
- data/spec/models/group_score_chunk_dto_spec.rb +8 -8
- data/spec/models/invitation_data_spec.rb +8 -8
- data/spec/models/match_condition_spec.rb +6 -6
- data/spec/models/message_spec.rb +8 -8
- data/spec/models/organization_spec.rb +8 -8
- data/spec/models/organization_usage_count_spec.rb +8 -8
- data/spec/models/range_spec.rb +8 -8
- data/spec/models/reccomend_group_chunks_request_spec.rb +8 -8
- data/spec/models/recommend_chunks_request_spec.rb +8 -8
- data/spec/models/regenerate_message_data_spec.rb +8 -8
- data/spec/models/return_queued_chunk_spec.rb +11 -21
- data/spec/models/score_chunk_dto_spec.rb +8 -8
- data/spec/models/search_chunk_data_spec.rb +8 -8
- data/spec/models/search_chunk_query_response_body_spec.rb +8 -8
- data/spec/models/search_groups_result_spec.rb +8 -8
- data/spec/models/search_over_groups_data_spec.rb +8 -8
- data/spec/models/search_over_groups_response_body_spec.rb +8 -8
- data/spec/models/search_within_group_data_spec.rb +8 -8
- data/spec/models/set_user_api_key_request_spec.rb +8 -8
- data/spec/models/set_user_api_key_response_spec.rb +8 -8
- data/spec/models/single_queued_chunk_response_spec.rb +1 -1
- data/spec/models/slim_group_spec.rb +8 -8
- data/spec/models/slim_user_spec.rb +8 -8
- data/spec/models/stripe_plan_spec.rb +8 -8
- data/spec/models/suggested_queries_request_spec.rb +8 -8
- data/spec/models/suggested_queries_response_spec.rb +8 -8
- data/spec/models/topic_spec.rb +8 -8
- data/spec/models/update_chunk_by_tracking_id_data_spec.rb +20 -8
- data/spec/models/update_chunk_data_spec.rb +20 -8
- data/spec/models/update_chunk_group_data_spec.rb +14 -8
- data/spec/models/update_dataset_request_spec.rb +8 -8
- data/spec/models/update_group_by_tracking_id_data_spec.rb +8 -8
- data/spec/models/update_organization_data_spec.rb +8 -8
- data/spec/models/update_topic_data_spec.rb +8 -8
- data/spec/models/update_user_data_spec.rb +8 -8
- data/spec/models/upload_file_data_spec.rb +8 -8
- data/spec/models/upload_file_result_spec.rb +8 -8
- data/spec/models/user_organization_spec.rb +8 -8
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.4.0.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +3 -6
- data/docs/StripeSubscription.md +0 -30
- data/lib/trieve_ruby_client/models/stripe_subscription.rb +0 -311
- data/spec/models/stripe_subscription_spec.rb +0 -72
@@ -1,10 +1,10 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Trieve API
|
3
3
|
|
4
|
-
#Trieve
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.3.3
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
7
5
|
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
7
|
+
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
10
10
|
|
@@ -14,16 +14,16 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for TrieveRubyClient::UploadFileResult
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
|
-
describe
|
21
|
-
let(:instance) {
|
20
|
+
describe TrieveRubyClient::UploadFileResult do
|
21
|
+
let(:instance) { TrieveRubyClient::UploadFileResult.new }
|
22
22
|
|
23
23
|
describe 'test an instance of UploadFileResult' do
|
24
24
|
it 'should create an instance of UploadFileResult' do
|
25
25
|
# uncomment below to test the instance creation
|
26
|
-
#expect(instance).to be_instance_of(
|
26
|
+
#expect(instance).to be_instance_of(TrieveRubyClient::UploadFileResult)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Trieve API
|
3
3
|
|
4
|
-
#Trieve
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.3.3
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
7
5
|
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
7
|
+
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
10
10
|
|
@@ -14,16 +14,16 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for TrieveRubyClient::UserOrganization
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
|
-
describe
|
21
|
-
let(:instance) {
|
20
|
+
describe TrieveRubyClient::UserOrganization do
|
21
|
+
let(:instance) { TrieveRubyClient::UserOrganization.new }
|
22
22
|
|
23
23
|
describe 'test an instance of UserOrganization' do
|
24
24
|
it 'should create an instance of UserOrganization' do
|
25
25
|
# uncomment below to test the instance creation
|
26
|
-
#expect(instance).to be_instance_of(
|
26
|
+
#expect(instance).to be_instance_of(TrieveRubyClient::UserOrganization)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
data/spec/spec_helper.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.5.0
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
Binary file
|
data/trieve_ruby_client.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 0.5.0
|
9
9
|
Contact: developers@trieve.ai
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
11
|
Generator version: 7.4.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trieve_ruby_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trieve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -135,7 +135,6 @@ files:
|
|
135
135
|
- docs/SlimUser.md
|
136
136
|
- docs/StripeApi.md
|
137
137
|
- docs/StripePlan.md
|
138
|
-
- docs/StripeSubscription.md
|
139
138
|
- docs/SuggestedQueriesRequest.md
|
140
139
|
- docs/SuggestedQueriesResponse.md
|
141
140
|
- docs/Topic.md
|
@@ -232,7 +231,6 @@ files:
|
|
232
231
|
- lib/trieve_ruby_client/models/slim_group.rb
|
233
232
|
- lib/trieve_ruby_client/models/slim_user.rb
|
234
233
|
- lib/trieve_ruby_client/models/stripe_plan.rb
|
235
|
-
- lib/trieve_ruby_client/models/stripe_subscription.rb
|
236
234
|
- lib/trieve_ruby_client/models/suggested_queries_request.rb
|
237
235
|
- lib/trieve_ruby_client/models/suggested_queries_response.rb
|
238
236
|
- lib/trieve_ruby_client/models/topic.rb
|
@@ -326,7 +324,6 @@ files:
|
|
326
324
|
- spec/models/slim_group_spec.rb
|
327
325
|
- spec/models/slim_user_spec.rb
|
328
326
|
- spec/models/stripe_plan_spec.rb
|
329
|
-
- spec/models/stripe_subscription_spec.rb
|
330
327
|
- spec/models/suggested_queries_request_spec.rb
|
331
328
|
- spec/models/suggested_queries_response_spec.rb
|
332
329
|
- spec/models/topic_spec.rb
|
@@ -343,6 +340,7 @@ files:
|
|
343
340
|
- spec/models/user_organization_spec.rb
|
344
341
|
- spec/spec_helper.rb
|
345
342
|
- trieve_ruby_client-0.3.5.gem
|
343
|
+
- trieve_ruby_client-0.4.0.gem
|
346
344
|
- trieve_ruby_client.gemspec
|
347
345
|
homepage: https://trieve.ai
|
348
346
|
licenses:
|
@@ -388,7 +386,6 @@ test_files:
|
|
388
386
|
- spec/models/regenerate_message_data_spec.rb
|
389
387
|
- spec/models/chunk_group_and_file_spec.rb
|
390
388
|
- spec/models/file_dto_spec.rb
|
391
|
-
- spec/models/stripe_subscription_spec.rb
|
392
389
|
- spec/models/edit_message_data_spec.rb
|
393
390
|
- spec/models/bookmark_data_spec.rb
|
394
391
|
- spec/models/search_groups_result_spec.rb
|
data/docs/StripeSubscription.md
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# TrieveRubyClient::StripeSubscription
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **created_at** | **Time** | | |
|
8
|
-
| **current_period_end** | **Time** | | [optional] |
|
9
|
-
| **id** | **String** | | |
|
10
|
-
| **organization_id** | **String** | | |
|
11
|
-
| **plan_id** | **String** | | |
|
12
|
-
| **stripe_id** | **String** | | |
|
13
|
-
| **updated_at** | **Time** | | |
|
14
|
-
|
15
|
-
## Example
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
require 'trieve_ruby_client'
|
19
|
-
|
20
|
-
instance = TrieveRubyClient::StripeSubscription.new(
|
21
|
-
created_at: null,
|
22
|
-
current_period_end: null,
|
23
|
-
id: null,
|
24
|
-
organization_id: null,
|
25
|
-
plan_id: null,
|
26
|
-
stripe_id: null,
|
27
|
-
updated_at: null
|
28
|
-
)
|
29
|
-
```
|
30
|
-
|
@@ -1,311 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Trieve API
|
3
|
-
|
4
|
-
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.3.5
|
7
|
-
Contact: developers@trieve.ai
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.4.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
require 'time'
|
15
|
-
|
16
|
-
module TrieveRubyClient
|
17
|
-
class StripeSubscription
|
18
|
-
attr_accessor :created_at
|
19
|
-
|
20
|
-
attr_accessor :current_period_end
|
21
|
-
|
22
|
-
attr_accessor :id
|
23
|
-
|
24
|
-
attr_accessor :organization_id
|
25
|
-
|
26
|
-
attr_accessor :plan_id
|
27
|
-
|
28
|
-
attr_accessor :stripe_id
|
29
|
-
|
30
|
-
attr_accessor :updated_at
|
31
|
-
|
32
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
-
def self.attribute_map
|
34
|
-
{
|
35
|
-
:'created_at' => :'created_at',
|
36
|
-
:'current_period_end' => :'current_period_end',
|
37
|
-
:'id' => :'id',
|
38
|
-
:'organization_id' => :'organization_id',
|
39
|
-
:'plan_id' => :'plan_id',
|
40
|
-
:'stripe_id' => :'stripe_id',
|
41
|
-
:'updated_at' => :'updated_at'
|
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
|
-
:'created_at' => :'Time',
|
54
|
-
:'current_period_end' => :'Time',
|
55
|
-
:'id' => :'String',
|
56
|
-
:'organization_id' => :'String',
|
57
|
-
:'plan_id' => :'String',
|
58
|
-
:'stripe_id' => :'String',
|
59
|
-
:'updated_at' => :'Time'
|
60
|
-
}
|
61
|
-
end
|
62
|
-
|
63
|
-
# List of attributes with nullable: true
|
64
|
-
def self.openapi_nullable
|
65
|
-
Set.new([
|
66
|
-
:'current_period_end',
|
67
|
-
])
|
68
|
-
end
|
69
|
-
|
70
|
-
# Initializes the object
|
71
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
-
def initialize(attributes = {})
|
73
|
-
if (!attributes.is_a?(Hash))
|
74
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::StripeSubscription` initialize method"
|
75
|
-
end
|
76
|
-
|
77
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
78
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
79
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
80
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::StripeSubscription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
81
|
-
end
|
82
|
-
h[k.to_sym] = v
|
83
|
-
}
|
84
|
-
|
85
|
-
if attributes.key?(:'created_at')
|
86
|
-
self.created_at = attributes[:'created_at']
|
87
|
-
else
|
88
|
-
self.created_at = nil
|
89
|
-
end
|
90
|
-
|
91
|
-
if attributes.key?(:'current_period_end')
|
92
|
-
self.current_period_end = attributes[:'current_period_end']
|
93
|
-
end
|
94
|
-
|
95
|
-
if attributes.key?(:'id')
|
96
|
-
self.id = attributes[:'id']
|
97
|
-
else
|
98
|
-
self.id = nil
|
99
|
-
end
|
100
|
-
|
101
|
-
if attributes.key?(:'organization_id')
|
102
|
-
self.organization_id = attributes[:'organization_id']
|
103
|
-
else
|
104
|
-
self.organization_id = nil
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.key?(:'plan_id')
|
108
|
-
self.plan_id = attributes[:'plan_id']
|
109
|
-
else
|
110
|
-
self.plan_id = nil
|
111
|
-
end
|
112
|
-
|
113
|
-
if attributes.key?(:'stripe_id')
|
114
|
-
self.stripe_id = attributes[:'stripe_id']
|
115
|
-
else
|
116
|
-
self.stripe_id = nil
|
117
|
-
end
|
118
|
-
|
119
|
-
if attributes.key?(:'updated_at')
|
120
|
-
self.updated_at = attributes[:'updated_at']
|
121
|
-
else
|
122
|
-
self.updated_at = nil
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
127
|
-
# @return Array for valid properties with the reasons
|
128
|
-
def list_invalid_properties
|
129
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
130
|
-
invalid_properties = Array.new
|
131
|
-
if @created_at.nil?
|
132
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
133
|
-
end
|
134
|
-
|
135
|
-
if @id.nil?
|
136
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
137
|
-
end
|
138
|
-
|
139
|
-
if @organization_id.nil?
|
140
|
-
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
141
|
-
end
|
142
|
-
|
143
|
-
if @plan_id.nil?
|
144
|
-
invalid_properties.push('invalid value for "plan_id", plan_id cannot be nil.')
|
145
|
-
end
|
146
|
-
|
147
|
-
if @stripe_id.nil?
|
148
|
-
invalid_properties.push('invalid value for "stripe_id", stripe_id cannot be nil.')
|
149
|
-
end
|
150
|
-
|
151
|
-
if @updated_at.nil?
|
152
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
153
|
-
end
|
154
|
-
|
155
|
-
invalid_properties
|
156
|
-
end
|
157
|
-
|
158
|
-
# Check to see if the all the properties in the model are valid
|
159
|
-
# @return true if the model is valid
|
160
|
-
def valid?
|
161
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
162
|
-
return false if @created_at.nil?
|
163
|
-
return false if @id.nil?
|
164
|
-
return false if @organization_id.nil?
|
165
|
-
return false if @plan_id.nil?
|
166
|
-
return false if @stripe_id.nil?
|
167
|
-
return false if @updated_at.nil?
|
168
|
-
true
|
169
|
-
end
|
170
|
-
|
171
|
-
# Checks equality by comparing each attribute.
|
172
|
-
# @param [Object] Object to be compared
|
173
|
-
def ==(o)
|
174
|
-
return true if self.equal?(o)
|
175
|
-
self.class == o.class &&
|
176
|
-
created_at == o.created_at &&
|
177
|
-
current_period_end == o.current_period_end &&
|
178
|
-
id == o.id &&
|
179
|
-
organization_id == o.organization_id &&
|
180
|
-
plan_id == o.plan_id &&
|
181
|
-
stripe_id == o.stripe_id &&
|
182
|
-
updated_at == o.updated_at
|
183
|
-
end
|
184
|
-
|
185
|
-
# @see the `==` method
|
186
|
-
# @param [Object] Object to be compared
|
187
|
-
def eql?(o)
|
188
|
-
self == o
|
189
|
-
end
|
190
|
-
|
191
|
-
# Calculates hash code according to all attributes.
|
192
|
-
# @return [Integer] Hash code
|
193
|
-
def hash
|
194
|
-
[created_at, current_period_end, id, organization_id, plan_id, stripe_id, updated_at].hash
|
195
|
-
end
|
196
|
-
|
197
|
-
# Builds the object from hash
|
198
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
199
|
-
# @return [Object] Returns the model itself
|
200
|
-
def self.build_from_hash(attributes)
|
201
|
-
return nil unless attributes.is_a?(Hash)
|
202
|
-
attributes = attributes.transform_keys(&:to_sym)
|
203
|
-
transformed_hash = {}
|
204
|
-
openapi_types.each_pair do |key, type|
|
205
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
206
|
-
transformed_hash["#{key}"] = nil
|
207
|
-
elsif type =~ /\AArray<(.*)>/i
|
208
|
-
# check to ensure the input is an array given that the attribute
|
209
|
-
# is documented as an array but the input is not
|
210
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
211
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
212
|
-
end
|
213
|
-
elsif !attributes[attribute_map[key]].nil?
|
214
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
215
|
-
end
|
216
|
-
end
|
217
|
-
new(transformed_hash)
|
218
|
-
end
|
219
|
-
|
220
|
-
# Deserializes the data based on type
|
221
|
-
# @param string type Data type
|
222
|
-
# @param string value Value to be deserialized
|
223
|
-
# @return [Object] Deserialized data
|
224
|
-
def self._deserialize(type, value)
|
225
|
-
case type.to_sym
|
226
|
-
when :Time
|
227
|
-
Time.parse(value)
|
228
|
-
when :Date
|
229
|
-
Date.parse(value)
|
230
|
-
when :String
|
231
|
-
value.to_s
|
232
|
-
when :Integer
|
233
|
-
value.to_i
|
234
|
-
when :Float
|
235
|
-
value.to_f
|
236
|
-
when :Boolean
|
237
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
238
|
-
true
|
239
|
-
else
|
240
|
-
false
|
241
|
-
end
|
242
|
-
when :Object
|
243
|
-
# generic object (usually a Hash), return directly
|
244
|
-
value
|
245
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
246
|
-
inner_type = Regexp.last_match[:inner_type]
|
247
|
-
value.map { |v| _deserialize(inner_type, v) }
|
248
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
249
|
-
k_type = Regexp.last_match[:k_type]
|
250
|
-
v_type = Regexp.last_match[:v_type]
|
251
|
-
{}.tap do |hash|
|
252
|
-
value.each do |k, v|
|
253
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
254
|
-
end
|
255
|
-
end
|
256
|
-
else # model
|
257
|
-
# models (e.g. Pet) or oneOf
|
258
|
-
klass = TrieveRubyClient.const_get(type)
|
259
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
260
|
-
end
|
261
|
-
end
|
262
|
-
|
263
|
-
# Returns the string representation of the object
|
264
|
-
# @return [String] String presentation of the object
|
265
|
-
def to_s
|
266
|
-
to_hash.to_s
|
267
|
-
end
|
268
|
-
|
269
|
-
# to_body is an alias to to_hash (backward compatibility)
|
270
|
-
# @return [Hash] Returns the object in the form of hash
|
271
|
-
def to_body
|
272
|
-
to_hash
|
273
|
-
end
|
274
|
-
|
275
|
-
# Returns the object in the form of hash
|
276
|
-
# @return [Hash] Returns the object in the form of hash
|
277
|
-
def to_hash
|
278
|
-
hash = {}
|
279
|
-
self.class.attribute_map.each_pair do |attr, param|
|
280
|
-
value = self.send(attr)
|
281
|
-
if value.nil?
|
282
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
283
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
284
|
-
end
|
285
|
-
|
286
|
-
hash[param] = _to_hash(value)
|
287
|
-
end
|
288
|
-
hash
|
289
|
-
end
|
290
|
-
|
291
|
-
# Outputs non-array value in the form of hash
|
292
|
-
# For object, use to_hash. Otherwise, just return the value
|
293
|
-
# @param [Object] value Any valid value
|
294
|
-
# @return [Hash] Returns the value in the form of hash
|
295
|
-
def _to_hash(value)
|
296
|
-
if value.is_a?(Array)
|
297
|
-
value.compact.map { |v| _to_hash(v) }
|
298
|
-
elsif value.is_a?(Hash)
|
299
|
-
{}.tap do |hash|
|
300
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
-
end
|
302
|
-
elsif value.respond_to? :to_hash
|
303
|
-
value.to_hash
|
304
|
-
else
|
305
|
-
value
|
306
|
-
end
|
307
|
-
end
|
308
|
-
|
309
|
-
end
|
310
|
-
|
311
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#trieve-server
|
3
|
-
|
4
|
-
#Trieve REST API OpenAPI Documentation
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.3.3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.4.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for OpenapiClient::StripeSubscription
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe OpenapiClient::StripeSubscription do
|
21
|
-
let(:instance) { OpenapiClient::StripeSubscription.new }
|
22
|
-
|
23
|
-
describe 'test an instance of StripeSubscription' do
|
24
|
-
it 'should create an instance of StripeSubscription' do
|
25
|
-
# uncomment below to test the instance creation
|
26
|
-
#expect(instance).to be_instance_of(OpenapiClient::StripeSubscription)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe 'test attribute "created_at"' do
|
31
|
-
it 'should work' do
|
32
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe 'test attribute "current_period_end"' do
|
37
|
-
it 'should work' do
|
38
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
describe 'test attribute "id"' do
|
43
|
-
it 'should work' do
|
44
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
describe 'test attribute "organization_id"' do
|
49
|
-
it 'should work' do
|
50
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
describe 'test attribute "plan_id"' do
|
55
|
-
it 'should work' do
|
56
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
describe 'test attribute "stripe_id"' do
|
61
|
-
it 'should work' do
|
62
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
describe 'test attribute "updated_at"' do
|
67
|
-
it 'should work' do
|
68
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
end
|