Skip to content

Commit 8021242

Browse files
Merge pull request #234 from HubSpot/feature/update_discoveries
Update discoveries
2 parents ce10092 + fb5f0ba commit 8021242

File tree

25 files changed

+233
-27
lines changed

25 files changed

+233
-27
lines changed

lib/hubspot/discovery/crm/associations/api/types_api.rb

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/hubspot/discovery/crm/associations/client.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ module Associations
77
class Client
88
include Hubspot::Discovery::BaseModuleClient
99
def api_modules
10-
%i[v4].freeze
10+
%i[
11+
v4
12+
schema
13+
].freeze
1114
end
1215
def api_classes
1316
%i[
1417
batch
15-
types
1618
].freeze
1719
end
1820
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require_relative '../../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Associations
7+
module Schema
8+
class TypesApi
9+
include Hubspot::Discovery::BaseApiClient
10+
end
11+
end
12+
end
13+
end
14+
end
15+
end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
require_relative '../../../base_module_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Associations
7+
module Schema
8+
class Client
9+
include Hubspot::Discovery::BaseModuleClient
10+
def api_classes
11+
%i[
12+
types
13+
].freeze
14+
end
15+
end
16+
end
17+
end
18+
end
19+
end
20+
end

lib/hubspot/discovery/crm/associations/v4/api/definitions_api.rb renamed to lib/hubspot/discovery/crm/associations/v4/api/basic_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Discovery
55
module Crm
66
module Associations
77
module V4
8-
class DefinitionsApi
8+
class BasicApi
99
include Hubspot::Discovery::BaseApiClient
1010
end
1111
end

lib/hubspot/discovery/crm/associations/v4/client.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ module Associations
77
module V4
88
class Client
99
include Hubspot::Discovery::BaseModuleClient
10+
def api_modules
11+
%i[
12+
schema
13+
].freeze
14+
end
1015
def api_classes
1116
%i[
17+
basic
1218
batch
13-
definitions
1419
].freeze
1520
end
1621
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require_relative '../../../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Associations
7+
module V4
8+
module Schema
9+
class DefinitionsApi
10+
include Hubspot::Discovery::BaseApiClient
11+
end
12+
end
13+
end
14+
end
15+
end
16+
end
17+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require_relative '../../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Associations
7+
module V4
8+
module Schema
9+
class Client
10+
include Hubspot::Discovery::BaseModuleClient
11+
def api_classes
12+
%i[
13+
definitions
14+
].freeze
15+
end
16+
end
17+
end
18+
end
19+
end
20+
end
21+
end
22+
end

lib/hubspot/discovery/crm/objects/client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Client
1010
def api_modules
1111
%i[
1212
calls
13+
communications
1314
emails
1415
feedback_submissions
1516
meetings
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require_relative '../../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Objects
7+
module Communications
8+
class BasicApi
9+
include Hubspot::Discovery::BaseApiClient
10+
end
11+
end
12+
end
13+
end
14+
end
15+
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require_relative '../../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Objects
7+
module Communications
8+
class BatchApi
9+
include Hubspot::Discovery::BaseApiClient
10+
end
11+
end
12+
end
13+
end
14+
end
15+
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require_relative '../../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Objects
7+
module Communications
8+
class PublicObjectApi
9+
include Hubspot::Discovery::BaseApiClient
10+
end
11+
end
12+
end
13+
end
14+
end
15+
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require_relative '../../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Objects
7+
module Communications
8+
class SearchApi
9+
include Hubspot::Discovery::BaseApiClient
10+
end
11+
end
12+
end
13+
end
14+
end
15+
end
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
require_relative '../../../base_module_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Crm
6+
module Objects
7+
module Communications
8+
class Client
9+
include Hubspot::Discovery::BaseModuleClient
10+
11+
def api_classes
12+
%i[
13+
basic
14+
batch
15+
public_object
16+
search
17+
].freeze
18+
end
19+
end
20+
end
21+
end
22+
end
23+
end
24+
end

spec/discovery/crm/associations/client_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
subject(:client) { Hubspot::Client.new(access_token: 'test').crm.associations }
55

66
it { is_expected.to respond_to(:v4) }
7+
it { is_expected.to respond_to(:schema) }
78
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Crm::Associations::Schema::TypesApi' do
4+
subject(:types_api) { Hubspot::Client.new(access_token: 'test').crm.associations.schema.types_api }
5+
6+
it { is_expected.to respond_to(:get_all) }
7+
end

spec/discovery/crm/associations/types_api_spec.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Crm::Associations::V4::BasicApi' do
4+
subject(:basic_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.basic_api }
5+
6+
it { is_expected.to respond_to(:archive) }
7+
it { is_expected.to respond_to(:create_default) }
8+
it { is_expected.to respond_to(:create) }
9+
it { is_expected.to respond_to(:get_page) }
10+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Client' do
4+
subject(:client) { Hubspot::Client.new(access_token: 'test').crm.associations.v4 }
5+
6+
it { is_expected.to respond_to(:schema) }
7+
end
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
require 'spec_helper'
22

3-
describe 'Hubspot::Discovery::Crm::Associations::V4::DefinitionsApi' do
4-
subject(:definitions_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.definitions_api }
3+
describe 'Hubspot::Discovery::Crm::Associations::V4::Schema::DefinitionsApi' do
4+
subject(:definitions_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.schema.definitions_api }
55

66
it { is_expected.to respond_to(:get_all) }
7-
it { is_expected.to respond_to(:archive) }
7+
it { is_expected.to respond_to(:delete) }
88
it { is_expected.to respond_to(:create) }
99
it { is_expected.to respond_to(:update) }
1010
end

spec/discovery/crm/objects/client_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
subject(:client) { Hubspot::Client.new(access_token: 'test').crm.objects }
55

66
it { is_expected.to respond_to(:calls) }
7+
it { is_expected.to respond_to(:communications) }
78
it { is_expected.to respond_to(:emails) }
89
it { is_expected.to respond_to(:feedback_submissions) }
910
it { is_expected.to respond_to(:meetings) }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Crm::Objects::Communications::BasicApi' do
4+
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.basic_api }
5+
6+
it { is_expected.to respond_to(:archive) }
7+
it { is_expected.to respond_to(:create) }
8+
it { is_expected.to respond_to(:get_by_id) }
9+
it { is_expected.to respond_to(:get_page) }
10+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Crm::Objects::Communications::BatchApi' do
4+
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.batch_api }
5+
6+
it { is_expected.to respond_to(:archive) }
7+
it { is_expected.to respond_to(:create) }
8+
it { is_expected.to respond_to(:read) }
9+
it { is_expected.to respond_to(:update) }
10+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Crm::Objects::Communications::PublicObjectApi' do
4+
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.public_object_api }
5+
6+
it { is_expected.to respond_to(:merge) }
7+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Crm::Objects::Communications::SearchApi' do
4+
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.search_api }
5+
6+
it { is_expected.to respond_to(:do_search) }
7+
end

0 commit comments

Comments
 (0)