twilio-sdk 1.0.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 (42) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +155 -0
  4. data/bin/console +15 -0
  5. data/lib/twilio_accounts/api_helper.rb +10 -0
  6. data/lib/twilio_accounts/apis/accounts_v1_auth_token_promotion_api.rb +27 -0
  7. data/lib/twilio_accounts/apis/accounts_v1_aws_api.rb +137 -0
  8. data/lib/twilio_accounts/apis/accounts_v1_bulk_consents_api.rb +41 -0
  9. data/lib/twilio_accounts/apis/accounts_v1_bulk_contacts_api.rb +36 -0
  10. data/lib/twilio_accounts/apis/accounts_v1_messaging_geopermissions_api.rb +54 -0
  11. data/lib/twilio_accounts/apis/accounts_v1_public_key_api.rb +136 -0
  12. data/lib/twilio_accounts/apis/accounts_v1_safelist_api.rb +69 -0
  13. data/lib/twilio_accounts/apis/accounts_v1_secondary_auth_token_api.rb +39 -0
  14. data/lib/twilio_accounts/apis/base_api.rb +67 -0
  15. data/lib/twilio_accounts/client.rb +117 -0
  16. data/lib/twilio_accounts/configuration.rb +165 -0
  17. data/lib/twilio_accounts/exceptions/api_exception.rb +21 -0
  18. data/lib/twilio_accounts/http/api_response.rb +19 -0
  19. data/lib/twilio_accounts/http/auth/basic_auth.rb +62 -0
  20. data/lib/twilio_accounts/http/http_call_back.rb +10 -0
  21. data/lib/twilio_accounts/http/http_method_enum.rb +10 -0
  22. data/lib/twilio_accounts/http/http_request.rb +10 -0
  23. data/lib/twilio_accounts/http/http_response.rb +10 -0
  24. data/lib/twilio_accounts/http/proxy_settings.rb +22 -0
  25. data/lib/twilio_accounts/logging/configuration/api_logging_configuration.rb +186 -0
  26. data/lib/twilio_accounts/logging/sdk_logger.rb +17 -0
  27. data/lib/twilio_accounts/models/accounts_v1_auth_token_promotion.rb +142 -0
  28. data/lib/twilio_accounts/models/accounts_v1_bulk_consents.rb +83 -0
  29. data/lib/twilio_accounts/models/accounts_v1_bulk_contacts.rb +83 -0
  30. data/lib/twilio_accounts/models/accounts_v1_credential_credential_aws.rb +153 -0
  31. data/lib/twilio_accounts/models/accounts_v1_credential_credential_public_key.rb +153 -0
  32. data/lib/twilio_accounts/models/accounts_v1_messaging_geopermissions.rb +86 -0
  33. data/lib/twilio_accounts/models/accounts_v1_safelist.rb +88 -0
  34. data/lib/twilio_accounts/models/accounts_v1_secondary_auth_token.rb +145 -0
  35. data/lib/twilio_accounts/models/base_model.rb +110 -0
  36. data/lib/twilio_accounts/models/list_credential_aws_response.rb +94 -0
  37. data/lib/twilio_accounts/models/list_credential_public_key_response.rb +94 -0
  38. data/lib/twilio_accounts/models/meta.rb +140 -0
  39. data/lib/twilio_accounts/utilities/date_time_helper.rb +11 -0
  40. data/lib/twilio_accounts/utilities/file_wrapper.rb +28 -0
  41. data/lib/twilio_accounts.rb +64 -0
  42. metadata +125 -0
