thecompaniesapi 1.0.1
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 +7 -0
- data/.env.example +4 -0
- data/.github/workflows/release.yml +106 -0
- data/.github/workflows/tests.yml +93 -0
- data/.gitignore +146 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +36 -0
- data/LICENSE.txt +21 -0
- data/README.md +551 -0
- data/Rakefile +25 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/thecompaniesapi/client.rb +643 -0
- data/lib/thecompaniesapi/error.rb +28 -0
- data/lib/thecompaniesapi/generated/models/action.rb +91 -0
- data/lib/thecompaniesapi/generated/models/company_v2.rb +136 -0
- data/lib/thecompaniesapi/generated/models/email_pattern.rb +51 -0
- data/lib/thecompaniesapi/generated/models/job_title.rb +81 -0
- data/lib/thecompaniesapi/generated/models/list.rb +141 -0
- data/lib/thecompaniesapi/generated/models/list_analytics.rb +46 -0
- data/lib/thecompaniesapi/generated/models/llmanswer.rb +66 -0
- data/lib/thecompaniesapi/generated/models/nominatim_city.rb +101 -0
- data/lib/thecompaniesapi/generated/models/nominatim_continent.rb +111 -0
- data/lib/thecompaniesapi/generated/models/nominatim_country.rb +121 -0
- data/lib/thecompaniesapi/generated/models/nominatim_county.rb +96 -0
- data/lib/thecompaniesapi/generated/models/nominatim_state.rb +96 -0
- data/lib/thecompaniesapi/generated/models/page_contents_ideated.rb +171 -0
- data/lib/thecompaniesapi/generated/models/page_contents_link.rb +41 -0
- data/lib/thecompaniesapi/generated/models/page_contents_page.rb +71 -0
- data/lib/thecompaniesapi/generated/models/pagination_meta.rb +76 -0
- data/lib/thecompaniesapi/generated/models/prompt.rb +91 -0
- data/lib/thecompaniesapi/generated/models/segmentation_condition.rb +56 -0
- data/lib/thecompaniesapi/generated/models/team.rb +101 -0
- data/lib/thecompaniesapi/generated/models/technology.rb +96 -0
- data/lib/thecompaniesapi/generated/models/user.rb +101 -0
- data/lib/thecompaniesapi/generated/operations_map.rb +11 -0
- data/lib/thecompaniesapi/generated/requests/ask_company_request.rb +60 -0
- data/lib/thecompaniesapi/generated/requests/count_companies_post_request.rb +50 -0
- data/lib/thecompaniesapi/generated/requests/create_list_request.rb +70 -0
- data/lib/thecompaniesapi/generated/requests/export_companies_analytics_request.rb +70 -0
- data/lib/thecompaniesapi/generated/requests/fetch_companies_in_list_post_request.rb +70 -0
- data/lib/thecompaniesapi/generated/requests/product_prompt_request.rb +65 -0
- data/lib/thecompaniesapi/generated/requests/prompt_to_segmentation_request.rb +55 -0
- data/lib/thecompaniesapi/generated/requests/request_action_request.rb +80 -0
- data/lib/thecompaniesapi/generated/requests/retry_action_request.rb +30 -0
- data/lib/thecompaniesapi/generated/requests/search_companies_post_request.rb +90 -0
- data/lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb +50 -0
- data/lib/thecompaniesapi/generated/requests/update_list_request.rb +65 -0
- data/lib/thecompaniesapi/generated/requests/update_team_request.rb +45 -0
- data/lib/thecompaniesapi/generated/responses/ask_company_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/count_companies_post_response.rb +34 -0
- data/lib/thecompaniesapi/generated/responses/count_companies_response.rb +34 -0
- data/lib/thecompaniesapi/generated/responses/create_list_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/delete_list_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/delete_prompt_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/enrich_job_titles_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/export_companies_analytics_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/fetch_actions_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/fetch_api_health_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/fetch_companies_analytics_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/fetch_companies_in_list_post_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/fetch_companies_in_list_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/fetch_company_by_email_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/fetch_company_by_social_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/fetch_company_context_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/fetch_company_email_patterns_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/fetch_company_in_list_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/fetch_company_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/fetch_lists_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/fetch_open_api_response.rb +30 -0
- data/lib/thecompaniesapi/generated/responses/fetch_prompts_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/fetch_team_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/fetch_user_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/product_prompt_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/prompt_to_segmentation_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/request_action_response.rb +34 -0
- data/lib/thecompaniesapi/generated/responses/retry_action_response.rb +34 -0
- data/lib/thecompaniesapi/generated/responses/search_cities_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_companies_by_name_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_companies_by_prompt_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_companies_post_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/search_companies_response.rb +42 -0
- data/lib/thecompaniesapi/generated/responses/search_continents_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_counties_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_countries_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_industries_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_industries_similar_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_similar_companies_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_states_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/search_technologies_response.rb +38 -0
- data/lib/thecompaniesapi/generated/responses/toggle_companies_in_list_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/update_list_response.rb +25 -0
- data/lib/thecompaniesapi/generated/responses/update_team_response.rb +25 -0
- data/lib/thecompaniesapi/http_client.rb +146 -0
- data/lib/thecompaniesapi/version.rb +3 -0
- data/lib/thecompaniesapi.rb +7 -0
- data/script/generate_client.rb +653 -0
- data/thecompaniesapi.gemspec +34 -0
- metadata +188 -0
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# PageContentsLink model
|
8
|
+
#
|
9
|
+
# A link found in a page content.
|
10
|
+
class PageContentsLink
|
11
|
+
# @return [String] text
|
12
|
+
attr_accessor :text
|
13
|
+
|
14
|
+
# @return [String] url
|
15
|
+
attr_accessor :url
|
16
|
+
|
17
|
+
##
|
18
|
+
# Initialize a new PageContentsLink
|
19
|
+
#
|
20
|
+
# @param data [Hash] Initial data
|
21
|
+
def initialize(data = {})
|
22
|
+
@text = data['text']
|
23
|
+
@url = data['url']
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Convert to hash
|
28
|
+
#
|
29
|
+
# @return [Hash] Hash representation
|
30
|
+
def to_hash
|
31
|
+
{
|
32
|
+
'text' => @text,
|
33
|
+
'url' => @url,
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
alias_method :to_h, :to_hash
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# PageContentsPage model
|
8
|
+
#
|
9
|
+
# A page content saved as a source for a company context.
|
10
|
+
class PageContentsPage
|
11
|
+
# @return [String] url
|
12
|
+
attr_accessor :url
|
13
|
+
|
14
|
+
# @return [String] content
|
15
|
+
attr_accessor :content
|
16
|
+
|
17
|
+
# @return [String] html
|
18
|
+
attr_accessor :html
|
19
|
+
|
20
|
+
# @return [String] description
|
21
|
+
attr_accessor :description
|
22
|
+
|
23
|
+
# @return [String] title
|
24
|
+
attr_accessor :title
|
25
|
+
|
26
|
+
# @return [Array] externals
|
27
|
+
attr_accessor :externals
|
28
|
+
|
29
|
+
# @return [Array] navigation
|
30
|
+
attr_accessor :navigation
|
31
|
+
|
32
|
+
# @return [String] visitedAt
|
33
|
+
attr_accessor :visited_at
|
34
|
+
|
35
|
+
##
|
36
|
+
# Initialize a new PageContentsPage
|
37
|
+
#
|
38
|
+
# @param data [Hash] Initial data
|
39
|
+
def initialize(data = {})
|
40
|
+
@url = data['url']
|
41
|
+
@content = data['content']
|
42
|
+
@html = data['html']
|
43
|
+
@description = data['description']
|
44
|
+
@title = data['title']
|
45
|
+
@externals = data['externals']
|
46
|
+
@navigation = data['navigation']
|
47
|
+
@visited_at = data['visitedAt']
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Convert to hash
|
52
|
+
#
|
53
|
+
# @return [Hash] Hash representation
|
54
|
+
def to_hash
|
55
|
+
{
|
56
|
+
'url' => @url,
|
57
|
+
'content' => @content,
|
58
|
+
'html' => @html,
|
59
|
+
'description' => @description,
|
60
|
+
'title' => @title,
|
61
|
+
'externals' => @externals,
|
62
|
+
'navigation' => @navigation,
|
63
|
+
'visitedAt' => @visited_at,
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
alias_method :to_h, :to_hash
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# PaginationMeta model
|
8
|
+
#
|
9
|
+
# Metadata about a paginated or billed response.
|
10
|
+
class PaginationMeta
|
11
|
+
# @return [Float] cost
|
12
|
+
attr_accessor :cost
|
13
|
+
|
14
|
+
# @return [Float] credits
|
15
|
+
attr_accessor :credits
|
16
|
+
|
17
|
+
# @return [Float] currentPage
|
18
|
+
attr_accessor :current_page
|
19
|
+
|
20
|
+
# @return [Float] firstPage
|
21
|
+
attr_accessor :first_page
|
22
|
+
|
23
|
+
# @return [Boolean] freeRequest
|
24
|
+
attr_accessor :free_request
|
25
|
+
|
26
|
+
# @return [Float] lastPage
|
27
|
+
attr_accessor :last_page
|
28
|
+
|
29
|
+
# @return [Boolean] maxScrollResultsReached
|
30
|
+
attr_accessor :max_scroll_results_reached
|
31
|
+
|
32
|
+
# @return [Float] perPage
|
33
|
+
attr_accessor :per_page
|
34
|
+
|
35
|
+
# @return [Float] total
|
36
|
+
attr_accessor :total
|
37
|
+
|
38
|
+
##
|
39
|
+
# Initialize a new PaginationMeta
|
40
|
+
#
|
41
|
+
# @param data [Hash] Initial data
|
42
|
+
def initialize(data = {})
|
43
|
+
@cost = data['cost']
|
44
|
+
@credits = data['credits']
|
45
|
+
@current_page = data['currentPage']
|
46
|
+
@first_page = data['firstPage']
|
47
|
+
@free_request = data['freeRequest']
|
48
|
+
@last_page = data['lastPage']
|
49
|
+
@max_scroll_results_reached = data['maxScrollResultsReached']
|
50
|
+
@per_page = data['perPage']
|
51
|
+
@total = data['total']
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Convert to hash
|
56
|
+
#
|
57
|
+
# @return [Hash] Hash representation
|
58
|
+
def to_hash
|
59
|
+
{
|
60
|
+
'cost' => @cost,
|
61
|
+
'credits' => @credits,
|
62
|
+
'currentPage' => @current_page,
|
63
|
+
'firstPage' => @first_page,
|
64
|
+
'freeRequest' => @free_request,
|
65
|
+
'lastPage' => @last_page,
|
66
|
+
'maxScrollResultsReached' => @max_scroll_results_reached,
|
67
|
+
'perPage' => @per_page,
|
68
|
+
'total' => @total,
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
alias_method :to_h, :to_hash
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# Prompt model
|
8
|
+
#
|
9
|
+
# A natural language request made to the platform resolving to a specific action or search segment.
|
10
|
+
class Prompt
|
11
|
+
# @return [Float] companyId
|
12
|
+
attr_accessor :company_id
|
13
|
+
|
14
|
+
# @return [String] context
|
15
|
+
attr_accessor :context
|
16
|
+
|
17
|
+
# @return [String] createdAt
|
18
|
+
attr_accessor :created_at
|
19
|
+
|
20
|
+
# @return [Hash] data
|
21
|
+
attr_accessor :data
|
22
|
+
|
23
|
+
# @return [String] feature
|
24
|
+
attr_accessor :feature
|
25
|
+
|
26
|
+
# @return [Float] hits
|
27
|
+
attr_accessor :hits
|
28
|
+
|
29
|
+
# @return [Float] id
|
30
|
+
attr_accessor :id
|
31
|
+
|
32
|
+
# @return [String] model
|
33
|
+
attr_accessor :model
|
34
|
+
|
35
|
+
# @return [String] prompt
|
36
|
+
attr_accessor :prompt
|
37
|
+
|
38
|
+
# @return [String] promptKey
|
39
|
+
attr_accessor :prompt_key
|
40
|
+
|
41
|
+
# @return [Object] response
|
42
|
+
attr_accessor :response
|
43
|
+
|
44
|
+
# @return [String] updatedAt
|
45
|
+
attr_accessor :updated_at
|
46
|
+
|
47
|
+
##
|
48
|
+
# Initialize a new Prompt
|
49
|
+
#
|
50
|
+
# @param data [Hash] Initial data
|
51
|
+
def initialize(data = {})
|
52
|
+
@company_id = data['companyId']
|
53
|
+
@context = data['context']
|
54
|
+
@created_at = data['createdAt']
|
55
|
+
@data = data['data']
|
56
|
+
@feature = data['feature']
|
57
|
+
@hits = data['hits']
|
58
|
+
@id = data['id']
|
59
|
+
@model = data['model']
|
60
|
+
@prompt = data['prompt']
|
61
|
+
@prompt_key = data['promptKey']
|
62
|
+
@response = data['response']
|
63
|
+
@updated_at = data['updatedAt']
|
64
|
+
end
|
65
|
+
|
66
|
+
##
|
67
|
+
# Convert to hash
|
68
|
+
#
|
69
|
+
# @return [Hash] Hash representation
|
70
|
+
def to_hash
|
71
|
+
{
|
72
|
+
'companyId' => @company_id,
|
73
|
+
'context' => @context,
|
74
|
+
'createdAt' => @created_at,
|
75
|
+
'data' => @data,
|
76
|
+
'feature' => @feature,
|
77
|
+
'hits' => @hits,
|
78
|
+
'id' => @id,
|
79
|
+
'model' => @model,
|
80
|
+
'prompt' => @prompt,
|
81
|
+
'promptKey' => @prompt_key,
|
82
|
+
'response' => @response,
|
83
|
+
'updatedAt' => @updated_at,
|
84
|
+
}
|
85
|
+
end
|
86
|
+
|
87
|
+
alias_method :to_h, :to_hash
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# SegmentationCondition model
|
8
|
+
#
|
9
|
+
# A condition for our platform segmentation engine.
|
10
|
+
class SegmentationCondition
|
11
|
+
# @return [String] attribute
|
12
|
+
attr_accessor :attribute
|
13
|
+
|
14
|
+
# @return [Boolean] blockedOperator
|
15
|
+
attr_accessor :blocked_operator
|
16
|
+
|
17
|
+
# @return [String] operator
|
18
|
+
attr_accessor :operator
|
19
|
+
|
20
|
+
# @return [String] sign
|
21
|
+
attr_accessor :sign
|
22
|
+
|
23
|
+
# @return [Array] values
|
24
|
+
attr_accessor :values
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize a new SegmentationCondition
|
28
|
+
#
|
29
|
+
# @param data [Hash] Initial data
|
30
|
+
def initialize(data = {})
|
31
|
+
@attribute = data['attribute']
|
32
|
+
@blocked_operator = data['blockedOperator']
|
33
|
+
@operator = data['operator']
|
34
|
+
@sign = data['sign']
|
35
|
+
@values = data['values']
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# Convert to hash
|
40
|
+
#
|
41
|
+
# @return [Hash] Hash representation
|
42
|
+
def to_hash
|
43
|
+
{
|
44
|
+
'attribute' => @attribute,
|
45
|
+
'blockedOperator' => @blocked_operator,
|
46
|
+
'operator' => @operator,
|
47
|
+
'sign' => @sign,
|
48
|
+
'values' => @values,
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
alias_method :to_h, :to_hash
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# Team model
|
8
|
+
#
|
9
|
+
# A collection of users that can access the same resources.
|
10
|
+
class Team
|
11
|
+
# @return [Object] admin
|
12
|
+
attr_accessor :admin
|
13
|
+
|
14
|
+
# @return [Object] country
|
15
|
+
attr_accessor :country
|
16
|
+
|
17
|
+
# @return [Object] createdAt
|
18
|
+
attr_accessor :created_at
|
19
|
+
|
20
|
+
# @return [Float] credits
|
21
|
+
attr_accessor :credits
|
22
|
+
|
23
|
+
# @return [Float] creditsPack
|
24
|
+
attr_accessor :credits_pack
|
25
|
+
|
26
|
+
# @return [Float] id
|
27
|
+
attr_accessor :id
|
28
|
+
|
29
|
+
# @return [Object] name
|
30
|
+
attr_accessor :name
|
31
|
+
|
32
|
+
# @return [Object] role
|
33
|
+
attr_accessor :role
|
34
|
+
|
35
|
+
# @return [Object] stripeCustomerId
|
36
|
+
attr_accessor :stripe_customer_id
|
37
|
+
|
38
|
+
# @return [Object] stripeProductId
|
39
|
+
attr_accessor :stripe_product_id
|
40
|
+
|
41
|
+
# @return [Boolean] stripeSubscribed
|
42
|
+
attr_accessor :stripe_subscribed
|
43
|
+
|
44
|
+
# @return [Object] stripeSubscriptionId
|
45
|
+
attr_accessor :stripe_subscription_id
|
46
|
+
|
47
|
+
# @return [Object] stripeSubscriptionStatus
|
48
|
+
attr_accessor :stripe_subscription_status
|
49
|
+
|
50
|
+
# @return [Object] websiteUrl
|
51
|
+
attr_accessor :website_url
|
52
|
+
|
53
|
+
##
|
54
|
+
# Initialize a new Team
|
55
|
+
#
|
56
|
+
# @param data [Hash] Initial data
|
57
|
+
def initialize(data = {})
|
58
|
+
@admin = data['admin']
|
59
|
+
@country = data['country']
|
60
|
+
@created_at = data['createdAt']
|
61
|
+
@credits = data['credits']
|
62
|
+
@credits_pack = data['creditsPack']
|
63
|
+
@id = data['id']
|
64
|
+
@name = data['name']
|
65
|
+
@role = data['role']
|
66
|
+
@stripe_customer_id = data['stripeCustomerId']
|
67
|
+
@stripe_product_id = data['stripeProductId']
|
68
|
+
@stripe_subscribed = data['stripeSubscribed']
|
69
|
+
@stripe_subscription_id = data['stripeSubscriptionId']
|
70
|
+
@stripe_subscription_status = data['stripeSubscriptionStatus']
|
71
|
+
@website_url = data['websiteUrl']
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Convert to hash
|
76
|
+
#
|
77
|
+
# @return [Hash] Hash representation
|
78
|
+
def to_hash
|
79
|
+
{
|
80
|
+
'admin' => @admin,
|
81
|
+
'country' => @country,
|
82
|
+
'createdAt' => @created_at,
|
83
|
+
'credits' => @credits,
|
84
|
+
'creditsPack' => @credits_pack,
|
85
|
+
'id' => @id,
|
86
|
+
'name' => @name,
|
87
|
+
'role' => @role,
|
88
|
+
'stripeCustomerId' => @stripe_customer_id,
|
89
|
+
'stripeProductId' => @stripe_product_id,
|
90
|
+
'stripeSubscribed' => @stripe_subscribed,
|
91
|
+
'stripeSubscriptionId' => @stripe_subscription_id,
|
92
|
+
'stripeSubscriptionStatus' => @stripe_subscription_status,
|
93
|
+
'websiteUrl' => @website_url,
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
alias_method :to_h, :to_hash
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# Technology model
|
8
|
+
#
|
9
|
+
# A technology description from our platform.
|
10
|
+
class Technology
|
11
|
+
# @return [Object] categories
|
12
|
+
attr_accessor :categories
|
13
|
+
|
14
|
+
# @return [Object] companiesCount
|
15
|
+
attr_accessor :companies_count
|
16
|
+
|
17
|
+
# @return [Object] createdAt
|
18
|
+
attr_accessor :created_at
|
19
|
+
|
20
|
+
# @return [String] editor
|
21
|
+
attr_accessor :editor
|
22
|
+
|
23
|
+
# @return [Object] free
|
24
|
+
attr_accessor :free
|
25
|
+
|
26
|
+
# @return [Float] id
|
27
|
+
attr_accessor :id
|
28
|
+
|
29
|
+
# @return [String] name
|
30
|
+
attr_accessor :name
|
31
|
+
|
32
|
+
# @return [Object] nameSynonyms
|
33
|
+
attr_accessor :name_synonyms
|
34
|
+
|
35
|
+
# @return [Object] paid
|
36
|
+
attr_accessor :paid
|
37
|
+
|
38
|
+
# @return [String] slug
|
39
|
+
attr_accessor :slug
|
40
|
+
|
41
|
+
# @return [Object] updatedAt
|
42
|
+
attr_accessor :updated_at
|
43
|
+
|
44
|
+
# @return [Object] usageCount
|
45
|
+
attr_accessor :usage_count
|
46
|
+
|
47
|
+
# @return [Object] websiteUrl
|
48
|
+
attr_accessor :website_url
|
49
|
+
|
50
|
+
##
|
51
|
+
# Initialize a new Technology
|
52
|
+
#
|
53
|
+
# @param data [Hash] Initial data
|
54
|
+
def initialize(data = {})
|
55
|
+
@categories = data['categories']
|
56
|
+
@companies_count = data['companiesCount']
|
57
|
+
@created_at = data['createdAt']
|
58
|
+
@editor = data['editor']
|
59
|
+
@free = data['free']
|
60
|
+
@id = data['id']
|
61
|
+
@name = data['name']
|
62
|
+
@name_synonyms = data['nameSynonyms']
|
63
|
+
@paid = data['paid']
|
64
|
+
@slug = data['slug']
|
65
|
+
@updated_at = data['updatedAt']
|
66
|
+
@usage_count = data['usageCount']
|
67
|
+
@website_url = data['websiteUrl']
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# Convert to hash
|
72
|
+
#
|
73
|
+
# @return [Hash] Hash representation
|
74
|
+
def to_hash
|
75
|
+
{
|
76
|
+
'categories' => @categories,
|
77
|
+
'companiesCount' => @companies_count,
|
78
|
+
'createdAt' => @created_at,
|
79
|
+
'editor' => @editor,
|
80
|
+
'free' => @free,
|
81
|
+
'id' => @id,
|
82
|
+
'name' => @name,
|
83
|
+
'nameSynonyms' => @name_synonyms,
|
84
|
+
'paid' => @paid,
|
85
|
+
'slug' => @slug,
|
86
|
+
'updatedAt' => @updated_at,
|
87
|
+
'usageCount' => @usage_count,
|
88
|
+
'websiteUrl' => @website_url,
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
alias_method :to_h, :to_hash
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheCompaniesAPI
|
4
|
+
module Generated
|
5
|
+
module Models
|
6
|
+
##
|
7
|
+
# User model
|
8
|
+
#
|
9
|
+
# A user of the platform.
|
10
|
+
class User
|
11
|
+
# @return [String] colorMode
|
12
|
+
attr_accessor :color_mode
|
13
|
+
|
14
|
+
# @return [Object] createdAt
|
15
|
+
attr_accessor :created_at
|
16
|
+
|
17
|
+
# @return [Object] currentTeamId
|
18
|
+
attr_accessor :current_team_id
|
19
|
+
|
20
|
+
# @return [String] email
|
21
|
+
attr_accessor :email
|
22
|
+
|
23
|
+
# @return [Object] emailFree
|
24
|
+
attr_accessor :email_free
|
25
|
+
|
26
|
+
# @return [Object] emailVerified
|
27
|
+
attr_accessor :email_verified
|
28
|
+
|
29
|
+
# @return [Object] emailVerifiedResentAt
|
30
|
+
attr_accessor :email_verified_resent_at
|
31
|
+
|
32
|
+
# @return [Object] fullName
|
33
|
+
attr_accessor :full_name
|
34
|
+
|
35
|
+
# @return [Object] hasPassword
|
36
|
+
attr_accessor :has_password
|
37
|
+
|
38
|
+
# @return [Float] id
|
39
|
+
attr_accessor :id
|
40
|
+
|
41
|
+
# @return [Object] locale
|
42
|
+
attr_accessor :locale
|
43
|
+
|
44
|
+
# @return [Object] pictureUrl
|
45
|
+
attr_accessor :picture_url
|
46
|
+
|
47
|
+
# @return [Object] referral
|
48
|
+
attr_accessor :referral
|
49
|
+
|
50
|
+
# @return [Object] role
|
51
|
+
attr_accessor :role
|
52
|
+
|
53
|
+
##
|
54
|
+
# Initialize a new User
|
55
|
+
#
|
56
|
+
# @param data [Hash] Initial data
|
57
|
+
def initialize(data = {})
|
58
|
+
@color_mode = data['colorMode']
|
59
|
+
@created_at = data['createdAt']
|
60
|
+
@current_team_id = data['currentTeamId']
|
61
|
+
@email = data['email']
|
62
|
+
@email_free = data['emailFree']
|
63
|
+
@email_verified = data['emailVerified']
|
64
|
+
@email_verified_resent_at = data['emailVerifiedResentAt']
|
65
|
+
@full_name = data['fullName']
|
66
|
+
@has_password = data['hasPassword']
|
67
|
+
@id = data['id']
|
68
|
+
@locale = data['locale']
|
69
|
+
@picture_url = data['pictureUrl']
|
70
|
+
@referral = data['referral']
|
71
|
+
@role = data['role']
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Convert to hash
|
76
|
+
#
|
77
|
+
# @return [Hash] Hash representation
|
78
|
+
def to_hash
|
79
|
+
{
|
80
|
+
'colorMode' => @color_mode,
|
81
|
+
'createdAt' => @created_at,
|
82
|
+
'currentTeamId' => @current_team_id,
|
83
|
+
'email' => @email,
|
84
|
+
'emailFree' => @email_free,
|
85
|
+
'emailVerified' => @email_verified,
|
86
|
+
'emailVerifiedResentAt' => @email_verified_resent_at,
|
87
|
+
'fullName' => @full_name,
|
88
|
+
'hasPassword' => @has_password,
|
89
|
+
'id' => @id,
|
90
|
+
'locale' => @locale,
|
91
|
+
'pictureUrl' => @picture_url,
|
92
|
+
'referral' => @referral,
|
93
|
+
'role' => @role,
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
alias_method :to_h, :to_hash
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|