sentdm 0.0.3 → 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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/client.rb +13 -12
  5. data/lib/sentdm/internal/type/base_model.rb +5 -5
  6. data/lib/sentdm/internal/util.rb +1 -1
  7. data/lib/sentdm/models/template_list_response.rb +3 -3
  8. data/lib/sentdm/models/{template_response.rb → template_response_v2.rb} +1 -1
  9. data/lib/sentdm/models.rb +1 -9
  10. data/lib/sentdm/resources/templates.rb +4 -4
  11. data/lib/sentdm/version.rb +1 -1
  12. data/lib/sentdm.rb +1 -15
  13. data/rbi/sentdm/client.rbi +12 -10
  14. data/rbi/sentdm/internal/util.rbi +1 -1
  15. data/rbi/sentdm/models/template_list_response.rbi +4 -4
  16. data/rbi/sentdm/models/{template_response.rbi → template_response_v2.rbi} +2 -2
  17. data/rbi/sentdm/models.rbi +1 -10
  18. data/rbi/sentdm/resources/templates.rbi +2 -2
  19. data/sig/sentdm/client.rbs +2 -4
  20. data/sig/sentdm/models/template_list_response.rbs +6 -6
  21. data/sig/sentdm/models/{template_response.rbs → template_response_v2.rbs} +2 -2
  22. data/sig/sentdm/models.rbs +1 -9
  23. data/sig/sentdm/resources/templates.rbs +2 -2
  24. metadata +5 -47
  25. data/lib/sentdm/models/organization_list_params.rb +0 -14
  26. data/lib/sentdm/models/organization_list_response.rb +0 -57
  27. data/lib/sentdm/models/organization_retrieve_profiles_params.rb +0 -14
  28. data/lib/sentdm/models/organization_retrieve_profiles_response.rb +0 -22
  29. data/lib/sentdm/models/organizations/customer_user.rb +0 -96
  30. data/lib/sentdm/models/organizations/user_delete_params.rb +0 -22
  31. data/lib/sentdm/models/organizations/user_invite_params.rb +0 -40
  32. data/lib/sentdm/models/organizations/user_list_params.rb +0 -28
  33. data/lib/sentdm/models/organizations/user_list_response.rb +0 -36
  34. data/lib/sentdm/models/organizations/user_retrieve_params.rb +0 -22
  35. data/lib/sentdm/models/organizations/user_update_role_params.rb +0 -28
  36. data/lib/sentdm/models/profile_summary.rb +0 -45
  37. data/lib/sentdm/resources/organizations/users.rb +0 -150
  38. data/lib/sentdm/resources/organizations.rb +0 -58
  39. data/rbi/sentdm/models/organization_list_params.rbi +0 -27
  40. data/rbi/sentdm/models/organization_list_response.rbi +0 -131
  41. data/rbi/sentdm/models/organization_retrieve_profiles_params.rbi +0 -30
  42. data/rbi/sentdm/models/organization_retrieve_profiles_response.rbi +0 -47
  43. data/rbi/sentdm/models/organizations/customer_user.rbi +0 -129
  44. data/rbi/sentdm/models/organizations/user_delete_params.rbi +0 -40
  45. data/rbi/sentdm/models/organizations/user_invite_params.rbi +0 -73
  46. data/rbi/sentdm/models/organizations/user_list_params.rbi +0 -48
  47. data/rbi/sentdm/models/organizations/user_list_response.rbi +0 -71
  48. data/rbi/sentdm/models/organizations/user_retrieve_params.rbi +0 -40
  49. data/rbi/sentdm/models/organizations/user_update_role_params.rbi +0 -51
  50. data/rbi/sentdm/models/profile_summary.rbi +0 -74
  51. data/rbi/sentdm/resources/organizations/users.rbi +0 -95
  52. data/rbi/sentdm/resources/organizations.rbi +0 -37
  53. data/sig/sentdm/models/organization_list_params.rbs +0 -15
  54. data/sig/sentdm/models/organization_list_response.rbs +0 -76
  55. data/sig/sentdm/models/organization_retrieve_profiles_params.rbs +0 -15
  56. data/sig/sentdm/models/organization_retrieve_profiles_response.rbs +0 -28
  57. data/sig/sentdm/models/organizations/customer_user.rbs +0 -91
  58. data/sig/sentdm/models/organizations/user_delete_params.rbs +0 -25
  59. data/sig/sentdm/models/organizations/user_invite_params.rbs +0 -44
  60. data/sig/sentdm/models/organizations/user_list_params.rbs +0 -30
  61. data/sig/sentdm/models/organizations/user_list_response.rbs +0 -47
  62. data/sig/sentdm/models/organizations/user_retrieve_params.rbs +0 -25
  63. data/sig/sentdm/models/organizations/user_update_role_params.rbs +0 -32
  64. data/sig/sentdm/models/profile_summary.rbs +0 -51
  65. data/sig/sentdm/resources/organizations/users.rbs +0 -44
  66. data/sig/sentdm/resources/organizations.rbs +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e6050f57a7fdc825cb2e93077b9bb03b637a05f5652887305b9081a36ecfbda
