Class: HubSpotSDK::Resources::Cms::Blogs::Authors::Batch

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Batch

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 Batch.

Parameters:



114
115
116
# File 'lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb', line 114

def initialize(client:)
  @client = client
end

Instance Method Details

#create(inputs:, request_options: {}) ⇒ StringIO

Create the Blog Author objects detailed in the request body.

Parameters:

Returns:

  • (StringIO)

See Also:



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb', line 20

def create(params)
  parsed, options = HubSpotSDK::Cms::Blogs::Authors::BatchCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/batch/create",
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed,
    model: StringIO,
    options: options
  )
end

#delete(inputs:, request_options: {}) ⇒ nil

Delete the Blog Author objects identified in the request body.

Parameters:

Returns:

  • (nil)

See Also:



71
72
73
74
75
76
77
78
79
80
81
# File 'lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb', line 71

def delete(params)
  parsed, options = HubSpotSDK::Cms::Blogs::Authors::BatchDeleteParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/batch/archive",
    headers: {"content-type" => "*/*"},
    body: parsed,
    model: NilClass,
    options: options
  )
end

#get(inputs:, archived: nil, request_options: {}) ⇒ StringIO

Retrieve the Blog Author objects identified in the request body.

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • archived (Boolean)

    Query param: Whether to return only results that have been archived.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb', line 96

def get(params)
  query_params = [:archived]
  parsed, options = HubSpotSDK::Cms::Blogs::Authors::BatchGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/batch/read",
    query: query,
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed.except(*query_params),
    model: StringIO,
    options: options
  )
end

#update(inputs:, archived: nil, request_options: {}) ⇒ StringIO

Update the Blog Author objects identified in the request body.

Parameters:

  • inputs (Array<Object>)

    Body param: JSON nodes to input.

  • archived (Boolean)

    Query param: Whether to return only results that have been archived.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb', line 45

def update(params)
  query_params = [:archived]
  parsed, options = HubSpotSDK::Cms::Blogs::Authors::BatchUpdateParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/batch/update",
    query: query,
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed.except(*query_params),
    model: StringIO,
    options: options
  )
end