Class: SurgeAPI::Models::AccountUpdateParams::Organization

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/surge_api/models/account_update_params.rb

Defined Under Namespace

Modules: IdentifierType, Industry, RegionsOfOperation, StockExchange, Type Classes: Address, Contact

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(country: nil, line1: nil, line2: nil, locality: nil, name: nil, postal_code: nil, region: nil) ⇒ Object

Some parameter documentations has been truncated, see Address for more details.

The address of the organization’s headquarters.

Parameters:

  • country (String, nil) (defaults to: nil)

    The two character ISO 3166 country code. If none is provided, the organization’s

  • line1 (String, nil) (defaults to: nil)

    The first line of the address, typically the number and street name

  • line2 (String, nil) (defaults to: nil)

    The second line of the address if needed, typically an apartment or suite number

  • locality (String, nil) (defaults to: nil)

    The city or locality

  • name (String, nil) (defaults to: nil)

    The name to which any mail should be addressed. If none is provided, this will d

  • postal_code (String, nil) (defaults to: nil)

    The postal code

  • region (String, nil) (defaults to: nil)

    The state or region



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# File 'lib/surge_api/models/account_update_params.rb', line 54

class Organization < SurgeAPI::Internal::Type::BaseModel
  # @!attribute address
  #   The address of the organization's headquarters.
  #
  #   @return [SurgeAPI::Models::AccountUpdateParams::Organization::Address, nil]
  optional :address, -> { SurgeAPI::AccountUpdateParams::Organization::Address }

  # @!attribute contact
  #   An object representing an individual who can be contacted if Surge or our
  #   carrier partners have any questions about the business. If you are registering
  #   on behalf of your customer, this must be a contact from your customer's company
  #   rather than your own. The individual will likely never be contacted unless there
  #   are issues with spam.
  #
  #   @return [SurgeAPI::Models::AccountUpdateParams::Organization::Contact, nil]
  optional :contact, -> { SurgeAPI::AccountUpdateParams::Organization::Contact }, nil?: true

  # @!attribute country
  #   The two character ISO 3166 country code for the country in which the
  #   organization is headquartered.
  #
  #   @return [String, nil]
  optional :country, String, nil?: true

  # @!attribute email
  #   For publicly traded companies, an email for a representative of the company to
  #   whom a verification email will be sent. This must be an email on the same domain
  #   as the company's website (e.g. with a website domain of
  #   `https://dtprecisionauto.com`, the email must use the same
  #   `@dtprecisionauto.com`)
  #
  #   @return [String, nil]
  optional :email, String, nil?: true

  # @!attribute identifier
  #   The value of the identifier whose type is specified in the identifier_type
  #   field. Typically this will be an EIN, and can be formatted with or without the
  #   hyphen.
  #
  #   @return [String, nil]
  optional :identifier, String, nil?: true

  # @!attribute identifier_type
  #   The type of identifier being provided for the organization. Support for more
  #   values will be added in the future.
  #
  #   @return [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::IdentifierType, nil]
  optional :identifier_type,
           enum: -> { SurgeAPI::AccountUpdateParams::Organization::IdentifierType },
           nil?: true

  # @!attribute industry
  #   The industry in which the organization operates.
  #
  #   @return [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::Industry, nil]
  optional :industry, enum: -> { SurgeAPI::AccountUpdateParams::Organization::Industry }, nil?: true

  # @!attribute mobile_number
  #   For sole proprietors, this must be a valid US mobile phone number to which a
  #   verification text message will be sent. (E.164 format)
  #
  #   @return [String, nil]
  optional :mobile_number, String, nil?: true

  # @!attribute regions_of_operation
  #   An array of regions in which the organization operates.
  #
  #   @return [Array<Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::RegionsOfOperation>, nil]
  optional :regions_of_operation,
           -> {
             SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::AccountUpdateParams::Organization::RegionsOfOperation]
           },
           nil?: true

  # @!attribute registered_name
  #   The legal name of the organization as registered with the IRS or other relevant
  #   authorities. For some applications, this will be matched against government
  #   records and should include all punctuation and everything else as well.
  #
  #   @return [String, nil]
  optional :registered_name, String, nil?: true

  # @!attribute stock_exchange
  #   For publicly traded companies, this is the exchange on which the company's stock
  #   is traded.
  #
  #   @return [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::StockExchange, nil]
  optional :stock_exchange,
           enum: -> { SurgeAPI::AccountUpdateParams::Organization::StockExchange },
           nil?: true

  # @!attribute stock_symbol
  #   For publicly traded companies, the ticker symbol for the company's stock
  #
  #   @return [String, nil]
  optional :stock_symbol, String, nil?: true

  # @!attribute type
  #   The type of organization
  #
  #   @return [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::Type, nil]
  optional :type, enum: -> { SurgeAPI::AccountUpdateParams::Organization::Type }, nil?: true

  # @!attribute website
  #   The URL of the website for this organization. The website should be publicly
  #   available, clearly reflect the organization's purpose, and the URL should start
  #   with `https://`
  #
  #   @return [String, nil]
  optional :website, String, nil?: true

  # @!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)
  #   Some parameter documentations has been truncated, see
  #   {SurgeAPI::Models::AccountUpdateParams::Organization} for more details.
  #
  #   Parameters describing the legal entity on whose behalf the account will be
  #   operated.
  #
  #   @param address [SurgeAPI::Models::AccountUpdateParams::Organization::Address] The address of the organization's headquarters.
  #
  #   @param contact [SurgeAPI::Models::AccountUpdateParams::Organization::Contact, nil] An object representing an individual who can be contacted if Surge or our carrie
  #
  #   @param country [String, nil] The two character ISO 3166 country code for the country in which the organizatio
  #
  #   @param email [String, nil] For publicly traded companies, an email for a representative of the company to w
  #
  #   @param identifier [String, nil] The value of the identifier whose type is specified in the identifier_type field
  #
  #   @param identifier_type [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Support for more val
  #
  #   @param industry [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::Industry, nil] The industry in which the organization operates.
  #
  #   @param mobile_number [String, nil] For sole proprietors, this must be a valid US mobile phone number to which a ver
  #
  #   @param regions_of_operation [Array<Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::RegionsOfOperation>, nil] An array of regions in which the organization operates.
  #
  #   @param registered_name [String, nil] The legal name of the organization as registered with the IRS or other relevant
  #
  #   @param stock_exchange [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::StockExchange, nil] For publicly traded companies, this is the exchange on which the company's stock
  #
  #   @param stock_symbol [String, nil] For publicly traded companies, the ticker symbol for the company's stock
  #
  #   @param type [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::Type, nil] The type of organization
  #
  #   @param website [String, nil] The URL of the website for this organization. The website should be publicly ava

  # @see SurgeAPI::Models::AccountUpdateParams::Organization#address
  class Address < SurgeAPI::Internal::Type::BaseModel
    # @!attribute country
    #   The two character ISO 3166 country code. If none is provided, the organization's
    #   country code will be used.
    #
    #   @return [String, nil]
    optional :country, String, nil?: true

    # @!attribute line1
    #   The first line of the address, typically the number and street name
    #
    #   @return [String, nil]
    optional :line1, String, nil?: true

    # @!attribute line2
    #   The second line of the address if needed, typically an apartment or suite number
    #
    #   @return [String, nil]
    optional :line2, String, nil?: true

    # @!attribute locality
    #   The city or locality
    #
    #   @return [String, nil]
    optional :locality, String, nil?: true

    # @!attribute name
    #   The name to which any mail should be addressed. If none is provided, this will
    #   default to the organization's registered_name
    #
    #   @return [String, nil]
    optional :name, String, nil?: true

    # @!attribute postal_code
    #   The postal code
    #
    #   @return [String, nil]
    optional :postal_code, String, nil?: true

    # @!attribute region
    #   The state or region
    #
    #   @return [String, nil]
    optional :region, String, nil?: true

    # @!method initialize(country: nil, line1: nil, line2: nil, locality: nil, name: nil, postal_code: nil, region: nil)
    #   Some parameter documentations has been truncated, see
    #   {SurgeAPI::Models::AccountUpdateParams::Organization::Address} for more details.
    #
    #   The address of the organization's headquarters.
    #
    #   @param country [String, nil] The two character ISO 3166 country code. If none is provided, the organization's
    #
    #   @param line1 [String, nil] The first line of the address, typically the number and street name
    #
    #   @param line2 [String, nil] The second line of the address if needed, typically an apartment or suite number
    #
    #   @param locality [String, nil] The city or locality
    #
    #   @param name [String, nil] The name to which any mail should be addressed. If none is provided, this will d
    #
    #   @param postal_code [String, nil] The postal code
    #
    #   @param region [String, nil] The state or region
  end

  # @see SurgeAPI::Models::AccountUpdateParams::Organization#contact
  class Contact < SurgeAPI::Internal::Type::BaseModel
    # @!attribute email
    #   An email address at which the individual can be reached. Typically an email
    #   using the same domain name as the website URL will be preferred (e.g. with a
    #   website domain of `https://dtprecisionauto.com`, an email like
    #   `dom@dtprecisionauto.com` will be preferred over one like
    #   `dom@anothergarage.com` or `dom.toretto@gmail.com`. `dtprecisionauto@gmail.com`
    #   would also be acceptable, but not preferred)
    #
    #   @return [String, nil]
    optional :email, String, nil?: true

    # @!attribute first_name
    #   The first name (or given name) of the individual
    #
    #   @return [String, nil]
    optional :first_name, String, nil?: true

    # @!attribute last_name
    #   The last name (or family name) of the individual
    #
    #   @return [String, nil]
    optional :last_name, String, nil?: true

    # @!attribute phone_number
    #   A phone number at which the individual can be reached (E.164 format)
    #
    #   @return [String, nil]
    optional :phone_number, String, nil?: true

    # @!attribute title
    #   The job title of the individual.
    #
    #   @return [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::Contact::Title, nil]
    optional :title,
             enum: -> {
               SurgeAPI::AccountUpdateParams::Organization::Contact::Title
             },
             nil?: true

    # @!attribute title_other
    #   If `other` is provided for the `title` field, this field should be used to
    #   provide the title of the individual
    #
    #   @return [String, nil]
    optional :title_other, String, nil?: true

    # @!method initialize(email: nil, first_name: nil, last_name: nil, phone_number: nil, title: nil, title_other: nil)
    #   Some parameter documentations has been truncated, see
    #   {SurgeAPI::Models::AccountUpdateParams::Organization::Contact} for more details.
    #
    #   An object representing an individual who can be contacted if Surge or our
    #   carrier partners have any questions about the business. If you are registering
    #   on behalf of your customer, this must be a contact from your customer's company
    #   rather than your own. The individual will likely never be contacted unless there
    #   are issues with spam.
    #
    #   @param email [String, nil] An email address at which the individual can be reached. Typically an email usin
    #
    #   @param first_name [String, nil] The first name (or given name) of the individual
    #
    #   @param last_name [String, nil] The last name (or family name) of the individual
    #
    #   @param phone_number [String, nil] A phone number at which the individual can be reached (E.164 format)
    #
    #   @param title [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::Contact::Title, nil] The job title of the individual.
    #
    #   @param title_other [String, nil] If `other` is provided for the `title` field, this field should be used to provi

    # The job title of the individual.
    #
    # @see SurgeAPI::Models::AccountUpdateParams::Organization::Contact#title
    module Title
      extend SurgeAPI::Internal::Type::Enum

      CEO = :ceo
      CFO = :cfo
      DIRECTOR = :director
      GM = :gm
      VP = :vp
      GENERAL_COUNSEL = :general_counsel
      OTHER = :other

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  # The type of identifier being provided for the organization. Support for more
  # values will be added in the future.
  #
  # @see SurgeAPI::Models::AccountUpdateParams::Organization#identifier_type
  module IdentifierType
    extend SurgeAPI::Internal::Type::Enum

    EIN = :ein

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The industry in which the organization operates.
  #
  # @see SurgeAPI::Models::AccountUpdateParams::Organization#industry
  module Industry
    extend SurgeAPI::Internal::Type::Enum

    AGRICULTURE = :agriculture
    AUTOMOTIVE = :automotive
    BANKING = :banking
    CONSTRUCTION = :construction
    CONSUMER = :consumer
    EDUCATION = :education
    ELECTRONICS = :electronics
    ENERGY = :energy
    ENGINEERING = :engineering
    FAST_MOVING_CONSUMER_GOODS = :fast_moving_consumer_goods
    FINANCIAL = :financial
    FINTECH = :fintech
    FOOD_AND_BEVERAGE = :food_and_beverage
    GOVERNMENT = :government
    HEALTHCARE = :healthcare
    HOSPITALITY = :hospitality
    INSURANCE = :insurance
    JEWELRY = :jewelry
    LEGAL = :legal
    MANUFACTURING = :manufacturing
    MEDIA = :media
    NOT_FOR_PROFIT = :not_for_profit
    OIL_AND_GAS = :oil_and_gas
    ONLINE = :online
    PROFESSIONAL_SERVICES = :professional_services
    RAW_MATERIALS = :raw_materials
    REAL_ESTATE = :real_estate
    RELIGION = :religion
    RETAIL = :retail
    TECHNOLOGY = :technology
    TELECOMMUNICATIONS = :telecommunications
    TRANSPORTATION = :transportation
    TRAVEL = :travel

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  module RegionsOfOperation
    extend SurgeAPI::Internal::Type::Enum

    AFRICA = :africa
    ASIA = :asia
    AUSTRALIA = :australia
    EUROPE = :europe
    LATIN_AMERICA = :latin_america
    USA_AND_CANADA = :usa_and_canada

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # For publicly traded companies, this is the exchange on which the company's stock
  # is traded.
  #
  # @see SurgeAPI::Models::AccountUpdateParams::Organization#stock_exchange
  module StockExchange
    extend SurgeAPI::Internal::Type::Enum

    AMEX = :amex
    AMX = :amx
    ASX = :asx
    B3 = :b3
    BME = :bme
    BSE = :bse
    FRA = :fra
    ICEX = :icex
    JPX = :jpx
    JSE = :jse
    KRX = :krx
    LON = :lon
    NASDAQ = :nasdaq
    NONE = :none
    NYSE = :nyse
    NSE = :nse
    OMX = :omx
    OTHER = :other
    SEHK = :sehk
    SGX = :sgx
    SSE = :sse
    STO = :sto
    SWX = :swx
    SZSE = :szse
    TSX = :tsx
    TWSE = :twse
    VSE = :vse

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The type of organization
  #
  # @see SurgeAPI::Models::AccountUpdateParams::Organization#type
  module Type
    extend SurgeAPI::Internal::Type::Enum

    CO_OP = :co_op
    GOVERNMENT = :government
    LLC = :llc
    NON_PROFIT = :non_profit
    PARTNERSHIP = :partnership
    PRIVATE_CORPORATION = :private_corporation
    PUBLIC_CORPORATION = :public_corporation
    SOLE_PROPRIETOR = :sole_proprietor

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#addressSurgeAPI::Models::AccountUpdateParams::Organization::Address?