4
- data.tar.gz: 24b79964385a37ec96ac266e82421a1f866a562fc672101b3ce2d8faa37e2d08
3
+ metadata.gz: fab8dc014cdfdffd5db27dfeb306c0202ca83650d6d6e318538907885673f451
4
+ data.tar.gz: 1a700098dc48f38b8552099ac2927132a0a619ef603d3afacdd7ee4b93fe4d29
5
5
  SHA512:
6
- metadata.gz: cb0fbe45044e3db1a86894fb1dafb9d97ce5d518797cb25689d40dffcf73204415fbc9496020a034639a325abf0dd60a85bb18107934cad52bbaa64e7dcdb151
7
- data.tar.gz: 94280cd5060d7d02751be2ee1eb12eb2b3c939c2554cf6ef5ed6602f002464e8158b8d92cd44c0894749fc55eaa8ddf6ecb9e46d82a21d7ae3de485598247490
6
+ metadata.gz: 64dc4a9f5d777c149fa0d7bc2fd7ecdb22da7d2e5a778717567bc617e201fd5cc275500d1d3a670404fb3e7350a51259774e5f6ad1aea585a0edcd72a3911f2d
7
+ data.tar.gz: cb1dc7f0eea9e923b18d3ba2267e9d984eb75ed73dbd93bba4c6d2d17bb65f3bba883aeed481c48dfb3e934b7c25f7cc449fbf744a54c004edc5b0756d29c03d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 (2026-02-16)
4
+
5
+ Full Changelog: [v0.1.0...v0.2.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.1.0...v0.2.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([2bbf0b7](https://github.com/sentdm/sent-dm-ruby/commit/2bbf0b7eb75ea163ba7694d3e79d71b5d0e2b804))
10
+
11
+ ## 0.1.0 (2026-02-10)
12
+
13
+ Full Changelog: [v0.0.3...v0.1.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.0.3...v0.1.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([6cf3a01](https://github.com/sentdm/sent-dm-ruby/commit/6cf3a01e1aba9d12465f2880227871d26d7858d0))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **client:** loosen json header parsing ([91563cf](https://github.com/sentdm/sent-dm-ruby/commit/91563cf9d069d31dd7bb7922d39f58d28723dd17))
23
+
3
24
  ## 0.0.3 (2026-02-04)
4
25
 
5
26
  Full Changelog: [v0.0.2...v0.0.3](https://github.com/sentdm/sent-dm-ruby/compare/v0.0.2...v0.0.3)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "sentdm", "~> 0.0.3"
20
+ gem "sentdm", "~> 0.2.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
data/lib/sentdm/client.rb CHANGED
@@ -15,29 +15,28 @@ module Sentdm
15
15
  # Default max retry delay in seconds.
16
16
  DEFAULT_MAX_RETRY_DELAY = 8.0
17
17
 
18
- # Customer API key for authentication
18
+ # Customer API key for authentication. Use `sk_live_*` keys for production and
19
+ # `sk_test_*` keys for sandbox/testing. Pass via the `x-api-key` header.
19
20
  # @return [String]
20
21
  attr_reader :api_key
21
22
 
22
- # Customer sender ID (GUID) identifying the customer account
23
+ # Customer sender ID (UUID) identifying the customer account. Obtain this from
24
+ # your account settings. Pass via the `x-sender-id` header.
23
25
  # @return [String]
24
26
  attr_reader :sender_id
25
27
 
26
- # @return [Sentdm::Resources::Templates]
27
- attr_reader :templates
28
-
29
28
  # @return [Sentdm::Resources::Contacts]
30
29
  attr_reader :contacts
31
30
 
32
31
  # @return [Sentdm::Resources::Messages]
33
32
  attr_reader :messages
34
33
 
34
+ # @return [Sentdm::Resources::Templates]
35
+ attr_reader :templates
36
+
35
37
  # @return [Sentdm::Resources::NumberLookup]
36
38
  attr_reader :number_lookup
37
39
 
38
- # @return [Sentdm::Resources::Organizations]
39
- attr_reader :organizations
40
-
41
40
  # @api private
42
41
  #
43
42
  # @return [Hash{String=>String}]
@@ -61,9 +60,12 @@ module Sentdm
61
60
 
62
61
  # Creates and returns a new client for interacting with the API.
63
62
  #
64
- # @param api_key [String, nil] Customer API key for authentication Defaults to `ENV["SENT_DM_API_KEY"]`
63
+ # @param api_key [String, nil] Customer API key for authentication. Use `sk_live_*` keys for production and
64
+ # `sk_test_*` keys for sandbox/testing. Pass via the `x-api-key` header. Defaults
65
+ # to `ENV["SENT_DM_API_KEY"]`
65
66
  #
66
- # @param sender_id [String, nil] Customer sender ID (GUID) identifying the customer account Defaults to
67
+ # @param sender_id [String, nil] Customer sender ID (UUID) identifying the customer account. Obtain this from
68
+ # your account settings. Pass via the `x-sender-id` header. Defaults to
67
69
  # `ENV["SENT_DM_SENDER_ID"]`
68
70
  #
69
71
  # @param base_url [String, nil] Override the default base URL for the API, e.g.,
@@ -105,11 +107,10 @@ module Sentdm
105
107
  max_retry_delay: max_retry_delay
106
108
  )
107
109
 
108
- @templates = Sentdm::Resources::Templates.new(client: self)
109
110
  @contacts = Sentdm::Resources::Contacts.new(client: self)
110
111
  @messages = Sentdm::Resources::Messages.new(client: self)
112
+ @templates = Sentdm::Resources::Templates.new(client: self)
111
113
  @number_lookup = Sentdm::Resources::NumberLookup.new(client: self)
112
- @organizations = Sentdm::Resources::Organizations.new(client: self)
113
114
  end
114
115
  end
115
116
  end
@@ -438,11 +438,11 @@ module Sentdm
438
438
  # @return [Hash{Symbol=>Object}]
439
439
  #
440
440
  # @example
441
- # # `template_body_content` is a `Sentdm::TemplateBodyContent`
442
- # template_body_content => {
443
- # template: template,
444
- # type: type,
445
- # variables: variables
441
+ # # `contact_list_item` is a `Sentdm::ContactListItem`
442
+ # contact_list_item => {
443
+ # id: id,
444
+ # available_channels: available_channels,
445
+ # country_code: country_code
446
446
  # }
447
447
  def deconstruct_keys(keys)
448
448
  (keys || self.class.known_fields.keys)
@@ -485,7 +485,7 @@ module Sentdm
485
485
  end
486
486
 
487
487
  # @type [Regexp]
488
- JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}
488
+ JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
489
489
  # @type [Regexp]
490
490
  JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491
491
 
@@ -6,8 +6,8 @@ module Sentdm
6
6
  class TemplateListResponse < Sentdm::Internal::Type::BaseModel
7
7
  # @!attribute items
8
8
  #
9
- # @return [Array<Sentdm::Models::TemplateResponse>, nil]
10
- optional :items, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateResponse] }
9
+ # @return [Array<Sentdm::Models::TemplateResponseV2>, nil]
10
+ optional :items, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateResponseV2] }
11
11
 
12
12
  # @!attribute page
13
13
  #
@@ -30,7 +30,7 @@ module Sentdm
30
30
  optional :total_pages, Integer, api_name: :totalPages
31
31
 
32
32
  # @!method initialize(items: nil, page: nil, page_size: nil, total_count: nil, total_pages: nil)
33
- # @param items [Array<Sentdm::Models::TemplateResponse>]
33
+ # @param items [Array<Sentdm::Models::TemplateResponseV2>]
34
34
  # @param page [Integer]
35
35
  # @param page_size [Integer]
36
36
  # @param total_count [Integer]
@@ -3,7 +3,7 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  # @see Sentdm::Resources::Templates#create
6
- class TemplateResponse < Sentdm::Internal::Type::BaseModel
6
+ class TemplateResponseV2 < Sentdm::Internal::Type::BaseModel
7
7
  # @!attribute id
8
8
  # The unique identifier of the template
9
9
  #
data/lib/sentdm/models.rb CHANGED
@@ -57,14 +57,6 @@ module Sentdm
57
57
 
58
58
  NumberLookupRetrieveParams = Sentdm::Models::NumberLookupRetrieveParams
59
59
 
60
- OrganizationListParams = Sentdm::Models::OrganizationListParams
61
-
62
- OrganizationRetrieveProfilesParams = Sentdm::Models::OrganizationRetrieveProfilesParams
63
-
64
- Organizations = Sentdm::Models::Organizations
65
-
66
- ProfileSummary = Sentdm::Models::ProfileSummary
67
-
68
60
  TemplateBodyContent = Sentdm::Models::TemplateBodyContent
69
61
 
70
62
  TemplateCreateParams = Sentdm::Models::TemplateCreateParams
@@ -75,7 +67,7 @@ module Sentdm
75
67
 
76
68
  TemplateListParams = Sentdm::Models::TemplateListParams
77
69
 
78
- TemplateResponse = Sentdm::Models::TemplateResponse
70
+ TemplateResponseV2 = Sentdm::Models::TemplateResponseV2
79
71
 
80
72
  TemplateRetrieveParams = Sentdm::Models::TemplateRetrieveParams
81
73
 
@@ -24,7 +24,7 @@ module Sentdm
24
24
  #
25
25
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
26
26
  #
27
- # @return [Sentdm::Models::TemplateResponse]
27
+ # @return [Sentdm::Models::TemplateResponseV2]
28
28
  #
29
29
  # @see Sentdm::Models::TemplateCreateParams
30
30
  def create(params)
@@ -33,7 +33,7 @@ module Sentdm
33
33
  method: :post,
34
34
  path: "v2/templates",
35
35
  body: parsed,
36
- model: Sentdm::TemplateResponse,
36
+ model: Sentdm::TemplateResponseV2,
37
37
  options: options
38
38
  )