@@ -0,0 +1,94 @@
1
+ # twilio_accounts
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioAccounts
7
+ # ListCredentialPublicKeyResponse Model.
8
+ class ListCredentialPublicKeyResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[AccountsV1CredentialCredentialPublicKey]]
14
+ attr_accessor :credentials
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Meta]
18
+ attr_accessor :meta
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['credentials'] = 'credentials'
24
+ @_hash['meta'] = 'meta'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ credentials
32
+ meta
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(credentials: SKIP, meta: SKIP, additional_properties: nil)
42
+ # Add additional model properties to the instance
43
+ additional_properties = {} if additional_properties.nil?
44
+
45
+ @credentials = credentials unless credentials == SKIP
46
+ @meta = meta unless meta == SKIP
47
+ @additional_properties = additional_properties
48
+ end
49
+
50
+ # Creates an instance of the object from a hash.
51
+ def self.from_hash(hash)
52
+ return nil unless hash
53
+
54
+ # Extract variables from the hash.
55
+ # Parameter is an array, so we need to iterate through it
56
+ credentials = nil
57
+ unless hash['credentials'].nil?
58
+ credentials = []
59
+ hash['credentials'].each do |structure|
60
+ credentials << (AccountsV1CredentialCredentialPublicKey.from_hash(structure) if structure)
61
+ end
62
+ end
63
+
64
+ credentials = SKIP unless hash.key?('credentials')
65
+ meta = Meta.from_hash(hash['meta']) if hash['meta']
66
+
67
+ # Create a new hash for additional properties, removing known properties.
68
+ new_hash = hash.reject { |k, _| names.value?(k) }
69
+
70
+ additional_properties = APIHelper.get_additional_properties(
71
+ new_hash, proc { |value| value }
72
+ )
73
+
74
+ # Create object from extracted values.
75
+ ListCredentialPublicKeyResponse.new(credentials: credentials,
76
+ meta: meta,
77
+ additional_properties: additional_properties)
78
+ end
79
+
80
+ # Provides a human-readable string representation of the object.
81
+ def to_s
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} credentials: #{@credentials}, meta: #{@meta}, additional_properties:"\
84
+ " #{@additional_properties}>"
85
+ end
86
+
87
+ # Provides a debugging-friendly string with detailed object information.
88
+ def inspect
89
+ class_name = self.class.name.split('::').last
90
+ "<#{class_name} credentials: #{@credentials.inspect}, meta: #{@meta.inspect},"\
91
+ " additional_properties: #{@additional_properties}>"
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,140 @@
1
+ # twilio_accounts
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioAccounts
7
+ # Meta Model.
8
+ class Meta < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :first_page_url
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :key
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :next_page_url
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Integer]
26
+ attr_accessor :page
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Integer]
30
+ attr_accessor :page_size
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [String]
34
+ attr_accessor :previous_page_url
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [String]
38
+ attr_accessor :url
39
+
40
+ # A mapping from model property names to API property names.
41
+ def self.names
42
+ @_hash = {} if @_hash.nil?
43
+ @_hash['first_page_url'] = 'first_page_url'
44
+ @_hash['key'] = 'key'
45
+ @_hash['next_page_url'] = 'next_page_url'
46
+ @_hash['page'] = 'page'
47
+ @_hash['page_size'] = 'page_size'
48
+ @_hash['previous_page_url'] = 'previous_page_url'
49
+ @_hash['url'] = 'url'
50
+ @_hash
51
+ end
52
+
53
+ # An array for optional fields
54
+ def self.optionals
55
+ %w[
56
+ first_page_url
57
+ key
58
+ next_page_url
59
+ page
60
+ page_size
61
+ previous_page_url
62
+ url
63
+ ]
64
+ end
65
+
66
+ # An array for nullable fields
67
+ def self.nullables
68
+ %w[
69
+ next_page_url
70
+ previous_page_url
71
+ ]
72
+ end
73
+
74
+ def initialize(first_page_url: SKIP, key: SKIP, next_page_url: SKIP,
75
+ page: SKIP, page_size: SKIP, previous_page_url: SKIP,
76
+ url: SKIP, additional_properties: nil)
77
+ # Add additional model properties to the instance
78
+ additional_properties = {} if additional_properties.nil?
79
+
80
+ @first_page_url = first_page_url unless first_page_url == SKIP
81
+ @key = key unless key == SKIP
82
+ @next_page_url = next_page_url unless next_page_url == SKIP
83
+ @page = page unless page == SKIP
84
+ @page_size = page_size unless page_size == SKIP
85
+ @previous_page_url = previous_page_url unless previous_page_url == SKIP
86
+ @url = url unless url == SKIP
87
+ @additional_properties = additional_properties
88
+ end
89
+
90
+ # Creates an instance of the object from a hash.
91
+ def self.from_hash(hash)
92
+ return nil unless hash
93
+
94
+ # Extract variables from the hash.
95
+ first_page_url =
96
+ hash.key?('first_page_url') ? hash['first_page_url'] : SKIP
97
+ key = hash.key?('key') ? hash['key'] : SKIP
98
+ next_page_url = hash.key?('next_page_url') ? hash['next_page_url'] : SKIP
99
+ page = hash.key?('page') ? hash['page'] : SKIP
100
+ page_size = hash.key?('page_size') ? hash['page_size'] : SKIP
101
+ previous_page_url =
102
+ hash.key?('previous_page_url') ? hash['previous_page_url'] : SKIP
103
+ url = hash.key?('url') ? hash['url'] : SKIP
104
+
105
+ # Create a new hash for additional properties, removing known properties.
106
+ new_hash = hash.reject { |k, _| names.value?(k) }
107
+
108
+ additional_properties = APIHelper.get_additional_properties(
109
+ new_hash, proc { |value| value }
110
+ )
111
+
112
+ # Create object from extracted values.
113
+ Meta.new(first_page_url: first_page_url,
114
+ key: key,
115
+ next_page_url: next_page_url,
116
+ page: page,
117
+ page_size: page_size,
118
+ previous_page_url: previous_page_url,
119
+ url: url,
120
+ additional_properties: additional_properties)
121
+ end
122
+
123
+ # Provides a human-readable string representation of the object.
124
+ def to_s
125
+ class_name = self.class.name.split('::').last
126
+ "<#{class_name} first_page_url: #{@first_page_url}, key: #{@key}, next_page_url:"\
127
+ " #{@next_page_url}, page: #{@page}, page_size: #{@page_size}, previous_page_url:"\
128
+ " #{@previous_page_url}, url: #{@url}, additional_properties: #{@additional_properties}>"
129
+ end
130
+
131
+ # Provides a debugging-friendly string with detailed object information.
132
+ def inspect
133
+ class_name = self.class.name.split('::').last
134
+ "<#{class_name} first_page_url: #{@first_page_url.inspect}, key: #{@key.inspect},"\
135
+ " next_page_url: #{@next_page_url.inspect}, page: #{@page.inspect}, page_size:"\
136
+ " #{@page_size.inspect}, previous_page_url: #{@previous_page_url.inspect}, url:"\
137
+ " #{@url.inspect}, additional_properties: #{@additional_properties}>"
138
+ end
139
+ end
140
+ end
@@ -0,0 +1,11 @@
1
+ # twilio_accounts
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module TwilioAccounts
8
+ # A utility that supports dateTime conversion to different formats
9
+ class DateTimeHelper < CoreLibrary::DateTimeHelper
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ # twilio_accounts
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioAccounts
7
+ # A utility to allow users to set the content-type for files
8
+ class FileWrapper < CoreLibrary::FileWrapper
9
+ # The constructor.
10
+ # @param [File] file The file to be sent in the request.
11
+ # @param [string] content_type The content type of the provided file.
12
+ def initialize(file, content_type: 'application/octet-stream')
13
+ super
14
+ end
15
+
16
+ # Provides a human-readable string representation of the object.
17
+ def to_s
18
+ class_name = self.class.name.split('::').last
19
+ "<#{class_name} file: #{@file}, content_type: #{@content_type}>"
20
+ end
21
+
22
+ # Provides a debugging-friendly string with detailed object information.
23
+ def to_inspect
24
+ class_name = self.class.name.split('::').last
25
+ "<#{class_name} file: #{@file.inspect}, content_type: #{@content_type.inspect}>"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,64 @@
1
+ # twilio_accounts
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ require 'json'
8
+
9
+ require 'apimatic_core_interfaces'
10
+ require 'apimatic_core'
11
+ require 'apimatic_faraday_client_adapter'
12
+
13
+ require_relative 'twilio_accounts/api_helper'
14
+ require_relative 'twilio_accounts/client'
15
+
16
+ # Utilities
17
+ require_relative 'twilio_accounts/utilities/file_wrapper'
18
+ require_relative 'twilio_accounts/utilities/date_time_helper'
19
+
20
+ # Http
21
+ require_relative 'twilio_accounts/http/api_response'
22
+ require_relative 'twilio_accounts/http/http_call_back'
23
+ require_relative 'twilio_accounts/http/http_method_enum'
24
+ require_relative 'twilio_accounts/http/http_request'
25
+ require_relative 'twilio_accounts/http/http_response'
26
+ require_relative 'twilio_accounts/http/proxy_settings'
27
+
28
+
29
+ # Logger
30
+ require_relative 'twilio_accounts/logging/configuration/' \
31
+ 'api_logging_configuration'
32
+ require_relative 'twilio_accounts/logging/sdk_logger'
33
+ require_relative 'twilio_accounts/http/auth/basic_auth'
34
+
35
+ # Models
36
+ require_relative 'twilio_accounts/models/base_model'
37
+ require_relative 'twilio_accounts/models/accounts_v1_auth_token_promotion'
38
+ require_relative 'twilio_accounts/models/accounts_v1_bulk_consents'
39
+ require_relative 'twilio_accounts/models/accounts_v1_bulk_contacts'
40
+ require_relative 'twilio_accounts/models/accounts_v1_credential_credential_aws'
41
+ require_relative 'twilio_accounts/models/' \
42
+ 'accounts_v1_credential_credential_public_key'
43
+ require_relative 'twilio_accounts/models/accounts_v1_messaging_geopermissions'
44
+ require_relative 'twilio_accounts/models/accounts_v1_safelist'
45
+ require_relative 'twilio_accounts/models/accounts_v1_secondary_auth_token'
46
+ require_relative 'twilio_accounts/models/list_credential_aws_response'
47
+ require_relative 'twilio_accounts/models/list_credential_public_key_response'
48
+ require_relative 'twilio_accounts/models/meta'
49
+
50
+ # Exceptions
51
+ require_relative 'twilio_accounts/exceptions/api_exception'
52
+
53
+ require_relative 'twilio_accounts/configuration'
54
+
55
+ # Controllers
56
+ require_relative 'twilio_accounts/apis/base_api'
57
+ require_relative 'twilio_accounts/apis/accounts_v1_auth_token_promotion_api'
58
+ require_relative 'twilio_accounts/apis/accounts_v1_aws_api'
59
+ require_relative 'twilio_accounts/apis/accounts_v1_bulk_consents_api'
60
+ require_relative 'twilio_accounts/apis/accounts_v1_bulk_contacts_api'
61
+ require_relative 'twilio_accounts/apis/accounts_v1_messaging_geopermissions_api'
62
+ require_relative 'twilio_accounts/apis/accounts_v1_public_key_api'
63
+ require_relative 'twilio_accounts/apis/accounts_v1_safelist_api'
64
+ require_relative 'twilio_accounts/apis/accounts_v1_secondary_auth_token_api'
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: twilio-sdk
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Twilio Developers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-02-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: apimatic_core_interfaces
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.2.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.2.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: apimatic_core
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.20
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.20
41
+ - !ruby/object:Gem::Dependency
42
+ name: apimatic_faraday_client_adapter
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.1.6
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.1.6
55
+ description: Twilio API
56
+ email:
57
+ - sohail.shahbaz@apimatic.io
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - LICENSE
63
+ - README.md
64
+ - bin/console
65
+ - lib/twilio_accounts.rb
66
+ - lib/twilio_accounts/api_helper.rb
67
+ - lib/twilio_accounts/apis/accounts_v1_auth_token_promotion_api.rb
68
+ - lib/twilio_accounts/apis/accounts_v1_aws_api.rb
69
+ - lib/twilio_accounts/apis/accounts_v1_bulk_consents_api.rb
70
+ - lib/twilio_accounts/apis/accounts_v1_bulk_contacts_api.rb
71
+ - lib/twilio_accounts/apis/accounts_v1_messaging_geopermissions_api.rb
72
+ - lib/twilio_accounts/apis/accounts_v1_public_key_api.rb
73
+ - lib/twilio_accounts/apis/accounts_v1_safelist_api.rb
74
+ - lib/twilio_accounts/apis/accounts_v1_secondary_auth_token_api.rb
75
+ - lib/twilio_accounts/apis/base_api.rb
76
+ - lib/twilio_accounts/client.rb
77
+ - lib/twilio_accounts/configuration.rb
78
+ - lib/twilio_accounts/exceptions/api_exception.rb
79
+ - lib/twilio_accounts/http/api_response.rb
80
+ - lib/twilio_accounts/http/auth/basic_auth.rb
81
+ - lib/twilio_accounts/http/http_call_back.rb
82
+ - lib/twilio_accounts/http/http_method_enum.rb
83
+ - lib/twilio_accounts/http/http_request.rb
84
+ - lib/twilio_accounts/http/http_response.rb
85
+ - lib/twilio_accounts/http/proxy_settings.rb
86
+ - lib/twilio_accounts/logging/configuration/api_logging_configuration.rb
87
+ - lib/twilio_accounts/logging/sdk_logger.rb
88
+ - lib/twilio_accounts/models/accounts_v1_auth_token_promotion.rb
89
+ - lib/twilio_accounts/models/accounts_v1_bulk_consents.rb
90
+ - lib/twilio_accounts/models/accounts_v1_bulk_contacts.rb
91
+ - lib/twilio_accounts/models/accounts_v1_credential_credential_aws.rb
92
+ - lib/twilio_accounts/models/accounts_v1_credential_credential_public_key.rb
93
+ - lib/twilio_accounts/models/accounts_v1_messaging_geopermissions.rb
94
+ - lib/twilio_accounts/models/accounts_v1_safelist.rb
95
+ - lib/twilio_accounts/models/accounts_v1_secondary_auth_token.rb
96
+ - lib/twilio_accounts/models/base_model.rb
97
+ - lib/twilio_accounts/models/list_credential_aws_response.rb
98
+ - lib/twilio_accounts/models/list_credential_public_key_response.rb
99
+ - lib/twilio_accounts/models/meta.rb
100
+ - lib/twilio_accounts/utilities/date_time_helper.rb
101
+ - lib/twilio_accounts/utilities/file_wrapper.rb
102
+ homepage: https://www.twilio.com
103
+ licenses:
104
+ - MIT
105
+ metadata: {}
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '2.6'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubygems_version: 3.1.6
122
+ signing_key:
123
+ specification_version: 4
124
+ summary: SDK for using the twilio API
125
+ test_files: []