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