39
39
  end
@@ -48,14 +48,14 @@ module Sentdm
48
48
  # @param id [String]
49
49
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
50
50
  #
51
- # @return [Sentdm::Models::TemplateResponse]
51
+ # @return [Sentdm::Models::TemplateResponseV2]
52
52
  #
53
53
  # @see Sentdm::Models::TemplateRetrieveParams
54
54
  def retrieve(id, params = {})
55
55
  @client.request(
56
56
  method: :get,
57
57
  path: ["v2/templates/%1$s", id],
58
- model: Sentdm::TemplateResponse,
58
+ model: Sentdm::TemplateResponseV2,
59
59
  options: params[:request_options]
60
60
  )
61
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentdm
4
- VERSION = "0.0.3"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/sentdm.rb CHANGED
@@ -64,31 +64,17 @@ require_relative "sentdm/models/message_send_to_contact_params"
64
64
  require_relative "sentdm/models/message_send_to_phone_params"
65
65
  require_relative "sentdm/models/number_lookup_retrieve_params"
66
66
  require_relative "sentdm/models/number_lookup_retrieve_response"
67
- require_relative "sentdm/models/organization_list_params"
68
- require_relative "sentdm/models/organization_list_response"
69
- require_relative "sentdm/models/organization_retrieve_profiles_params"
70
- require_relative "sentdm/models/organization_retrieve_profiles_response"
71
- require_relative "sentdm/models/organizations/customer_user"
72
- require_relative "sentdm/models/organizations/user_delete_params"
73
- require_relative "sentdm/models/organizations/user_invite_params"
74
- require_relative "sentdm/models/organizations/user_list_params"
75
- require_relative "sentdm/models/organizations/user_list_response"
76
- require_relative "sentdm/models/organizations/user_retrieve_params"
77
- require_relative "sentdm/models/organizations/user_update_role_params"
78
- require_relative "sentdm/models/profile_summary"
79
67
  require_relative "sentdm/models/template_body_content"
