Class: HubSpotSDK::Resources::Cms::Blogs::Authors::Batch
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Blogs::Authors::Batch
- Defined in:
- lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb
Instance Method Summary collapse
-
#create(inputs:, request_options: {}) ⇒ StringIO
Create the Blog Author objects detailed in the request body.
-
#delete(inputs:, request_options: {}) ⇒ nil
Delete the Blog Author objects identified in the request body.
-
#get(inputs:, archived: nil, request_options: {}) ⇒ StringIO
Retrieve the Blog Author objects identified in the request body.
-
#initialize(client:) ⇒ Batch
constructor
private
A new instance of Batch.
-
#update(inputs:, archived: nil, request_options: {}) ⇒ StringIO
Update the Blog Author objects identified in the request body.
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.
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.
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, = 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: ) end |
#delete(inputs:, request_options: {}) ⇒ nil
Delete the Blog Author objects identified in the request body.
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, = 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: ) end |
#get(inputs:, archived: nil, request_options: {}) ⇒ StringIO
Retrieve the Blog Author objects identified in the request body.
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, = 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: ) end |
#update(inputs:, archived: nil, request_options: {}) ⇒ StringIO
Update the Blog Author objects identified in the request body.
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, = 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: ) end |