mailhub-sdk 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b21e330f891b44fa8e5b42dd525b52bae2f90b76babcb8df404f49a2a1fad4d1
4
- data.tar.gz: 5c6337f7f5d8b0c1cd1f644972fee7f71623a36e278abd9375afb7d88449183b
3
+ metadata.gz: 7f3eb83d68af7eaf69537e5fbfee0c4f3515500f001b8ccc138475c741009704
4
+ data.tar.gz: bca1a7d8a9ad230a7e0be33f03db806d48876a0ce560d377322d681ba3085ca1
5
5
  SHA512:
6
- metadata.gz: c02cb70cf5ec17155cfe66045bd60e3411de81052d875b77cc6e23465cea3b81ecc7310e7b402ed5e5fac258c088a5f2d50b18960ae7365d6ef377d4c1ec879e
7
- data.tar.gz: b73cc630facac6079310b376f544194d1b2bc6388ad4c6d3088698c405bfab5e9c6760bc26f5a579243e5f2b26f95f02e00352645bd33470be6206b4e425e645
6
+ metadata.gz: 9c74081a1c3ae3f1f70c208999f035e21a5066f2e43deb6f53283c0250c0f2d0bfcc4fc7c21ee3d8e86917341136e28b1ebb412794d57a6e4b7254935dc8485c
7
+ data.tar.gz: 22c8f349099625b6c48573dda56d9d634fb46c817b843c7106a005562d0397733464c9e048841b82ece98e53df2ca423fcb5dcbcb011c5590be02bdbe353379b
data/README.md CHANGED
@@ -1,159 +1,68 @@
1
- # Mailhub Ruby Library
1
+ # MailHub Ruby SDK
2
2
 
3
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Mailhub%2FRuby)
3
+ Official Ruby SDK for the MailHub Partner API.
4
4
 
5
- The Mailhub Ruby library provides convenient access to the Mailhub APIs from Ruby.
5
+ ## Requirements
6
6
 
7
- ## Table of Contents
7
+ - Ruby 3.3+
8
8
 