80
68
  require_relative "sentdm/models/template_create_params"
81
69
  require_relative "sentdm/models/template_definition"
82
70
  require_relative "sentdm/models/template_delete_params"
83
71
  require_relative "sentdm/models/template_list_params"
84
72
  require_relative "sentdm/models/template_list_response"
85
- require_relative "sentdm/models/template_response"
73
+ require_relative "sentdm/models/template_response_v2"
86
74
  require_relative "sentdm/models/template_retrieve_params"
87
75
  require_relative "sentdm/models/template_variable"
88
76
  require_relative "sentdm/models"
89
77
  require_relative "sentdm/resources/contacts"
90
78
  require_relative "sentdm/resources/messages"
91
79
  require_relative "sentdm/resources/number_lookup"
92
- require_relative "sentdm/resources/organizations"
93
- require_relative "sentdm/resources/organizations/users"
94
80
  require_relative "sentdm/resources/templates"
@@ -10,29 +10,28 @@ module Sentdm
10
10
 
11
11
  DEFAULT_MAX_RETRY_DELAY = T.let(8.0, Float)
12
12
 
13
- # Customer API key for authentication
13
+ # Customer API key for authentication. Use `sk_live_*` keys for production and
14
+ # `sk_test_*` keys for sandbox/testing. Pass via the `x-api-key` header.
14
15
  sig { returns(String) }
