surge_api 0.1.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 (212) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +28 -0
  4. data/README.md +286 -0
  5. data/SECURITY.md +27 -0
  6. data/lib/surge_api/client.rb +106 -0
  7. data/lib/surge_api/errors.rb +228 -0
  8. data/lib/surge_api/file_part.rb +55 -0
  9. data/lib/surge_api/internal/transport/base_client.rb +567 -0
  10. data/lib/surge_api/internal/transport/pooled_net_requester.rb +201 -0
  11. data/lib/surge_api/internal/type/array_of.rb +168 -0
  12. data/lib/surge_api/internal/type/base_model.rb +531 -0
  13. data/lib/surge_api/internal/type/base_page.rb +55 -0
  14. data/lib/surge_api/internal/type/boolean.rb +77 -0
  15. data/lib/surge_api/internal/type/converter.rb +327 -0
  16. data/lib/surge_api/internal/type/enum.rb +131 -0
  17. data/lib/surge_api/internal/type/file_input.rb +108 -0
  18. data/lib/surge_api/internal/type/hash_of.rb +188 -0
  19. data/lib/surge_api/internal/type/request_parameters.rb +42 -0
  20. data/lib/surge_api/internal/type/union.rb +250 -0
  21. data/lib/surge_api/internal/type/unknown.rb +81 -0
  22. data/lib/surge_api/internal/util.rb +915 -0
  23. data/lib/surge_api/internal.rb +20 -0
  24. data/lib/surge_api/models/account.rb +60 -0
  25. data/lib/surge_api/models/account_create_params.rb +481 -0
  26. data/lib/surge_api/models/account_retrieve_status_params.rb +32 -0
  27. data/lib/surge_api/models/account_status.rb +104 -0
  28. data/lib/surge_api/models/account_update_params.rb +480 -0
  29. data/lib/surge_api/models/blast.rb +61 -0
  30. data/lib/surge_api/models/blast_create_params.rb +90 -0
  31. data/lib/surge_api/models/call_ended_webhook_event.rb +106 -0
  32. data/lib/surge_api/models/campaign.rb +208 -0
  33. data/lib/surge_api/models/campaign_approved_webhook_event.rb +74 -0
  34. data/lib/surge_api/models/campaign_create_params.rb +202 -0
  35. data/lib/surge_api/models/contact.rb +59 -0
  36. data/lib/surge_api/models/contact_create_params.rb +54 -0
  37. data/lib/surge_api/models/contact_retrieve_params.rb +14 -0
  38. data/lib/surge_api/models/contact_update_params.rb +54 -0
  39. data/lib/surge_api/models/conversation_created_webhook_event.rb +70 -0
  40. data/lib/surge_api/models/error.rb +34 -0
  41. data/lib/surge_api/models/message.rb +146 -0
  42. data/lib/surge_api/models/message_create_params.rb +153 -0
  43. data/lib/surge_api/models/message_delivered_webhook_event.rb +159 -0
  44. data/lib/surge_api/models/message_failed_webhook_event.rb +167 -0
  45. data/lib/surge_api/models/message_received_webhook_event.rb +159 -0
  46. data/lib/surge_api/models/message_sent_webhook_event.rb +159 -0
  47. data/lib/surge_api/models/organization.rb +419 -0
  48. data/lib/surge_api/models/phone_number.rb +48 -0
  49. data/lib/surge_api/models/phone_number_purchase_params.rb +65 -0
  50. data/lib/surge_api/models/unwrap_webhook_event.rb +26 -0
  51. data/lib/surge_api/models/user.rb +51 -0
  52. data/lib/surge_api/models/user_create_params.rb +46 -0
  53. data/lib/surge_api/models/user_create_token_params.rb +22 -0
  54. data/lib/surge_api/models/user_retrieve_params.rb +14 -0
  55. data/lib/surge_api/models/user_token_response.rb +19 -0
  56. data/lib/surge_api/models/user_update_params.rb +46 -0
  57. data/lib/surge_api/models/verification.rb +58 -0
  58. data/lib/surge_api/models/verification_check.rb +43 -0
  59. data/lib/surge_api/models/verification_check_params.rb +22 -0
  60. data/lib/surge_api/models/verification_create_params.rb +22 -0
  61. data/lib/surge_api/models/webhook_unwrap_params.rb +14 -0
  62. data/lib/surge_api/models.rb +117 -0
  63. data/lib/surge_api/request_options.rb +77 -0
  64. data/lib/surge_api/resources/accounts.rb +102 -0
  65. data/lib/surge_api/resources/blasts.rb +53 -0
  66. data/lib/surge_api/resources/campaigns.rb +57 -0
  67. data/lib/surge_api/resources/contacts.rb +99 -0
  68. data/lib/surge_api/resources/messages.rb +75 -0
  69. data/lib/surge_api/resources/phone_numbers.rb +48 -0
  70. data/lib/surge_api/resources/users.rb +119 -0
  71. data/lib/surge_api/resources/verifications.rb +60 -0
  72. data/lib/surge_api/resources/webhooks.rb +22 -0
  73. data/lib/surge_api/version.rb +5 -0
  74. data/lib/surge_api.rb +100 -0
  75. data/manifest.yaml +15 -0
  76. data/rbi/surge_api/client.rbi +73 -0
  77. data/rbi/surge_api/errors.rbi +205 -0
  78. data/rbi/surge_api/file_part.rbi +37 -0
  79. data/rbi/surge_api/internal/transport/base_client.rbi +292 -0
  80. data/rbi/surge_api/internal/transport/pooled_net_requester.rbi +79 -0
  81. data/rbi/surge_api/internal/type/array_of.rbi +104 -0
  82. data/rbi/surge_api/internal/type/base_model.rbi +302 -0
  83. data/rbi/surge_api/internal/type/base_page.rbi +42 -0
  84. data/rbi/surge_api/internal/type/boolean.rbi +58 -0
  85. data/rbi/surge_api/internal/type/converter.rbi +216 -0
  86. data/rbi/surge_api/internal/type/enum.rbi +82 -0
  87. data/rbi/surge_api/internal/type/file_input.rbi +59 -0
  88. data/rbi/surge_api/internal/type/hash_of.rbi +104 -0
  89. data/rbi/surge_api/internal/type/request_parameters.rbi +29 -0
  90. data/rbi/surge_api/internal/type/union.rbi +128 -0
  91. data/rbi/surge_api/internal/type/unknown.rbi +58 -0
  92. data/rbi/surge_api/internal/util.rbi +487 -0
  93. data/rbi/surge_api/internal.rbi +16 -0
  94. data/rbi/surge_api/models/account.rbi +83 -0
  95. data/rbi/surge_api/models/account_create_params.rbi +1104 -0
  96. data/rbi/surge_api/models/account_retrieve_status_params.rbi +96 -0
  97. data/rbi/surge_api/models/account_status.rbi +185 -0
  98. data/rbi/surge_api/models/account_update_params.rbi +1105 -0
  99. data/rbi/surge_api/models/blast.rbi +108 -0
  100. data/rbi/surge_api/models/blast_create_params.rbi +145 -0
  101. data/rbi/surge_api/models/call_ended_webhook_event.rbi +205 -0
  102. data/rbi/surge_api/models/campaign.rbi +331 -0
  103. data/rbi/surge_api/models/campaign_approved_webhook_event.rbi +149 -0
  104. data/rbi/surge_api/models/campaign_create_params.rbi +386 -0
  105. data/rbi/surge_api/models/contact.rbi +88 -0
  106. data/rbi/surge_api/models/contact_create_params.rbi +87 -0
  107. data/rbi/surge_api/models/contact_retrieve_params.rbi +27 -0
  108. data/rbi/surge_api/models/contact_update_params.rbi +87 -0
  109. data/rbi/surge_api/models/conversation_created_webhook_event.rbi +129 -0
  110. data/rbi/surge_api/models/error.rbi +51 -0
  111. data/rbi/surge_api/models/message.rbi +283 -0
  112. data/rbi/surge_api/models/message_create_params.rbi +281 -0
  113. data/rbi/surge_api/models/message_delivered_webhook_event.rbi +331 -0
  114. data/rbi/surge_api/models/message_failed_webhook_event.rbi +335 -0
  115. data/rbi/surge_api/models/message_received_webhook_event.rbi +331 -0
  116. data/rbi/surge_api/models/message_sent_webhook_event.rbi +322 -0
  117. data/rbi/surge_api/models/organization.rbi +649 -0
  118. data/rbi/surge_api/models/phone_number.rbi +72 -0
  119. data/rbi/surge_api/models/phone_number_purchase_params.rbi +122 -0
  120. data/rbi/surge_api/models/unwrap_webhook_event.rbi +26 -0
  121. data/rbi/surge_api/models/user.rbi +80 -0
  122. data/rbi/surge_api/models/user_create_params.rbi +76 -0
  123. data/rbi/surge_api/models/user_create_token_params.rbi +46 -0
  124. data/rbi/surge_api/models/user_retrieve_params.rbi +27 -0
  125. data/rbi/surge_api/models/user_token_response.rbi +31 -0
  126. data/rbi/surge_api/models/user_update_params.rbi +76 -0
  127. data/rbi/surge_api/models/verification.rbi +86 -0
  128. data/rbi/surge_api/models/verification_check.rbi +84 -0
  129. data/rbi/surge_api/models/verification_check_params.rbi +40 -0
  130. data/rbi/surge_api/models/verification_create_params.rbi +40 -0
  131. data/rbi/surge_api/models/webhook_unwrap_params.rbi +27 -0
  132. data/rbi/surge_api/models.rbi +80 -0
  133. data/rbi/surge_api/request_options.rbi +59 -0
  134. data/rbi/surge_api/resources/accounts.rbi +94 -0
  135. data/rbi/surge_api/resources/blasts.rbi +48 -0
  136. data/rbi/surge_api/resources/campaigns.rbi +115 -0
  137. data/rbi/surge_api/resources/contacts.rbi +85 -0
  138. data/rbi/surge_api/resources/messages.rbi +72 -0
  139. data/rbi/surge_api/resources/phone_numbers.rbi +43 -0
  140. data/rbi/surge_api/resources/users.rbi +96 -0
  141. data/rbi/surge_api/resources/verifications.rbi +43 -0
  142. data/rbi/surge_api/resources/webhooks.rbi +31 -0
  143. data/rbi/surge_api/version.rbi +5 -0
  144. data/sig/surge_api/client.rbs +42 -0
  145. data/sig/surge_api/errors.rbs +117 -0
  146. data/sig/surge_api/file_part.rbs +21 -0
  147. data/sig/surge_api/internal/transport/base_client.rbs +131 -0
  148. data/sig/surge_api/internal/transport/pooled_net_requester.rbs +45 -0
  149. data/sig/surge_api/internal/type/array_of.rbs +48 -0
  150. data/sig/surge_api/internal/type/base_model.rbs +102 -0
  151. data/sig/surge_api/internal/type/base_page.rbs +24 -0
  152. data/sig/surge_api/internal/type/boolean.rbs +26 -0
  153. data/sig/surge_api/internal/type/converter.rbs +79 -0
  154. data/sig/surge_api/internal/type/enum.rbs +32 -0
  155. data/sig/surge_api/internal/type/file_input.rbs +25 -0
  156. data/sig/surge_api/internal/type/hash_of.rbs +48 -0
  157. data/sig/surge_api/internal/type/request_parameters.rbs +17 -0
  158. data/sig/surge_api/internal/type/union.rbs +52 -0
  159. data/sig/surge_api/internal/type/unknown.rbs +26 -0
  160. data/sig/surge_api/internal/util.rbs +185 -0
  161. data/sig/surge_api/internal.rbs +9 -0
  162. data/sig/surge_api/models/account.rbs +40 -0
  163. data/sig/surge_api/models/account_create_params.rbs +433 -0
  164. data/sig/surge_api/models/account_retrieve_status_params.rbs +40 -0
  165. data/sig/surge_api/models/account_status.rbs +71 -0
  166. data/sig/surge_api/models/account_update_params.rbs +435 -0
  167. data/sig/surge_api/models/blast.rbs +64 -0
  168. data/sig/surge_api/models/blast_create_params.rbs +82 -0
  169. data/sig/surge_api/models/call_ended_webhook_event.rbs +99 -0
  170. data/sig/surge_api/models/campaign.rbs +122 -0
  171. data/sig/surge_api/models/campaign_approved_webhook_event.rbs +67 -0
  172. data/sig/surge_api/models/campaign_create_params.rbs +127 -0
  173. data/sig/surge_api/models/contact.rbs +53 -0
  174. data/sig/surge_api/models/contact_create_params.rbs +54 -0
  175. data/sig/surge_api/models/contact_retrieve_params.rbs +15 -0
  176. data/sig/surge_api/models/contact_update_params.rbs +54 -0
  177. data/sig/surge_api/models/conversation_created_webhook_event.rbs +62 -0
  178. data/sig/surge_api/models/error.rbs +27 -0
  179. data/sig/surge_api/models/message.rbs +138 -0
  180. data/sig/surge_api/models/message_create_params.rbs +140 -0
  181. data/sig/surge_api/models/message_delivered_webhook_event.rbs +143 -0
  182. data/sig/surge_api/models/message_failed_webhook_event.rbs +148 -0
  183. data/sig/surge_api/models/message_received_webhook_event.rbs +143 -0
  184. data/sig/surge_api/models/message_sent_webhook_event.rbs +143 -0
  185. data/sig/surge_api/models/organization.rbs +385 -0
  186. data/sig/surge_api/models/phone_number.rbs +37 -0
  187. data/sig/surge_api/models/phone_number_purchase_params.rbs +62 -0
  188. data/sig/surge_api/models/unwrap_webhook_event.rbs +18 -0
  189. data/sig/surge_api/models/user.rbs +48 -0
  190. data/sig/surge_api/models/user_create_params.rbs +47 -0
  191. data/sig/surge_api/models/user_create_token_params.rbs +26 -0
  192. data/sig/surge_api/models/user_retrieve_params.rbs +15 -0
  193. data/sig/surge_api/models/user_token_response.rbs +15 -0
  194. data/sig/surge_api/models/user_update_params.rbs +47 -0
  195. data/sig/surge_api/models/verification.rbs +48 -0
  196. data/sig/surge_api/models/verification_check.rbs +45 -0
  197. data/sig/surge_api/models/verification_check_params.rbs +23 -0
  198. data/sig/surge_api/models/verification_create_params.rbs +23 -0
  199. data/sig/surge_api/models/webhook_unwrap_params.rbs +15 -0
  200. data/sig/surge_api/models.rbs +77 -0
  201. data/sig/surge_api/request_options.rbs +34 -0
  202. data/sig/surge_api/resources/accounts.rbs +30 -0
  203. data/sig/surge_api/resources/blasts.rbs +19 -0
  204. data/sig/surge_api/resources/campaigns.rbs +21 -0
  205. data/sig/surge_api/resources/contacts.rbs +32 -0
  206. data/sig/surge_api/resources/messages.rbs +18 -0
  207. data/sig/surge_api/resources/phone_numbers.rbs +16 -0
  208. data/sig/surge_api/resources/users.rbs +36 -0
  209. data/sig/surge_api/resources/verifications.rbs +18 -0
  210. data/sig/surge_api/resources/webhooks.rbs +17 -0
  211. data/sig/surge_api/version.rbs +3 -0
  212. metadata +269 -0
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SurgeAPI
4
+ module Internal
5
+ extend SurgeAPI::Internal::Util::SorbetRuntimeSupport
6
+
7
+ OMIT =
8
+ Object.new.tap do
9
+ _1.define_singleton_method(:inspect) { "#<#{SurgeAPI::Internal}::OMIT>" }
10
+ end
11
+ .freeze
12
+
13
+ define_sorbet_constant!(:AnyHash) do
14
+ T.type_alias { T::Hash[Symbol, T.anything] }
15
+ end
16
+ define_sorbet_constant!(:FileInput) do
17
+ T.type_alias { T.any(Pathname, StringIO, IO, String, SurgeAPI::FilePart) }
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ # @see SurgeAPI::Resources::Accounts#create
6
+ class Account < SurgeAPI::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The account ID
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute brand_name
14
+ # The name by which the people this account communicates with know it. If not
15
+ # provided, this will match the name field.
16
+ #
17
+ # @return [String, nil]
18
+ required :brand_name, String, nil?: true
19
+
20
+ # @!attribute name
21
+ # The name of the account that will be visible for your internal organizational
22
+ # purposes. This will also be the default public-facing brand name unless you also
23
+ # set a `brand_name`, but otherwise the account name will never be displayed
24
+ # anywhere outside of Surge HQ, and may include your ID for the account or
25
+ # anything else that may help you.
26
+ #
27
+ # @return [String]
28
+ required :name, String
29
+
30
+ # @!attribute organization
31
+ # The legal entity on whose behalf the account will be operated.
32
+ #
33
+ # @return [SurgeAPI::Models::Organization]
34
+ required :organization, -> { SurgeAPI::Organization }
35
+
36
+ # @!attribute time_zone
37
+ # This is the time zone in which the account is headquartered. This time zone may
38
+ # be used for compliance with TCPA restrictions on when messages may be sent.
39
+ #
40
+ # @return [String, nil]
41
+ required :time_zone, String, nil?: true
42
+
43
+ # @!method initialize(id:, brand_name:, name:, organization:, time_zone:)
44
+ # Some parameter documentations has been truncated, see
45
+ # {SurgeAPI::Models::Account} for more details.
46
+ #
47
+ # Response containing account information.
48
+ #
49
+ # @param id [String] The account ID
50
+ #
51
+ # @param brand_name [String, nil] The name by which the people this account communicates with know it. If not prov
52
+ #
53
+ # @param name [String] The name of the account that will be visible for your internal organizational pu
54
+ #
55
+ # @param organization [SurgeAPI::Models::Organization] The legal entity on whose behalf the account will be operated.
56
+ #
57
+ # @param time_zone [String, nil] This is the time zone in which the account is headquartered. This time zone may
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,481 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ # @see SurgeAPI::Resources::Accounts#create
6
+ class AccountCreateParams < SurgeAPI::Internal::Type::BaseModel
7
+ extend SurgeAPI::Internal::Type::RequestParameters::Converter
8
+ include SurgeAPI::Internal::Type::RequestParameters
9
+
10
+ # @!attribute name
11
+ # The name of the account that will be visible for your internal organizational
12
+ # purposes. This will also be the default public-facing brand name unless you also
13
+ # set a `brand_name`, but otherwise the account name will never be displayed
14
+ # anywhere outside of Surge HQ, and may include your ID for the account or
15
+ # anything else that may help you.
16
+ #
17
+ # @return [String]
18
+ required :name, String
19
+
20
+ # @!attribute brand_name
21
+ # The name by which the people this account communicates with know it. If not
22
+ # provided, this will match the name field.
23
+ #
24
+ # @return [String, nil]
25
+ optional :brand_name, String, nil?: true
26
+
27
+ # @!attribute organization
28
+ # Parameters describing the legal entity on whose behalf the account will be
29
+ # operated.
30
+ #
31
+ # @return [SurgeAPI::Models::AccountCreateParams::Organization, nil]
32
+ optional :organization, -> { SurgeAPI::AccountCreateParams::Organization }
33
+
34
+ # @!attribute time_zone
35
+ # This is the time zone in which the account is headquartered. This time zone may
36
+ # be used for compliance with TCPA restrictions on when messages may be sent.
37
+ #
38
+ # @return [String, nil]
39
+ optional :time_zone, String
40
+
41
+ # @!method initialize(name:, brand_name: nil, organization: nil, time_zone: nil, request_options: {})
42
+ # Some parameter documentations has been truncated, see
43
+ # {SurgeAPI::Models::AccountCreateParams} for more details.
44
+ #
45
+ # @param name [String] The name of the account that will be visible for your internal organizational pu
46
+ #
47
+ # @param brand_name [String, nil] The name by which the people this account communicates with know it. If not prov
48
+ #
49
+ # @param organization [SurgeAPI::Models::AccountCreateParams::Organization] Parameters describing the legal entity on whose behalf the account will be opera
50
+ #
51
+ # @param time_zone [String] This is the time zone in which the account is headquartered. This time zone may
52
+ #
53
+ # @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}]
54
+
55
+ class Organization < SurgeAPI::Internal::Type::BaseModel
56
+ # @!attribute address
57
+ # The address of the organization's headquarters.
58
+ #
59
+ # @return [SurgeAPI::Models::AccountCreateParams::Organization::Address, nil]
60
+ optional :address, -> { SurgeAPI::AccountCreateParams::Organization::Address }
61
+
62
+ # @!attribute contact
63
+ # An object representing an individual who can be contacted if the carriers have
64
+ # any questions about the business.
65
+ #
66
+ # @return [SurgeAPI::Models::AccountCreateParams::Organization::Contact, nil]
67
+ optional :contact, -> { SurgeAPI::AccountCreateParams::Organization::Contact }, nil?: true
68
+
69
+ # @!attribute country
70
+ # The two character ISO 3166 country code for the country in which the
71
+ # organization is headquartered.
72
+ #
73
+ # @return [String, nil]
74
+ optional :country, String, nil?: true
75
+
76
+ # @!attribute email
77
+ # For publicly traded companies, an email for a representative of the company to
78
+ # whom a verification email will be sent. This must be an email on the same domain
79
+ # as the company's website (e.g. with a website domain of
80
+ # `https://dtprecisionauto.com`, the email must use the same
81
+ # `@dtprecisionauto.com`)
82
+ #
83
+ # @return [String, nil]
84
+ optional :email, String, nil?: true
85
+
86
+ # @!attribute identifier
87
+ # The value of the identifier whose type is specified in the identifier_type
88
+ # field. Typically this will be an EIN, and can be formatted with or without the
89
+ # hyphen.
90
+ #
91
+ # @return [String, nil]
92
+ optional :identifier, String, nil?: true
93
+
94
+ # @!attribute identifier_type
95
+ # The type of identifier being provided for the organization. Support for more
96
+ # values will be added in the future.
97
+ #
98
+ # @return [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::IdentifierType, nil]
99
+ optional :identifier_type,
100
+ enum: -> { SurgeAPI::AccountCreateParams::Organization::IdentifierType },
101
+ nil?: true
102
+
103
+ # @!attribute industry
104
+ # The industry in which the organization operates.
105
+ #
106
+ # @return [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::Industry, nil]
107
+ optional :industry, enum: -> { SurgeAPI::AccountCreateParams::Organization::Industry }, nil?: true
108
+
109
+ # @!attribute mobile_number
110
+ # For sole proprietors, this must be a valid US mobile phone number to which a
111
+ # verification text message will be sent. (E.164 format)
112
+ #
113
+ # @return [String, nil]
114
+ optional :mobile_number, String, nil?: true
115
+
116
+ # @!attribute regions_of_operation
117
+ # An array of regions in which the organization operates.
118
+ #
119
+ # @return [Array<Symbol, SurgeAPI::Models::AccountCreateParams::Organization::RegionsOfOperation>, nil]
120
+ optional :regions_of_operation,
121
+ -> {
122
+ SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::AccountCreateParams::Organization::RegionsOfOperation]
123
+ },
124
+ nil?: true
125
+
126
+ # @!attribute registered_name
127
+ # The legal name of the organization as registered with the IRS or other relevant
128
+ # authorities. For some applications, this will be matched against government
129
+ # records and should include all punctuation and everything else as well.
130
+ #
131
+ # @return [String, nil]
132
+ optional :registered_name, String, nil?: true
133
+
134
+ # @!attribute stock_exchange
135
+ # For publicly traded companies, this is the exchange on which the company's stock
136
+ # is traded.
137
+ #
138
+ # @return [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::StockExchange, nil]
139
+ optional :stock_exchange,
140
+ enum: -> { SurgeAPI::AccountCreateParams::Organization::StockExchange },
141
+ nil?: true
142
+
143
+ # @!attribute stock_symbol
144
+ # For publicly traded companies, the ticker symbol for the company's stock
145
+ #
146
+ # @return [String, nil]
147
+ optional :stock_symbol, String, nil?: true
148
+
149
+ # @!attribute type
150
+ # The type of organization
151
+ #
152
+ # @return [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::Type, nil]
153
+ optional :type, enum: -> { SurgeAPI::AccountCreateParams::Organization::Type }, nil?: true
154
+
155
+ # @!attribute website
156
+ # The URL of the website for this organization. The website should be publicly
157
+ # available, clearly reflect the organization's purpose, and the URL should start
158
+ # with `https://`
159
+ #
160
+ # @return [String, nil]
161
+ optional :website, String, nil?: true
162
+
163
+ # @!method initialize(address: nil, contact: nil, country: nil, email: nil, identifier: nil, identifier_type: nil, industry: nil, mobile_number: nil, regions_of_operation: nil, registered_name: nil, stock_exchange: nil, stock_symbol: nil, type: nil, website: nil)
164
+ # Some parameter documentations has been truncated, see
165
+ # {SurgeAPI::Models::AccountCreateParams::Organization} for more details.
166
+ #
167
+ # Parameters describing the legal entity on whose behalf the account will be
168
+ # operated.
169
+ #
170
+ # @param address [SurgeAPI::Models::AccountCreateParams::Organization::Address] The address of the organization's headquarters.
171
+ #
172
+ # @param contact [SurgeAPI::Models::AccountCreateParams::Organization::Contact, nil] An object representing an individual who can be contacted if the carriers have a
173
+ #
174
+ # @param country [String, nil] The two character ISO 3166 country code for the country in which the organizatio
175
+ #
176
+ # @param email [String, nil] For publicly traded companies, an email for a representative of the company to w
177
+ #
178
+ # @param identifier [String, nil] The value of the identifier whose type is specified in the identifier_type field
179
+ #
180
+ # @param identifier_type [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Support for more val
181
+ #
182
+ # @param industry [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::Industry, nil] The industry in which the organization operates.
183
+ #
184
+ # @param mobile_number [String, nil] For sole proprietors, this must be a valid US mobile phone number to which a ver
185
+ #
186
+ # @param regions_of_operation [Array<Symbol, SurgeAPI::Models::AccountCreateParams::Organization::RegionsOfOperation>, nil] An array of regions in which the organization operates.
187
+ #
188
+ # @param registered_name [String, nil] The legal name of the organization as registered with the IRS or other relevant
189
+ #
190
+ # @param stock_exchange [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::StockExchange, nil] For publicly traded companies, this is the exchange on which the company's stock
191
+ #
192
+ # @param stock_symbol [String, nil] For publicly traded companies, the ticker symbol for the company's stock
193
+ #
194
+ # @param type [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::Type, nil] The type of organization
195
+ #
196
+ # @param website [String, nil] The URL of the website for this organization. The website should be publicly ava
197
+
198
+ # @see SurgeAPI::Models::AccountCreateParams::Organization#address
199
+ class Address < SurgeAPI::Internal::Type::BaseModel
200
+ # @!attribute country
201
+ # The two character ISO 3166 country code. If none is provided, the organization's
202
+ # country code will be used.
203
+ #
204
+ # @return [String, nil]
205
+ optional :country, String, nil?: true
206
+
207
+ # @!attribute line1
208
+ # The first line of the address, typically the number and street name
209
+ #
210
+ # @return [String, nil]
211
+ optional :line1, String, nil?: true
212
+
213
+ # @!attribute line2
214
+ # The second line of the address if needed, typically an apartment or suite number
215
+ #
216
+ # @return [String, nil]
217
+ optional :line2, String, nil?: true
218
+
219
+ # @!attribute locality
220
+ # The city or locality
221
+ #
222
+ # @return [String, nil]
223
+ optional :locality, String, nil?: true
224
+
225
+ # @!attribute name
226
+ # The name to which any mail should be addressed. If none is provided, this will
227
+ # default to the organization's registered_name
228
+ #
229
+ # @return [String, nil]
230
+ optional :name, String, nil?: true
231
+
232
+ # @!attribute postal_code
233
+ # The postal code
234
+ #
235
+ # @return [String, nil]
236
+ optional :postal_code, String, nil?: true
237
+
238
+ # @!attribute region
239
+ # The state or region
240
+ #
241
+ # @return [String, nil]
242
+ optional :region, String, nil?: true
243
+
244
+ # @!method initialize(country: nil, line1: nil, line2: nil, locality: nil, name: nil, postal_code: nil, region: nil)
245
+ # Some parameter documentations has been truncated, see
246
+ # {SurgeAPI::Models::AccountCreateParams::Organization::Address} for more details.
247
+ #
248
+ # The address of the organization's headquarters.
249
+ #
250
+ # @param country [String, nil] The two character ISO 3166 country code. If none is provided, the organization's
251
+ #
252
+ # @param line1 [String, nil] The first line of the address, typically the number and street name
253
+ #
254
+ # @param line2 [String, nil] The second line of the address if needed, typically an apartment or suite number
255
+ #
256
+ # @param locality [String, nil] The city or locality
257
+ #
258
+ # @param name [String, nil] The name to which any mail should be addressed. If none is provided, this will d
259
+ #
260
+ # @param postal_code [String, nil] The postal code
261
+ #
262
+ # @param region [String, nil] The state or region
263
+ end
264
+
265
+ # @see SurgeAPI::Models::AccountCreateParams::Organization#contact
266
+ class Contact < SurgeAPI::Internal::Type::BaseModel
267
+ # @!attribute email
268
+ # An email address at which the individual can be reached. Typically an email
269
+ # using the same domain name as the website URL will be preferred (e.g. with a
270
+ # website domain of `https://dtprecisionauto.com`, an email like
271
+ # `dom@dtprecisionauto.com` will be preferred over one like
272
+ # `dom@anothergarage.com` or `dom.toretto@gmail.com`)
273
+ #
274
+ # @return [String, nil]
275
+ optional :email, String, nil?: true
276
+
277
+ # @!attribute first_name
278
+ # The first name (or given name) of the individual
279
+ #
280
+ # @return [String, nil]
281
+ optional :first_name, String, nil?: true
282
+
283
+ # @!attribute last_name
284
+ # The last name (or family name) of the individual
285
+ #
286
+ # @return [String, nil]
287
+ optional :last_name, String, nil?: true
288
+
289
+ # @!attribute phone_number
290
+ # A phone number at which the individual can be reached (E.164 format)
291
+ #
292
+ # @return [String, nil]
293
+ optional :phone_number, String, nil?: true
294
+
295
+ # @!attribute title
296
+ # The job title of the individual.
297
+ #
298
+ # @return [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::Contact::Title, nil]
299
+ optional :title,
300
+ enum: -> {
301
+ SurgeAPI::AccountCreateParams::Organization::Contact::Title
302
+ },
303
+ nil?: true
304
+
305
+ # @!attribute title_other
306
+ # If `other` is provided for the `title` field, this field should be used to
307
+ # provide the title of the individual
308
+ #
309
+ # @return [String, nil]
310
+ optional :title_other, String, nil?: true
311
+
312
+ # @!method initialize(email: nil, first_name: nil, last_name: nil, phone_number: nil, title: nil, title_other: nil)
313
+ # Some parameter documentations has been truncated, see
314
+ # {SurgeAPI::Models::AccountCreateParams::Organization::Contact} for more details.
315
+ #
316
+ # An object representing an individual who can be contacted if the carriers have
317
+ # any questions about the business.
318
+ #
319
+ # @param email [String, nil] An email address at which the individual can be reached. Typically an email usin
320
+ #
321
+ # @param first_name [String, nil] The first name (or given name) of the individual
322
+ #
323
+ # @param last_name [String, nil] The last name (or family name) of the individual
324
+ #
325
+ # @param phone_number [String, nil] A phone number at which the individual can be reached (E.164 format)
326
+ #
327
+ # @param title [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::Contact::Title, nil] The job title of the individual.
328
+ #
329
+ # @param title_other [String, nil] If `other` is provided for the `title` field, this field should be used to provi
330
+
331
+ # The job title of the individual.
332
+ #
333
+ # @see SurgeAPI::Models::AccountCreateParams::Organization::Contact#title
334
+ module Title
335
+ extend SurgeAPI::Internal::Type::Enum
336
+
337
+ CEO = :ceo
338
+ CFO = :cfo
339
+ DIRECTOR = :director
340
+ GM = :gm
341
+ VP = :vp
342
+ GENERAL_COUNSEL = :general_counsel
343
+ OTHER = :other
344
+
345
+ # @!method self.values
346
+ # @return [Array<Symbol>]
347
+ end
348
+ end
349
+
350
+ # The type of identifier being provided for the organization. Support for more
351
+ # values will be added in the future.
352
+ #
353
+ # @see SurgeAPI::Models::AccountCreateParams::Organization#identifier_type
354
+ module IdentifierType
355
+ extend SurgeAPI::Internal::Type::Enum
356
+
357
+ EIN = :ein
358
+
359
+ # @!method self.values
360
+ # @return [Array<Symbol>]
361
+ end
362
+
363
+ # The industry in which the organization operates.
364
+ #
365
+ # @see SurgeAPI::Models::AccountCreateParams::Organization#industry
366
+ module Industry
367
+ extend SurgeAPI::Internal::Type::Enum
368
+
369
+ AGRICULTURE = :agriculture
370
+ AUTOMOTIVE = :automotive
371
+ BANKING = :banking
372
+ CONSTRUCTION = :construction
373
+ CONSUMER = :consumer
374
+ EDUCATION = :education
375
+ ELECTRONICS = :electronics
376
+ ENERGY = :energy
377
+ ENGINEERING = :engineering
378
+ FAST_MOVING_CONSUMER_GOODS = :fast_moving_consumer_goods
379
+ FINANCIAL = :financial
380
+ FINTECH = :fintech
381
+ FOOD_AND_BEVERAGE = :food_and_beverage
382
+ GOVERNMENT = :government
383
+ HEALTHCARE = :healthcare
384
+ HOSPITALITY = :hospitality
385
+ INSURANCE = :insurance
386
+ JEWELRY = :jewelry
387
+ LEGAL = :legal
388
+ MANUFACTURING = :manufacturing
389
+ MEDIA = :media
390
+ NOT_FOR_PROFIT = :not_for_profit
391
+ OIL_AND_GAS = :oil_and_gas
392
+ ONLINE = :online
393
+ PROFESSIONAL_SERVICES = :professional_services
394
+ RAW_MATERIALS = :raw_materials
395
+ REAL_ESTATE = :real_estate
396
+ RELIGION = :religion
397
+ RETAIL = :retail
398
+ TECHNOLOGY = :technology
399
+ TELECOMMUNICATIONS = :telecommunications
400
+ TRANSPORTATION = :transportation
401
+ TRAVEL = :travel
402
+
403
+ # @!method self.values
404
+ # @return [Array<Symbol>]
405
+ end
406
+
407
+ module RegionsOfOperation
408
+ extend SurgeAPI::Internal::Type::Enum
409
+
410
+ AFRICA = :africa
411
+ ASIA = :asia
412
+ AUSTRALIA = :australia
413
+ EUROPE = :europe
414
+ LATIN_AMERICA = :latin_america
415
+ USA_AND_CANADA = :usa_and_canada
416
+
417
+ # @!method self.values
418
+ # @return [Array<Symbol>]
419
+ end
420
+
421
+ # For publicly traded companies, this is the exchange on which the company's stock
422
+ # is traded.
423
+ #
424
+ # @see SurgeAPI::Models::AccountCreateParams::Organization#stock_exchange
425
+ module StockExchange
426
+ extend SurgeAPI::Internal::Type::Enum
427
+
428
+ AMEX = :amex
429
+ AMX = :amx
430
+ ASX = :asx
431
+ B3 = :b3
432
+ BME = :bme
433
+ BSE = :bse
434
+ FRA = :fra
435
+ ICEX = :icex
436
+ JPX = :jpx
437
+ JSE = :jse
438
+ KRX = :krx
439
+ LON = :lon
440
+ NASDAQ = :nasdaq
441
+ NONE = :none
442
+ NYSE = :nyse
443
+ NSE = :nse
444
+ OMX = :omx
445
+ OTHER = :other
446
+ SEHK = :sehk
447
+ SGX = :sgx
448
+ SSE = :sse
449
+ STO = :sto
450
+ SWX = :swx
451
+ SZSE = :szse
452
+ TSX = :tsx
453
+ TWSE = :twse
454
+ VSE = :vse
455
+
456
+ # @!method self.values
457
+ # @return [Array<Symbol>]
458
+ end
459
+
460
+ # The type of organization
461
+ #
462
+ # @see SurgeAPI::Models::AccountCreateParams::Organization#type
463
+ module Type
464
+ extend SurgeAPI::Internal::Type::Enum
465
+
466
+ CO_OP = :co_op
467
+ GOVERNMENT = :government
468
+ LLC = :llc
469
+ NON_PROFIT = :non_profit
470
+ PARTNERSHIP = :partnership
471
+ PRIVATE_CORPORATION = :private_corporation
472
+ PUBLIC_CORPORATION = :public_corporation
473
+ SOLE_PROPRIETOR = :sole_proprietor
474
+
475
+ # @!method self.values
476
+ # @return [Array<Symbol>]
477
+ end
478
+ end
479
+ end
480
+ end
481
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ # @see SurgeAPI::Resources::Accounts#retrieve_status
6
+ class AccountRetrieveStatusParams < SurgeAPI::Internal::Type::BaseModel
7
+ extend SurgeAPI::Internal::Type::RequestParameters::Converter
8
+ include SurgeAPI::Internal::Type::RequestParameters
9
+
10
+ # @!attribute capabilities
11
+ # capabilities about which to check the status
12
+ #
13
+ # @return [Array<Symbol, SurgeAPI::Models::AccountRetrieveStatusParams::Capability>, nil]
14
+ optional :capabilities,
15
+ -> { SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::AccountRetrieveStatusParams::Capability] }
16
+
17
+ # @!method initialize(capabilities: nil, request_options: {})
18
+ # @param capabilities [Array<Symbol, SurgeAPI::Models::AccountRetrieveStatusParams::Capability>] capabilities about which to check the status
19
+ #
20
+ # @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}]
21
+
22
+ module Capability
23
+ extend SurgeAPI::Internal::Type::Enum
24
+
25
+ LOCAL_MESSAGING = :local_messaging
26
+
27
+ # @!method self.values
28
+ # @return [Array<Symbol>]
29
+ end
30
+ end
31
+ end
32
+ end