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