Class: HubSpotSDK::Resources::Cms::Domains
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Domains
- Defined in:
- lib/hubspot_sdk/resources/cms/domains.rb
Instance Method Summary collapse
-
#get(domain_id, request_options: {}) ⇒ HubSpotSDK::Models::Cms::Domain
Returns a single domains with the id specified.
-
#initialize(client:) ⇒ Domains
constructor
private
A new instance of Domains.
-
#list(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Cms::Domain>
Some parameter documentations has been truncated, see Models::Cms::DomainListParams for more details.
Constructor Details
#initialize(client:) ⇒ Domains
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Domains.
79 80 81 |
# File 'lib/hubspot_sdk/resources/cms/domains.rb', line 79 def initialize(client:) @client = client end |
Instance Method Details
#get(domain_id, request_options: {}) ⇒ HubSpotSDK::Models::Cms::Domain
Returns a single domains with the id specified.
67 68 69 70 71 72 73 74 |
# File 'lib/hubspot_sdk/resources/cms/domains.rb', line 67 def get(domain_id, params = {}) @client.request( method: :get, path: ["cms/domains/2026-03/%1$s", domain_id], model: HubSpotSDK::Cms::Domain, options: params[:request_options] ) end |
#list(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Cms::Domain>
Some parameter documentations has been truncated, see Models::Cms::DomainListParams for more details.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/hubspot_sdk/resources/cms/domains.rb', line 37 def list(params = {}) parsed, = HubSpotSDK::Cms::DomainListParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "cms/domains/2026-03", query: query.transform_keys( created_after: "createdAfter", created_at: "createdAt", created_before: "createdBefore", updated_after: "updatedAfter", updated_at: "updatedAt", updated_before: "updatedBefore" ), page: HubSpotSDK::Internal::Page, model: HubSpotSDK::Cms::Domain, options: ) end |