15
16
  attr_reader :api_key
16
17
 
17
- # Customer sender ID (GUID) identifying the customer account
18
+ # Customer sender ID (UUID) identifying the customer account. Obtain this from
19
+ # your account settings. Pass via the `x-sender-id` header.
18
20
  sig { returns(String) }
19
21
  attr_reader :sender_id
20
22
 
21
- sig { returns(Sentdm::Resources::Templates) }
22
- attr_reader :templates
23
-
24
23
  sig { returns(Sentdm::Resources::Contacts) }
25
24
  attr_reader :contacts
26
25
 
27
26
  sig { returns(Sentdm::Resources::Messages) }
28
27
  attr_reader :messages
29
28
 
29
+ sig { returns(Sentdm::Resources::Templates) }
30
+ attr_reader :templates
31
+
30
32
  sig { returns(Sentdm::Resources::NumberLookup) }
31
33
  attr_reader :number_lookup
32
34
 
33
- sig { returns(Sentdm::Resources::Organizations) }
34
- attr_reader :organizations
35
-
36
35
  # @api private
37
36
  sig { override.returns(T::Hash[String, String]) }
38
37
  private def auth_headers
@@ -61,9 +60,12 @@ module Sentdm
61
60
  ).returns(T.attached_class)
62
61
  end
63
62
  def self.new(
64
- # Customer API key for authentication Defaults to `ENV["SENT_DM_API_KEY"]`
63
+ # Customer API key for authentication. Use `sk_live_*` keys for production and
64
+ # `sk_test_*` keys for sandbox/testing. Pass via the `x-api-key` header. Defaults
65
+ # to `ENV["SENT_DM_API_KEY"]`
65
66
  api_key: ENV["SENT_DM_API_KEY"],
66
- # Customer sender ID (GUID) identifying the customer account Defaults to
67
+ # Customer sender ID (UUID) identifying the customer account. Obtain this from
68
+ # your account settings. Pass via the `x-sender-id` header. Defaults to
67
69
  # `ENV["SENT_DM_SENDER_ID"]`
68
70
  sender_id: ENV["SENT_DM_SENDER_ID"],
69
71
  # Override the default base URL for the API, e.g.,
@@ -296,7 +296,7 @@ module Sentdm
296
296
  end
297
297
 
298
298
  JSON_CONTENT =
299
- T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp)
299
+ T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
300
300
  JSONL_CONTENT =
301
301
  T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
302
302
 
@@ -8,10 +8,10 @@ module Sentdm
8
8
  T.any(Sentdm::Models::TemplateListResponse, Sentdm::Internal::AnyHash)
9
9
  end
10
10
 
11
- sig { returns(T.nilable(T::Array[Sentdm::TemplateResponse])) }
11
+ sig { returns(T.nilable(T::Array[Sentdm::TemplateResponseV2])) }
12
12
  attr_reader :items
13
13
 