9
- - [Reference](#reference)
10
- - [Usage](#usage)
11
- - [Environments](#environments)
12
- - [Errors](#errors)
13
- - [Advanced](#advanced)
14
- - [Retries](#retries)
15
- - [Timeouts](#timeouts)
16
- - [Additional Headers](#additional-headers)
17
- - [Additional Query Parameters](#additional-query-parameters)
18
- - [Contributing](#contributing)
9
+ ## Installation
19
10
 
20
- ## Reference
21
-
22
- A full reference for this library is available [here](./reference.md).
23
-
24
- ## Usage
25
-
26
- Instantiate and use the client with the following:
27
-
28
- ```ruby
29
- require "mailhub"
30
-
31
- client = Mailhub::MailhubClient.new(api_key: "<value>")
32
-
33
- client.campaign.create_campaign
11
+ ```bash
12
+ gem install mailhub-sdk
34
13
  ```
35
14
 
36
- ## Environments
37
-
38
- This SDK allows you to configure different custom URLs for API requests. You can specify your own custom URL.
15
+ Or add it to your `Gemfile`:
39
16
 
40
- ### Custom URL
41
17
  ```ruby
42
- require "Mailhub"
43
-
44
- client = Mailhub::MailhubClient.new(
45
- base_url: "https://example.com"
46
- )
18
+ gem "mailhub-sdk"
47
19
  ```
48
20
 
49
- ## Errors
50
-
51
- Failed API calls will raise errors that can be rescued from granularly.
21
+ ## Usage
52
22
 
53
23
  ```ruby
54
24
  require "Mailhub"
55
25
 
56
26
  client = Mailhub::MailhubClient.new(
57
- base_url: "https://example.com"
27
+ api_key: "YOUR_API_KEY",
28
+ base_url: "https://api.mailhub.co.kr"
58
29
  )
59
30
 
60
- begin
61
- result = client.campaign.create_campaign
62
- rescue Mailhub::Errors::TimeoutError
63
- puts "API didn't respond before our timeout elapsed"
64
- rescue Mailhub::Errors::ServiceUnavailableError
65
- puts "API returned status 503, is probably overloaded, try again later"
66
- rescue Mailhub::Errors::ServerError
67
- puts "API returned some other 5xx status, this is probably a bug"
68
- rescue Mailhub::Errors::ResponseError => e
69
- puts "API returned an unexpected status other than 5xx: #{e.code} #{e.message}"
70
- rescue Mailhub::Errors::ApiError => e
71
- puts "Some other error occurred when calling the API: #{e.message}"
72
- end
73
- ```
74
-
75
- ## Advanced
76
-
77
- ### Retries
78
-
79
- The SDK is instrumented with automatic retries. A request will be retried as long as the request is deemed
80
- retryable and the number of retry attempts has not grown larger than the configured retry limit (default: 2).
81
-
82
- A request is deemed retryable when any of the following HTTP status codes is returned:
83
-
84
- - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
85
- - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
86
- - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) (Internal Server Error)
87
-
88
- The `retryStatusCodes` configuration controls which [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) status codes are retried:
89
-
90
- - `legacy` (default): Retries `408`, `429`, `500`, `502`, `503`, `504`, `521`, `522`, `524`
91
- - `recommended`: Retries `408`, `429`, `502`, `503`, `504` only (excludes `500 Internal Server Error` to avoid retrying non-idempotent failures)
92
-
93
- Use the `max_retries` option to configure this behavior.
94
-
95
- ```ruby
96
- require "Mailhub"
97
-
98
- client = Mailhub::MailhubClient.new(
99
- base_url: "https://example.com",
100
- max_retries: 3 # Configure max retries (default is 2)
31
+ client.message.send_message(
32
+ to_email: "user@example.com",
33
+ from_email: "noreply@example.com",
34
+ subject: "Hello from MailHub",
35
+ body: "<p>Hello!</p>"
101
36
  )
102
37
  ```
103
38
 
104
- ### Timeouts
39
+ ## Available Resources
105
40
 
106
- The SDK defaults to a 60 second timeout. Use the `timeout` option to configure this behavior.
41
+ The client exposes one sub-client per resource:
107
42
 
108
- ```ruby
109
- require "Mailhub"
110
-
111
- response = client.campaign.create_campaign(
112
- ...,
113
- timeout: 30 # 30 second timeout
114
- )
115
43
  ```
116
-
117
- ### Additional Headers
118
-
119
- If you would like to send additional headers as part of the request, use the `additional_headers` request option.
120
-
121
- ```ruby
122
- require "Mailhub"
123
-
124
- response = client.campaign.create_campaign(
125
- ...,
126
- request_options: {
127
- additional_headers: {
128
- "X-Custom-Header" => "custom-value"
129
- }
130
- }
131
- )
44
+ client.campaign
45
+ client.contact
46
+ client.custom_field
47
+ client.media
48
+ client.message
49
+ client.segment
50
+ client.template
132
51
  ```
133
52
 
134
- ### Additional Query Parameters
53
+ ## Error Handling
135
54
 
136
- If you would like to send additional query parameters as part of the request, use the `additional_query_parameters` request option.
55
+ Non-2XX responses raise a `Mailhub::Errors::ResponseError` (or a status-specific subclass, e.g. `UnauthorizedError`, `NotFoundError`), which exposes the HTTP status code and the response body:
137
56
 
138
57
  ```ruby
139
- require "Mailhub"
140
-
141
- response = client.campaign.create_campaign(
142
- ...,
143
- request_options: {
144
- additional_query_parameters: {
145
- "custom_param" => "custom-value"
146
- }
147
- }
148
- )
58
+ begin
59
+ client.message.send_message(to_email: "user@example.com")
60
+ rescue Mailhub::Errors::ResponseError => e
61
+ puts e.code
62
+ puts e.message
63
+ end
149
64
  ```
150
65
 
151
- ## Contributing
152
-
153
- While we value open-source contributions to this SDK, this library is generated programmatically.
154
- Additions made directly to this library would have to be moved over to our generation code,
155
- otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
156
- a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
157
- an issue first to discuss with us!
66
+ ## License
158
67
 
159
- On the other hand, contributions to the README are always very welcome!
68
+ MIT
@@ -18,6 +18,7 @@ module Mailhub
18
18
  # @option request_options [Hash{String => Object}] :additional_body_parameters
19
19
  # @option request_options [Integer] :timeout_in_seconds
20
20
  # @option params [String, nil] :search
21
+ # @option params [Mailhub::Types::CampaignStatus, nil] :status
21
22
  # @option params [String, nil] :sort_by
22
23
  # @option params [String, nil] :sort_direction
23
24
  # @option params [Integer, nil] :page_size
@@ -31,6 +32,7 @@ module Mailhub
31
32
  params = Mailhub::Internal::Types::Utils.normalize_keys(params)
32
33
  query_params = {}
33
34
  query_params["search"] = params[:search] if params.key?(:search)
35
+ query_params["status"] = params[:status] if params.key?(:status)
34
36
  query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
35
37
  query_params["sortDirection"] = params[:sort_direction] if params.key?(:sort_direction)
36
38
  query_params["pageSize"] = params[:page_size] if params.key?(:page_size)
@@ -6,6 +6,8 @@ module Mailhub
6
6
  class GetCampaignsRequest < Internal::Types::Model
7
7
  field :search, -> { String }, optional: true, nullable: false
8
8
 
9
+ field :status, -> { Mailhub::Types::CampaignStatus }, optional: true, nullable: false
10
+
9
11
  field :sort_by, -> { String }, optional: true, nullable: false, api_name: "sortBy"
10
12
 
11
13
  field :sort_direction, -> { String }, optional: true, nullable: false, api_name: "sortDirection"
@@ -19,6 +19,7 @@ module Mailhub
19
19
  # @option request_options [Integer] :timeout_in_seconds
20
20
  # @option params [String, nil] :search
21
21
  # @option params [Integer, nil] :segment_id
22
+ # @option params [Mailhub::Types::ContactStatus, nil] :status
22
23
  # @option params [String, nil] :sort_by
23
24
  # @option params [String, nil] :sort_direction
24
25
  # @option params [Integer, nil] :page_size
@@ -33,6 +34,7 @@ module Mailhub
33
34
  query_params = {}
34
35
  query_params["search"] = params[:search] if params.key?(:search)
35
36
  query_params["segmentId"] = params[:segment_id] if params.key?(:segment_id)
37
+ query_params["status"] = params[:status] if params.key?(:status)
36
38
  query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
37
39
  query_params["sortDirection"] = params[:sort_direction] if params.key?(:sort_direction)
38
40
  query_params["pageSize"] = params[:page_size] if params.key?(:page_size)
@@ -8,6 +8,8 @@ module Mailhub
8
8
 
9
9
  field :segment_id, -> { Integer }, optional: true, nullable: false, api_name: "segmentId"
10
10
 
11
+ field :status, -> { Mailhub::Types::ContactStatus }, optional: true, nullable: false
12
+
11
13
  field :sort_by, -> { String }, optional: true, nullable: false, api_name: "sortBy"
12
14
 
13
15
  field :sort_direction, -> { String }, optional: true, nullable: false, api_name: "sortDirection"
@@ -21,15 +21,19 @@ module Mailhub
21
21
  # @param max_retries [Integer] The number of times to retry a failed request, defaults to 2.
22
22
  # @param timeout [Float] The timeout for the request, defaults to 60.0 seconds.
23
23
  # @param headers [Hash] The headers for the request.
24
+ # @param overridable_headers [Array<String>] The names of the client-level headers a request
25
+ # may replace via `additional_headers`. Holds the API's global headers; SDK metadata and
26
+ # auth headers are absent from it and so stay protected.
24
27
  # @param auth_provider [Object, nil] An optional auth provider responding to
25
28
  # `auth_headers`. When present its headers are resolved on every request so
26
29
  # token-based schemes (e.g. OAuth) can refresh an expired token mid-session.
27
- def initialize(base_url:, max_retries: 2, timeout: 60.0, headers: {}, auth_provider: nil)
30
+ def initialize(base_url:, max_retries: 2, timeout: 60.0, headers: {}, overridable_headers: [], auth_provider: nil)
28
31
  @base_url = base_url
29
32
  @max_retries = max_retries
30
33
  @timeout = timeout
31
34
  @auth_provider = auth_provider
32
35
  @default_headers = headers
36
+ @overridable_headers = overridable_headers.to_set { |name| name.to_s.downcase }
33
37
  end
34
38
 
35
39
  # @param request [Mailhub::Internal::Http::BaseRequest] The HTTP request.
@@ -46,7 +50,7 @@ module Mailhub
46
50
  http_request = build_http_request(
47
51
  url:,
48
52
  method: request.method,
49
- headers: request.encode_headers(protected_keys: @default_headers.keys + auth_headers.keys),
53
+ headers: request.encode_headers(protected_keys: protected_header_keys + auth_headers.keys),
50
54
  body: request.encode_body,
51
55
  auth_headers: auth_headers
52
56
  )
@@ -69,6 +73,15 @@ module Mailhub
69
73
  response
70
74
  end
71
75
 
76
+ # The client-level header names that `additional_headers` must not replace: every default
77
+ # header except the API's global headers, which are overridable per request.
78
+ # @return [Array<Symbol, String>] The protected header names.
79
+ def protected_header_keys
80
+ return @default_headers.keys if @overridable_headers.empty?
81
+
82
+ @default_headers.keys.reject { |name| @overridable_headers.include?(name.to_s.downcase) }
83
+ end
84
+
72
85
  # Determines if a request should be retried based on the response status code.
73
86
  # @param response [Net::HTTPResponse] The HTTP response.
74
87
  # @param attempt [Integer] The current retry attempt (0-indexed).
@@ -7,6 +7,10 @@ module Mailhub
7
7
  field :name, -> { String }, optional: true, nullable: false
8
8
 
9
9
  field :body, -> { String }, optional: true, nullable: false
10
+
11
+ field :editor_type, -> { Mailhub::Types::EditorType }, optional: true, nullable: false, api_name: "editorType"
12
+
13
+ field :editor_source, -> { String }, optional: true, nullable: false, api_name: "editorSource"
10
14
  end
11
15
  end
12
16
  end
@@ -9,6 +9,10 @@ module Mailhub
9
9
  field :name, -> { String }, optional: true, nullable: false
10
10
 
11
11
  field :body, -> { String }, optional: true, nullable: false
12
+
13
+ field :editor_type, -> { Mailhub::Types::EditorType }, optional: true, nullable: false, api_name: "editorType"
14
+
15
+ field :editor_source, -> { String }, optional: true, nullable: false, api_name: "editorSource"
12
16
  end
13
17
  end
14
18
  end
@@ -4,12 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 캠페인에 첨부된 미디어 정보
6
6
  class CampaignMediaModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
- field :campaign_id, -> { Integer }, optional: true, nullable: false, api_name: "campaignId"
10
-
11
- field :media_id, -> { Integer }, optional: true, nullable: false, api_name: "mediaId"
12
-
13
7
  field :media_code, -> { String }, optional: true, nullable: false, api_name: "mediaCode"
14
8
 
15
9
  field :file_name, -> { String }, optional: true, nullable: false, api_name: "fileName"
@@ -4,8 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 캠페인 정보
6
6
  class CampaignModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :code, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :name, -> { String }, optional: true, nullable: false
@@ -18,12 +16,14 @@ module Mailhub
18
16
 
19
17
  field :segments, -> { Internal::Types::Array[Mailhub::Types::CampaignSegmentModel] }, optional: true, nullable: false
20
18
 
21
- field :template_id, -> { Integer }, optional: true, nullable: false, api_name: "templateId"
22
-
23
19
  field :template_code, -> { String }, optional: true, nullable: false, api_name: "templateCode"
24
20
 
25
21
  field :body, -> { String }, optional: true, nullable: false
26
22
 
23
+ field :editor_type, -> { Mailhub::Types::EditorType }, optional: true, nullable: false, api_name: "editorType"
24
+
25
+ field :editor_source, -> { String }, optional: true, nullable: false, api_name: "editorSource"
26
+
27
27
  field :send_at, -> { String }, optional: true, nullable: false, api_name: "sendAt"
28
28
 
29
29
  field :to_send, -> { Integer }, optional: true, nullable: false, api_name: "toSend"
@@ -4,8 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 캠페인의 대상 세그먼트 정보
6
6
  class CampaignSegmentModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :code, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :name, -> { String }, optional: true, nullable: false
@@ -4,8 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 연락처 정보
6
6
  class ContactModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :guid, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :email, -> { String }, optional: true, nullable: false
@@ -4,8 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 연락처가 속한 세그먼트 정보
6
6
  class ContactSegmentModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :code, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :name, -> { String }, optional: true, nullable: false
@@ -4,8 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 커스텀 필드 정보
6
6
  class CustomFieldModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :key, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :name, -> { String }, optional: true, nullable: false
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mailhub
4
+ module Types
5
+ module EditorType
6
+ extend Mailhub::Internal::Types::Enum
7
+
8
+ HTML = "Html"
9
+ VISUAL = "Visual"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mailhub
4
+ module Types
5
+ module ExpressionGroup
6
+ extend Mailhub::Internal::Types::Enum
7
+
8
+ CONTACT = "Contact"
9
+ CAMPAIGN = "Campaign"
10
+ LINK = "Link"
11
+ end
12
+ end
13
+ end
@@ -4,8 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 미디어 정보
6
6
  class MediaModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :guid, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :code, -> { String }, optional: true, nullable: false
@@ -22,6 +20,8 @@ module Mailhub
22
20
 
23
21
  field :storage_path, -> { String }, optional: true, nullable: false, api_name: "storagePath"
24
22
 
23
+ field :url, -> { String }, optional: true, nullable: false
24
+
25
25
  field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
26
26
  end
27
27
  end
@@ -14,6 +14,8 @@ module Mailhub
14
14
 
15
15
  field :body, -> { String }, optional: true, nullable: false
16
16
 
17
+ field :plain_text, -> { String }, optional: true, nullable: false, api_name: "plainText"
18
+
17
19
  field :status, -> { String }, optional: true, nullable: false
18
20
 
19
21
  field :scheduled_at, -> { String }, optional: true, nullable: false, api_name: "scheduledAt"
@@ -22,6 +24,8 @@ module Mailhub
22
24
 
23
25
  field :bounce_reason, -> { String }, optional: true, nullable: false, api_name: "bounceReason"
24
26
 
27
+ field :bounce_message, -> { String }, optional: true, nullable: false, api_name: "bounceMessage"
28
+
25
29
  field :provider_message_id, -> { String }, optional: true, nullable: false, api_name: "providerMessageId"
26
30
 
27
31
  field :attempt_count, -> { Integer }, optional: true, nullable: false, api_name: "attemptCount"
@@ -4,8 +4,6 @@ module Mailhub
4
4
  module Types
5
5
  # 세그먼트 정보
6
6
  class SegmentModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :code, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :name, -> { String }, optional: true, nullable: false
@@ -9,6 +9,8 @@ module Mailhub
9
9
  field :label, -> { String }, optional: true, nullable: false
10
10
 
11
11
  field :description, -> { String }, optional: true, nullable: false
12
+
13
+ field :group, -> { Mailhub::Types::ExpressionGroup }, optional: true, nullable: false
12
14
  end
13
15
  end
14
16
  end
@@ -4,14 +4,16 @@ module Mailhub
4
4
  module Types
5
5
  # 템플릿 정보
6
6
  class TemplateModel < Internal::Types::Model
7
- field :id, -> { Integer }, optional: true, nullable: false
8
-
9
7
  field :name, -> { String }, optional: true, nullable: false
10
8
 
11
9
  field :code, -> { String }, optional: true, nullable: false
12
10
 
13
11
  field :body, -> { String }, optional: true, nullable: false
14
12
 
13
+ field :editor_type, -> { Mailhub::Types::EditorType }, optional: true, nullable: false, api_name: "editorType"
14
+
15
+ field :editor_source, -> { String }, optional: true, nullable: false, api_name: "editorSource"
16
+
15
17
  field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
16
18
 
17
19
  field :updated_at, -> { String }, optional: true, nullable: false, api_name: "updatedAt"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mailhub
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/Mailhub.rb CHANGED
@@ -44,6 +44,7 @@ require_relative "Mailhub/types/campaign_media_model"
44
44
  require_relative "Mailhub/types/campaign_segment_model"
45
45
  require_relative "Mailhub/types/campaign_status"
46
46
  require_relative "Mailhub/types/campaign_type"
47
+ require_relative "Mailhub/types/editor_type"
47
48
  require_relative "Mailhub/types/campaign_model"
48
49
  require_relative "Mailhub/types/campaign_model_paged_result"
49
50
  require_relative "Mailhub/types/contact_import_status"
@@ -57,6 +58,7 @@ require_relative "Mailhub/types/contact_model_cursor_paged_result"
57
58
  require_relative "Mailhub/types/contact_model_paged_result"
58
59
  require_relative "Mailhub/types/custom_field_type"
59
60
  require_relative "Mailhub/types/custom_field_model"
61
+ require_relative "Mailhub/types/expression_group"
60
62
  require_relative "Mailhub/types/media_model"
61
63
  require_relative "Mailhub/types/media_model_paged_result"
62
64
  require_relative "Mailhub/types/message_event_type"
data/reference.md CHANGED
@@ -36,6 +36,14 @@ client.campaign.get_campaigns
36
36
  <dl>
37
37
  <dd>
38
38
 
39
+ **status:** `Mailhub::Types::CampaignStatus` — 캠페인 상태 필터
40
+
41
+ </dd>
42
+ </dl>
43
+
44
+ <dl>
45
+ <dd>
46
+
39
47
  **sort_by:** `String` — 정렬 기준 필드명
40
48
 
41
49
  </dd>
@@ -1272,6 +1280,14 @@ client.contact.get_contacts
1272
1280
  <dl>
1273
1281
  <dd>
1274
1282
 
1283
+ **status:** `Mailhub::Types::ContactStatus` — 특정 상태의 연락처만 조회
1284
+
1285
+ </dd>
1286
+ </dl>
1287
+
1288
+ <dl>
1289
+ <dd>
1290
+
1275
1291
  **sort_by:** `String` — 정렬 기준 필드명
1276
1292
 
1277
1293
  </dd>
@@ -3381,6 +3397,22 @@ client.template.create_template
3381
3397
  <dl>
3382
3398
  <dd>
3383
3399
 
3400
+ **editor_type:** `Mailhub::Types::EditorType`
3401
+
3402
+ </dd>
3403
+ </dl>
3404
+
3405
+ <dl>
3406
+ <dd>
3407
+
3408
+ **editor_source:** `String` — 에디터 소스
3409
+
3410
+ </dd>
3411
+ </dl>
3412
+
3413
+ <dl>
3414
+ <dd>
3415
+
3384
3416
  **request_options:** `Mailhub::Template::RequestOptions`
3385
3417
 
3386
3418
  </dd>
@@ -3533,6 +3565,22 @@ client.template.update_template(code: "code")
3533
3565
  <dl>
3534
3566
  <dd>
3535
3567
 
3568
+ **editor_type:** `Mailhub::Types::EditorType`
3569
+
3570
+ </dd>
3571
+ </dl>
3572
+
3573
+ <dl>
3574
+ <dd>
3575
+
3576
+ **editor_source:** `String` — 에디터 소스
3577
+
3578
+ </dd>
3579
+ </dl>
3580
+
3581
+ <dl>
3582
+ <dd>
3583
+
3536
3584
  **request_options:** `Mailhub::Template::RequestOptions`
3537
3585
 
3538
3586
  </dd>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailhub-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mailhub
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-30 00:00:00.000000000 Z
11
+ date: 2026-08-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The Mailhub Ruby library provides convenient access to the Mailhub API
14
14
  from Ruby.
@@ -17,9 +17,6 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - ".fern/metadata.json"
21
- - ".fernignore"
22
- - ".rubocop.yml"
23
20
  - CONTRIBUTING.md
24
21
  - README.md
25
22
  - Rakefile
@@ -146,6 +143,8 @@ files:
146
143
  - lib/Mailhub/types/contact_status.rb
147
144
  - lib/Mailhub/types/custom_field_model.rb
148
145
  - lib/Mailhub/types/custom_field_type.rb
146
+ - lib/Mailhub/types/editor_type.rb
147
+ - lib/Mailhub/types/expression_group.rb
149
148
  - lib/Mailhub/types/import_contact_error_model.rb
150
149
  - lib/Mailhub/types/media_model.rb
151
150
  - lib/Mailhub/types/media_model_paged_result.rb
data/.fern/metadata.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "cliVersion": "5.80.2",
3
- "generatorName": "fernapi/fern-ruby-sdk",
4
- "generatorVersion": "latest",
5
- "generatorConfig": {
6
- "omitFernHeaders": true,
7
- "moduleName": "Mailhub",
8
- "clientModuleName": "MailhubClient"
9
- },
10
- "originGitCommit": "2944d1cf51878a31601d93fb582bd2343c331b45"
11
- }
data/.fernignore DELETED
@@ -1,3 +0,0 @@
1
- # custom.gemspec.rb에 배포명(spec.name)/homepage/license를 직접 넣어뒀는데,
2
- # 재생성(--force) 시 이 디렉토리를 통째로 비우기 때문에 보호해야 한다.
3
- custom.gemspec.rb
data/.rubocop.yml DELETED
@@ -1,103 +0,0 @@
1
- plugins:
2
- - rubocop-minitest
3
-
4
- AllCops:
5
- TargetRubyVersion: 3.3
6
- NewCops: enable
7
-
8
- Style/StringLiterals:
9
- EnforcedStyle: double_quotes
10
-
11
- Style/StringLiteralsInInterpolation:
12
- EnforcedStyle: double_quotes
13
-
14
- Style/AccessModifierDeclarations:
15
- Enabled: false
16
-
17
- Lint/ConstantDefinitionInBlock:
18
- Enabled: false
19
-
20
- Metrics/AbcSize:
21
- Enabled: false
22
-
23
- Metrics/BlockLength:
24
- Enabled: false
25
-
26
- Metrics/ClassLength:
27
- Enabled: false
28
-
29
- Metrics/MethodLength:
30
- Enabled: false
31
-
32
- Metrics/ParameterLists:
33
- Enabled: false
34
-
35
- Metrics/PerceivedComplexity:
36
- Enabled: false
37
-
38
- Metrics/CyclomaticComplexity:
39
- Enabled: false
40
-
41
- Metrics/ModuleLength:
42
- Enabled: false
43
-
44
- Layout/LineLength:
45
- Enabled: false
46
-
47
- Naming/VariableNumber:
48
- EnforcedStyle: normalcase
49
- Severity: warning
50
-
51
- Style/Documentation:
52
- Enabled: false
53
-
54
- Style/Lambda:
55
- EnforcedStyle: literal
56
-
57
- Minitest/MultipleAssertions:
58
- Enabled: false
59
-
60
- Minitest/UselessAssertion:
61
- Enabled: false
62
-
63
- # Dynamic snippets are code samples for documentation, not standalone Ruby files.
64
- Style/FrozenStringLiteralComment:
65
- Exclude:
66
- - "dynamic-snippets/**/*"
67
-
68
- # Indent hash elements 2 spaces from the start of the enclosing line rather than
69
- # aligning with the preceding paren or bracket. Generated code nests hashes inside
70
- # arrays and method calls; the "consistent" style is more readable there.
71
- Layout/FirstHashElementIndentation:
72
- EnforcedStyle: consistent
73
- Exclude:
74
- - "dynamic-snippets/**/*"
75
-
76
- # Match Layout/FirstHashElementIndentation: indent the first argument 2 spaces
77
- # from the start of the method call's line, regardless of parenthesis position.
78
- # Dynamic snippets are code samples, not standalone Ruby files; exclude them to
79
- # keep this config symmetric with Layout/FirstHashElementIndentation above.
80
- Layout/FirstArgumentIndentation:
81
- EnforcedStyle: consistent
82
- Exclude:
83
- - "dynamic-snippets/**/*"
84
-
85
- # The generator emits non-idiomatic class names (e.g. Get_With_Query, JSON_)
86
- # derived from IR type names whose wire form contains underscores or digits.
87
- # Rubocop never auto-corrected these (naming cops have no autocorrecter), so
88
- # disabling the cop keeps CI green without changing customer output. Fixing at
89
- # source would rename public types across every existing SDK and therefore
90
- # requires a ruby-v2 major-version bump with a generator migration.
91
- Naming/ClassAndModuleCamelCase:
92
- Enabled: false
93
-
94
- # Integer literals are emitted unformatted (e.g. 1000000, not 1_000_000).
95
- # Rubocop has an autocorrecter for this cop, but the only caller of integer
96
- # emission is the dynamic-snippets path, which feeds customer-facing surfaces:
97
- # (1) snippet markdown in reference docs, (2) dynamic-snippets/*.rb sample
98
- # files. Neither is rubocop-gated (markdown isn't Ruby, dynamic-snippets/**/*
99
- # is excluded above), so formatting integers there would change docs/dashboard
100
- # output without any rubocop benefit. Disabling the cop keeps integers raw
101
- # everywhere and avoids customer-visible diffs.
102
- Style/NumericLiterals:
103
- Enabled: false