Skip to content

Commit

Permalink
Merge pull request #234 from HubSpot/feature/update_discoveries
Browse files Browse the repository at this point in the history
Update discoveries
  • Loading branch information
alzheltkovskiy-hubspot authored May 12, 2023
2 parents ce10092 + fb5f0ba commit 8021242
Show file tree
Hide file tree
Showing 25 changed files with 233 additions and 27 deletions.
13 changes: 0 additions & 13 deletions lib/hubspot/discovery/crm/associations/api/types_api.rb

This file was deleted.

6 changes: 4 additions & 2 deletions lib/hubspot/discovery/crm/associations/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ module Associations
class Client
include Hubspot::Discovery::BaseModuleClient
def api_modules
%i[v4].freeze
%i[
v4
schema
].freeze
end
def api_classes
%i[
batch
types
].freeze
end
end
Expand Down
15 changes: 15 additions & 0 deletions lib/hubspot/discovery/crm/associations/schema/api/types_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require_relative '../../../../base_api_client'

module Hubspot
module Discovery
module Crm
module Associations
module Schema
class TypesApi
include Hubspot::Discovery::BaseApiClient
end
end
end
end
end
end
20 changes: 20 additions & 0 deletions lib/hubspot/discovery/crm/associations/schema/client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require_relative '../../../base_module_client'

module Hubspot
module Discovery
module Crm
module Associations
module Schema
class Client
include Hubspot::Discovery::BaseModuleClient
def api_classes
%i[
types
].freeze
end
end
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Discovery
module Crm
module Associations
module V4
class DefinitionsApi
class BasicApi
include Hubspot::Discovery::BaseApiClient
end
end
Expand Down
7 changes: 6 additions & 1 deletion lib/hubspot/discovery/crm/associations/v4/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ module Associations
module V4
class Client
include Hubspot::Discovery::BaseModuleClient
def api_modules
%i[
schema
].freeze
end
def api_classes
%i[
basic
batch
definitions
].freeze
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require_relative '../../../../../base_api_client'

module Hubspot
module Discovery
module Crm
module Associations
module V4
module Schema
class DefinitionsApi
include Hubspot::Discovery::BaseApiClient
end
end
end
end
end
end
end
22 changes: 22 additions & 0 deletions lib/hubspot/discovery/crm/associations/v4/schema/client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require_relative '../../../../base_api_client'

module Hubspot
module Discovery
module Crm
module Associations
module V4
module Schema
class Client
include Hubspot::Discovery::BaseModuleClient
def api_classes
%i[
definitions
].freeze
end
end
end
end
end
end
end
end
1 change: 1 addition & 0 deletions lib/hubspot/discovery/crm/objects/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Client
def api_modules
%i[
calls
communications
emails
feedback_submissions
meetings
Expand Down
15 changes: 15 additions & 0 deletions lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require_relative '../../../../base_api_client'

module Hubspot
module Discovery
module Crm
module Objects
module Communications
class BasicApi
include Hubspot::Discovery::BaseApiClient
end
end
end
end
end
end
15 changes: 15 additions & 0 deletions lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require_relative '../../../../base_api_client'

module Hubspot
module Discovery
module Crm
module Objects
module Communications
class BatchApi
include Hubspot::Discovery::BaseApiClient
end
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require_relative '../../../../base_api_client'

module Hubspot
module Discovery
module Crm
module Objects
module Communications
class PublicObjectApi
include Hubspot::Discovery::BaseApiClient
end
end
end
end
end
end
15 changes: 15 additions & 0 deletions lib/hubspot/discovery/crm/objects/communications/api/search_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require_relative '../../../../base_api_client'

module Hubspot
module Discovery
module Crm
module Objects
module Communications
class SearchApi
include Hubspot::Discovery::BaseApiClient
end
end
end
end
end
end
24 changes: 24 additions & 0 deletions lib/hubspot/discovery/crm/objects/communications/client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require_relative '../../../base_module_client'

module Hubspot
module Discovery
module Crm
module Objects
module Communications
class Client
include Hubspot::Discovery::BaseModuleClient

def api_classes
%i[
basic
batch
public_object
search
].freeze
end
end
end
end
end
end
end
1 change: 1 addition & 0 deletions spec/discovery/crm/associations/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
subject(:client) { Hubspot::Client.new(access_token: 'test').crm.associations }

it { is_expected.to respond_to(:v4) }
it { is_expected.to respond_to(:schema) }
end
7 changes: 7 additions & 0 deletions spec/discovery/crm/associations/schema/types_api_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'spec_helper'

describe 'Hubspot::Discovery::Crm::Associations::Schema::TypesApi' do
subject(:types_api) { Hubspot::Client.new(access_token: 'test').crm.associations.schema.types_api }

it { is_expected.to respond_to(:get_all) }
end
7 changes: 0 additions & 7 deletions spec/discovery/crm/associations/types_api_spec.rb

This file was deleted.

10 changes: 10 additions & 0 deletions spec/discovery/crm/associations/v4/basic_api_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'spec_helper'

describe 'Hubspot::Discovery::Crm::Associations::V4::BasicApi' do
subject(:basic_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.basic_api }

it { is_expected.to respond_to(:archive) }
it { is_expected.to respond_to(:create_default) }
it { is_expected.to respond_to(:create) }
it { is_expected.to respond_to(:get_page) }
end
7 changes: 7 additions & 0 deletions spec/discovery/crm/associations/v4/client_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'spec_helper'

describe 'Hubspot::Client' do
subject(:client) { Hubspot::Client.new(access_token: 'test').crm.associations.v4 }

it { is_expected.to respond_to(:schema) }
end
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require 'spec_helper'

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

it { is_expected.to respond_to(:get_all) }
it { is_expected.to respond_to(:archive) }
it { is_expected.to respond_to(:delete) }
it { is_expected.to respond_to(:create) }
it { is_expected.to respond_to(:update) }
end
1 change: 1 addition & 0 deletions spec/discovery/crm/objects/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
subject(:client) { Hubspot::Client.new(access_token: 'test').crm.objects }

it { is_expected.to respond_to(:calls) }
it { is_expected.to respond_to(:communications) }
it { is_expected.to respond_to(:emails) }
it { is_expected.to respond_to(:feedback_submissions) }
it { is_expected.to respond_to(:meetings) }
Expand Down
10 changes: 10 additions & 0 deletions spec/discovery/crm/objects/communications/basic_api_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'spec_helper'

describe 'Hubspot::Discovery::Crm::Objects::Communications::BasicApi' do
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.basic_api }

it { is_expected.to respond_to(:archive) }
it { is_expected.to respond_to(:create) }
it { is_expected.to respond_to(:get_by_id) }
it { is_expected.to respond_to(:get_page) }
end
10 changes: 10 additions & 0 deletions spec/discovery/crm/objects/communications/batch_api_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'spec_helper'

describe 'Hubspot::Discovery::Crm::Objects::Communications::BatchApi' do
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.batch_api }

it { is_expected.to respond_to(:archive) }
it { is_expected.to respond_to(:create) }
it { is_expected.to respond_to(:read) }
it { is_expected.to respond_to(:update) }
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'spec_helper'

describe 'Hubspot::Discovery::Crm::Objects::Communications::PublicObjectApi' do
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.public_object_api }

it { is_expected.to respond_to(:merge) }
end
7 changes: 7 additions & 0 deletions spec/discovery/crm/objects/communications/search_api_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'spec_helper'

describe 'Hubspot::Discovery::Crm::Objects::Communications::SearchApi' do
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.search_api }

it { is_expected.to respond_to(:do_search) }
end

0 comments on commit 8021242

Please sign in to comment.