14
- sig { params(items: T::Array[Sentdm::TemplateResponse::OrHash]).void }
14
+ sig { params(items: T::Array[Sentdm::TemplateResponseV2::OrHash]).void }
15
15
  attr_writer :items
16
16
 
17
17
  sig { returns(T.nilable(Integer)) }
@@ -40,7 +40,7 @@ module Sentdm
40
40
 
41
41
  sig do
42
42
  params(
43
- items: T::Array[Sentdm::TemplateResponse::OrHash],
43
+ items: T::Array[Sentdm::TemplateResponseV2::OrHash],
44
44
  page: Integer,
45
45
  page_size: Integer,
46
46
  total_count: Integer,
@@ -59,7 +59,7 @@ module Sentdm
59
59
  sig do
60
60
  override.returns(
61
61
  {
62
- items: T::Array[Sentdm::TemplateResponse],
62
+ items: T::Array[Sentdm::TemplateResponseV2],
63
63
  page: Integer,
64
64
  page_size: Integer,
65
65
  total_count: Integer,
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- class TemplateResponse < Sentdm::Internal::Type::BaseModel
5
+ class TemplateResponseV2 < Sentdm::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
- T.any(Sentdm::TemplateResponse, Sentdm::Internal::AnyHash)
8
+ T.any(Sentdm::TemplateResponseV2, Sentdm::Internal::AnyHash)
9
9
  end
10
10
 
11
11
  # The unique identifier of the template
@@ -19,15 +19,6 @@ module Sentdm
19
19
 
20
20
  NumberLookupRetrieveParams = Sentdm::Models::NumberLookupRetrieveParams
21
21
 
22
- OrganizationListParams = Sentdm::Models::OrganizationListParams
23
-
24
- OrganizationRetrieveProfilesParams =
25
- Sentdm::Models::OrganizationRetrieveProfilesParams
26
-
27
- Organizations = Sentdm::Models::Organizations
28
-
29
- ProfileSummary = Sentdm::Models::ProfileSummary
30
-
31
22
  TemplateBodyContent = Sentdm::Models::TemplateBodyContent
32
23
 
33
24
  TemplateCreateParams = Sentdm::Models::TemplateCreateParams
@@ -38,7 +29,7 @@ module Sentdm
38
29
 
39
30
  TemplateListParams = Sentdm::Models::TemplateListParams
40
31
 
41
- TemplateResponse = Sentdm::Models::TemplateResponse
32
+ TemplateResponseV2 = Sentdm::Models::TemplateResponseV2
42
33
 
43
34
  TemplateRetrieveParams = Sentdm::Models::TemplateRetrieveParams
44
35
 
@@ -15,7 +15,7 @@ module Sentdm
15
15
  language: T.nilable(String),
16
16
  submit_for_review: T::Boolean,
17
17
  request_options: Sentdm::RequestOptions::OrHash
18
- ).returns(Sentdm::TemplateResponse)
18
+ ).returns(Sentdm::TemplateResponseV2)
19
19
  end
20
20
  def create(
21
21
  # Template definition containing header, body, footer, and buttons
@@ -42,7 +42,7 @@ module Sentdm
42
42
  params(
43
43
  id: String,
44
44
  request_options: Sentdm::RequestOptions::OrHash
45
- ).returns(Sentdm::TemplateResponse)
45
+ ).returns(Sentdm::TemplateResponseV2)
46
46
  end
47
47
  def retrieve(id, request_options: {})
48
48
  end
@@ -12,15 +12,13 @@ module Sentdm
12
12
 
13
13
  attr_reader sender_id: String
14
14
 
15
- attr_reader templates: Sentdm::Resources::Templates
16
-
17
15
  attr_reader contacts: Sentdm::Resources::Contacts
18
16
 
19
17
  attr_reader messages: Sentdm::Resources::Messages
20
18
 
21
- attr_reader number_lookup: Sentdm::Resources::NumberLookup
19
+ attr_reader templates: Sentdm::Resources::Templates
22
20
 
23
- attr_reader organizations: Sentdm::Resources::Organizations
21
+ attr_reader number_lookup: Sentdm::Resources::NumberLookup
24
22
 
25
23
  private def auth_headers: -> ::Hash[String, String]
26
24
 
@@ -2,7 +2,7 @@ module Sentdm
2
2
  module Models
3
3
  type template_list_response =
4
4
  {
5
- items: ::Array[Sentdm::TemplateResponse],
5
+ items: ::Array[Sentdm::TemplateResponseV2],
6
6
  page: Integer,
7
7
  page_size: Integer,
8
8
  total_count: Integer,
@@ -10,11 +10,11 @@ module Sentdm
10
10
  }
11
11
 
12
12
  class TemplateListResponse < Sentdm::Internal::Type::BaseModel
13
- attr_reader items: ::Array[Sentdm::TemplateResponse]?
13
+ attr_reader items: ::Array[Sentdm::TemplateResponseV2]?
14
14
 
15
15
  def items=: (
16
- ::Array[Sentdm::TemplateResponse]
17
- ) -> ::Array[Sentdm::TemplateResponse]
16
+ ::Array[Sentdm::TemplateResponseV2]
17
+ ) -> ::Array[Sentdm::TemplateResponseV2]
18
18
 