The address of the organization’s headquarters.



59
# File 'lib/surge_api/models/account_update_params.rb', line 59

optional :address, -> { SurgeAPI::AccountUpdateParams::Organization::Address }

#contactSurgeAPI::Models::AccountUpdateParams::Organization::Contact?

An object representing an individual who can be contacted if Surge or our carrier partners have any questions about the business. If you are registering on behalf of your customer, this must be a contact from your customer’s company rather than your own. The individual will likely never be contacted unless there are issues with spam.



69
# File 'lib/surge_api/models/account_update_params.rb', line 69

optional :contact, -> { SurgeAPI::AccountUpdateParams::Organization::Contact }, nil?: true

#countryString?

The two character ISO 3166 country code for the country in which the organization is headquartered.

Returns:

  • (String, nil)


76
# File 'lib/surge_api/models/account_update_params.rb', line 76

optional :country, String, nil?: true

#emailString?

For publicly traded companies, an email for a representative of the company to whom a verification email will be sent. This must be an email on the same domain as the company’s website (e.g. with a website domain of ‘dtprecisionauto.com`, the email must use the same `@dtprecisionauto.com`)

Returns:

  • (String, nil)


86
# File 'lib/surge_api/models/account_update_params.rb', line 86

optional :email, String, nil?: true

#identifierString?

The value of the identifier whose type is specified in the identifier_type field. Typically this will be an EIN, and can be formatted with or without the hyphen.

Returns:

  • (String, nil)


94
# File 'lib/surge_api/models/account_update_params.rb', line 94

optional :identifier, String, nil?: true

#identifier_typeSymbol, ...

The type of identifier being provided for the organization. Support for more values will be added in the future.



101
102
103
# File 'lib/surge_api/models/account_update_params.rb', line 101

optional :identifier_type,
enum: -> { SurgeAPI::AccountUpdateParams::Organization::IdentifierType },
nil?: true

#industrySymbol, ...

The industry in which the organization operates.



109
# File 'lib/surge_api/models/account_update_params.rb', line 109

optional :industry, enum: -> { SurgeAPI::AccountUpdateParams::Organization::Industry }, nil?: true

#mobile_numberString?

For sole proprietors, this must be a valid US mobile phone number to which a verification text message will be sent. (E.164 format)

Returns:

  • (String, nil)


116
# File 'lib/surge_api/models/account_update_params.rb', line 116

optional :mobile_number, String, nil?: true

#regions_of_operationArray<Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::RegionsOfOperation>?

An array of regions in which the organization operates.



122
123
124
125
126
# File 'lib/surge_api/models/account_update_params.rb', line 122

optional :regions_of_operation,
-> {
  SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::AccountUpdateParams::Organization::RegionsOfOperation]
},
nil?: true

#registered_nameString?

The legal name of the organization as registered with the IRS or other relevant authorities. For some applications, this will be matched against government records and should include all punctuation and everything else as well.

Returns:

  • (String, nil)


134
# File 'lib/surge_api/models/account_update_params.rb', line 134

optional :registered_name, String, nil?: true

#stock_exchangeSymbol, ...

For publicly traded companies, this is the exchange on which the company’s stock is traded.



141
142
143
# File 'lib/surge_api/models/account_update_params.rb', line 141

optional :stock_exchange,
enum: -> { SurgeAPI::AccountUpdateParams::Organization::StockExchange },
nil?: true

#stock_symbolString?

For publicly traded companies, the ticker symbol for the company’s stock

Returns:

  • (String, nil)


149
# File 'lib/surge_api/models/account_update_params.rb', line 149

optional :stock_symbol, String, nil?: true

#typeSymbol, ...

The type of organization



155
# File 'lib/surge_api/models/account_update_params.rb', line 155

optional :type, enum: -> { SurgeAPI::AccountUpdateParams::Organization::Type }, nil?: true

#websiteString?

The URL of the website for this organization. The website should be publicly available, clearly reflect the organization’s purpose, and the URL should start with ‘https://`

Returns:

  • (String, nil)


163
# File 'lib/surge_api/models/account_update_params.rb', line 163

optional :website, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/surge_api/models/account_update_params.rb', line 351