19
19
  attr_reader page: Integer?
20
20
 
@@ -33,7 +33,7 @@ module Sentdm
33
33
  def total_pages=: (Integer) -> Integer
34
34
 
35
35
  def initialize: (
36
- ?items: ::Array[Sentdm::TemplateResponse],
36
+ ?items: ::Array[Sentdm::TemplateResponseV2],
37
37
  ?page: Integer,
38
38
  ?page_size: Integer,
39
39
  ?total_count: Integer,
@@ -41,7 +41,7 @@ module Sentdm
41
41
  ) -> void
42
42
 
43
43
  def to_hash: -> {
44
- items: ::Array[Sentdm::TemplateResponse],
44
+ items: ::Array[Sentdm::TemplateResponseV2],
45
45
  page: Integer,
46
46
  page_size: Integer,
47
47
  total_count: Integer,
@@ -1,6 +1,6 @@
1
1
  module Sentdm
2
2
  module Models
3
- type template_response =
3
+ type template_response_v2 =
4
4
  {
5
5
  id: String,
6
6
  category: String,
@@ -15,7 +15,7 @@ module Sentdm
15
15
  whatsapp_template_name: String
16
16
  }
17
17
 
18
- class TemplateResponse < Sentdm::Internal::Type::BaseModel
18
+ class TemplateResponseV2 < Sentdm::Internal::Type::BaseModel
19
19
  attr_reader id: String?
20
20
 
21
21
  def id=: (String) -> String
@@ -17,14 +17,6 @@ module Sentdm
17
17
 
18
18
  class NumberLookupRetrieveParams = Sentdm::Models::NumberLookupRetrieveParams
19
19
 
20
- class OrganizationListParams = Sentdm::Models::OrganizationListParams
21
-
22
- class OrganizationRetrieveProfilesParams = Sentdm::Models::OrganizationRetrieveProfilesParams
23
-
24
- module Organizations = Sentdm::Models::Organizations
25
-
26
- class ProfileSummary = Sentdm::Models::ProfileSummary
27
-
28
20
  class TemplateBodyContent = Sentdm::Models::TemplateBodyContent
29
21
 
30
22
  class TemplateCreateParams = Sentdm::Models::TemplateCreateParams
@@ -35,7 +27,7 @@ module Sentdm
35
27
 
36
28
  class TemplateListParams = Sentdm::Models::TemplateListParams
37
29
 
38
- class TemplateResponse = Sentdm::Models::TemplateResponse
30
+ class TemplateResponseV2 = Sentdm::Models::TemplateResponseV2
39
31
 
40
32
  class TemplateRetrieveParams = Sentdm::Models::TemplateRetrieveParams
41
33
 
@@ -7,12 +7,12 @@ module Sentdm
7
7
  ?language: String?,
8
8
  ?submit_for_review: bool,
9
9
  ?request_options: Sentdm::request_opts
10
- ) -> Sentdm::TemplateResponse
10
+ ) -> Sentdm::TemplateResponseV2
11
11
 
12
12
  def retrieve: (
13
13
  String id,
14
14
  ?request_options: Sentdm::request_opts
15
- ) -> Sentdm::TemplateResponse
15
+ ) -> Sentdm::TemplateResponseV2
16
16
 
17
17
  def list: (
18
18
  page: Integer,