avalara_sdk 25.9.0 → 25.10.1

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +1 -0
  4. data/docs/A1099/V2/CompaniesW9Api.md +5 -5
  5. data/docs/A1099/V2/ErrorResponse.md +2 -2
  6. data/docs/A1099/V2/ErrorResponseItem.md +2 -2
  7. data/docs/A1099/V2/Forms1099Api.md +7 -7
  8. data/docs/A1099/V2/FormsW9Api.md +91 -8
  9. data/docs/A1099/V2/Issuers1099Api.md +5 -5
  10. data/docs/A1099/V2/JobsApi.md +1 -1
  11. data/docs/A1099/V2/W8BenEFormRequest.md +4 -4
  12. data/docs/A1099/V2/W8BenFormRequest.md +7 -7
  13. data/docs/A1099/V2/W8ImyFormRequest.md +2 -2
  14. data/docs/A1099/V2/W9FormRequest.md +2 -2
  15. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +1 -1
  16. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +1 -1
  17. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +138 -1
  18. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +1 -1
  19. data/lib/avalara_sdk/api/A1099/V2/jobs_api.rb +1 -1
  20. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
  21. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
  22. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  23. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
  24. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
  25. data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
  26. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
  27. data/lib/avalara_sdk/models/A1099/V2/error_response.rb +2 -0
  28. data/lib/avalara_sdk/models/A1099/V2/error_response_item.rb +2 -0
  29. data/lib/avalara_sdk/models/A1099/V2/w4_form_request.rb +24 -0
  30. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +100 -4
  31. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +91 -7
  32. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_request.rb +50 -2
  33. data/lib/avalara_sdk/models/A1099/V2/w9_form_request.rb +26 -2
  34. data/lib/avalara_sdk/version.rb +1 -1
  35. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  36. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  37. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  38. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  39. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  40. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  41. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  42. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  43. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  44. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  45. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  46. metadata +2 -2
@@ -17,7 +17,7 @@ module AvalaraSdk::A1099
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -571,6 +571,92 @@ module AvalaraSdk::A1099
571
571
  return data, response.code, response.headers
572
572
  end
573
573
 
574
+ # Download the PDF for a W9/W4/W8 form.
575
+ # Returns the PDF file for a W9/W4/W8 form.
576
+ # @param id [String] Id of the form # @param avalara_version [String] API version # @param x_correlation_id [String] Unique correlation Id in a GUID format # @param x_avalara_client [String] Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .
577
+ # @return [nil]
578
+ def get_w9_form_pdf(request_parameters)
579
+ get_w9_form_pdf_with_http_info(request_parameters)
580
+ nil
581
+ end
582
+
583
+ # Download the PDF for a W9/W4/W8 form.
584
+ # Returns the PDF file for a W9/W4/W8 form.
585
+
586
+ # @param id [String] Id of the form
587
+ # @param avalara_version [String] API version
588
+ # @param x_correlation_id [String] Unique correlation Id in a GUID format
589
+ # @param x_avalara_client [String] Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .
590
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
591
+ def get_w9_form_pdf_with_http_info(request_parameters)
592
+ # OAuth2 Scopes
593
+ required_scopes = ''
594
+ # Request Parameters
595
+ id = request_parameters.get_id()
596
+ avalara_version = request_parameters.get_avalara_version()
597
+ x_correlation_id = request_parameters.get_x_correlation_id()
598
+ x_avalara_client = request_parameters.get_x_avalara_client()
599
+ # verify the required parameter 'id' is set
600
+ if @api_client.config.client_side_validation && id.nil?
601
+ fail ArgumentError, "Missing the required parameter 'id' when calling FormsW9Api.get_w9_form_pdf"
602
+ end
603
+ # verify the required parameter 'avalara_version' is set
604
+ if @api_client.config.client_side_validation && avalara_version.nil?
605
+ fail ArgumentError, "Missing the required parameter 'avalara_version' when calling FormsW9Api.get_w9_form_pdf"
606
+ end
607
+ # resource path
608
+ local_var_path = '/w9/forms/{id}/pdf'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
609
+
610
+ # query parameters
611
+ query_params = {}
612
+
613
+ # header parameters
614
+ header_params = {}
615
+ # HTTP header 'Accept' (if needed)
616
+ header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json'])
617
+ if !avalara_version.nil?
618
+ header_params[:'avalara-version'] = avalara_version
619
+ end
620
+ if !x_correlation_id.nil?
621
+ header_params[:'X-Correlation-Id'] = x_correlation_id
622
+ end
623
+ if !x_avalara_client.nil?
624
+ header_params[:'X-Avalara-Client'] = x_avalara_client
625
+ end
626
+
627
+ # form parameters
628
+ form_params = {}
629
+
630
+ # http body (model)
631
+ post_body = {}
632
+
633
+ # return_type
634
+ return_type = ''
635
+
636
+ # auth_names
637
+ auth_names = ['bearer']
638
+
639
+ @api_client.apply_auth_to_request!(header_params, auth_names, required_scopes)
640
+
641
+ new_options = {
642
+ :operation => :"FormsW9Api.get_w9_form_pdf",
643
+ :header_params => header_params,
644
+ :query_params => query_params,
645
+ :form_params => form_params,
646
+ :body => post_body,
647
+ :auth_names => auth_names,
648
+ :return_type => return_type
649
+ }
650
+
651
+ response = @api_client.call_api(:GET, local_var_path, new_options, required_scopes, false, :A1099)
652
+ if new_options[:return_type]
653
+ data = deserialize(response, new_options[:return_type])
654
+ else
655
+ data = nil
656
+ end
657
+ return data, response.code, response.headers
658
+ end
659
+
574
660
  # List W9/W4/W8 forms
575
661
  # List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\".
576
662
  # @param avalara_version [String] API version # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see &lt;a href&#x3D;\&quot;https://developer.avalara.com/avatax/filtering-in-rest/\&quot;&gt;Filtering in REST&lt;/a&gt;. # @param top [Integer] If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. # @param order_by [String] A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. # @param count [Boolean] If true, return the global count of elements in the collection. # @param count_only [Boolean] If true, return ONLY the global count of elements in the collection. It only applies when count&#x3D;true. # @param x_correlation_id [String] Unique correlation Id in a GUID format # @param x_avalara_client [String] Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .
@@ -1160,6 +1246,57 @@ module AvalaraSdk::A1099
1160
1246
  @x_avalara_client = x_avalara_client
1161
1247
  end
1162
1248
  end
1249
+ # Represents the Request object for the GetW9FormPdf API
1250
+ #
1251
+ # @param String $id Id of the form (required)
1252
+ # @param String $avalara_version API version (required)
1253
+ # @param String $x_correlation_id Unique correlation Id in a GUID format (optional)
1254
+ # @param String $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional)
1255
+ #
1256
+ class GetW9FormPdfRequestSdk
1257
+ attr_accessor :id
1258
+
1259
+ attr_accessor :avalara_version
1260
+
1261
+ attr_accessor :x_correlation_id
1262
+
1263
+ attr_accessor :x_avalara_client
1264
+
1265
+ def initialize()
1266
+ end
1267
+
1268
+ def get_id()
1269
+ return @id
1270
+ end
1271
+
1272
+ def set_id(id)
1273
+ @id = id
1274
+ end
1275
+
1276
+ def get_avalara_version()
1277
+ return @avalara_version || '2.0'
1278
+ end
1279
+
1280
+ def set_avalara_version(avalara_version)
1281
+ @avalara_version = avalara_version
1282
+ end
1283
+
1284
+ def get_x_correlation_id()
1285
+ return @x_correlation_id
1286
+ end
1287
+
1288
+ def set_x_correlation_id(x_correlation_id)
1289
+ @x_correlation_id = x_correlation_id
1290
+ end
1291
+
1292
+ def get_x_avalara_client()
1293
+ return @x_avalara_client
1294
+ end
1295
+
1296
+ def set_x_avalara_client(x_avalara_client)
1297
+ @x_avalara_client = x_avalara_client
1298
+ end
1299
+ end
1163
1300
  # Represents the Request object for the ListW9Forms API
1164
1301
  #
1165
1302
  # @param String $avalara_version API version (required)
@@ -17,7 +17,7 @@ module AvalaraSdk::A1099
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::A1099
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::EInvoicing
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::EInvoicing
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::EInvoicing
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::EInvoicing
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::EInvoicing
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::EInvoicing
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ module AvalaraSdk::EInvoicing
17
17
  if (api_client.nil?)
18
18
  fail ArgumentError,'api_client is nil'
19
19
  end
20
- api_client.set_sdk_version("25.9.0")
20
+ api_client.set_sdk_version("25.10.1")
21
21
  @api_client = api_client
22
22
  end
23
23
 
@@ -11,8 +11,10 @@ require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
13
  class ErrorResponse
14
+ # A summary of the problem type.
14
15
  attr_accessor :title
15
16
 
17
+ # A list of errors detailing the problem type.
16
18
  attr_accessor :errors
17
19
 
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -11,8 +11,10 @@ require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
13
  class ErrorResponseItem
14
+ # An identifier for this occurrence of the problem. It is the name of a request's field when specific to that field. Otherwise, for other types of errors, its value is empty.
14
15
  attr_accessor :type
15
16
 
17
+ # An explanation specific to this occurrence of the problem.
16
18
  attr_accessor :detail
17
19
 
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -363,6 +363,10 @@ module AvalaraSdk::A1099::V2
363
363
  return false if @employee_last_name.nil?
364
364
  return false if @tin_type.nil?
365
365
  return false if @tin.nil?
366
+ state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
367
+ return false unless state_validator.valid?(@state)
368
+ marital_status_validator = EnumAttributeValidator.new('String', ["Single", "Married", "MarriedBut"])
369
+ return false unless marital_status_validator.valid?(@marital_status)
366
370
  true
367
371
  end
368
372
 
@@ -376,6 +380,26 @@ module AvalaraSdk::A1099::V2
376
380
  @type = type
377
381
  end
378
382
 
383
+ # Custom attribute writer method checking allowed values (enum).
384
+ # @param [Object] state Object to be assigned
385
+ def state=(state)
386
+ validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
387
+ unless validator.valid?(state)
388
+ fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
389
+ end
390
+ @state = state
391
+ end
392
+
393
+ # Custom attribute writer method checking allowed values (enum).
394
+ # @param [Object] marital_status Object to be assigned
395
+ def marital_status=(marital_status)
396
+ validator = EnumAttributeValidator.new('String', ["Single", "Married", "MarriedBut"])
397
+ unless validator.valid?(marital_status)
398
+ fail ArgumentError, "invalid value for \"marital_status\", must be one of #{validator.allowable_values}."
399
+ end
400
+ @marital_status = marital_status
401
+ end
402
+
379
403
  # Checks equality by comparing each attribute.
380
404
  # @param [Object] Object to be compared
381
405
  def ==(o)
@@ -23,13 +23,13 @@ module AvalaraSdk::A1099::V2
23
23
  # The name of the disregarded entity receiving the payment (if applicable).
24
24
  attr_accessor :disregarded_entity
25
25
 
26
- # The entity type. Available values: - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part
26
+ # Represents the entity type for tax forms. Each value corresponds to a specific entity classification. - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part
27
27
  attr_accessor :entity_type
28
28
 
29
29
  # Indicates whether the entity is making a treaty claim.
30
30
  attr_accessor :making_treaty_claim
31
31
 
32
- # The FATCA status. Available values: - 1: Nonparticipating FFI (including a limited FFI or an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner) - 2: Participating FFI - 3: Reporting Model 1 FFI - 4: Reporting Model 2 FFI - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XII) - 6: Sponsored FFI that has not obtained a GIIN - 7: Certified deemed-compliant nonregistering local bank - 8: Certified deemed-compliant FFI with only low-value accounts - 9: Certified deemed-compliant sponsored, closely held investment vehicle - 10: Certified deemed-compliant limited life debt investment entity - 11: Certified deemed-compliant investment advisors and investment managers - 12: Owner-documented FFI - 13: Restricted distributor - 14: Nonreporting IGA FFI - 15: Foreign government, government of a U.S. possession, or foreign central bank of issue - 16: International organization - 17: Exempt retirement plans - 18: Entity wholly owned by exempt beneficial owners - 19: Territory financial institution - 20: Nonfinancial group entity - 21: Excepted nonfinancial start-up company - 22: Excepted nonfinancial entity in liquidation or bankruptcy - 23: 501(c) organization - 24: Nonprofit organization - 25: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation - 26: Excepted territory NFFE - 27: Active NFFE - 28: Passive NFFE - 29: Excepted inter-affiliate FFI - 30: Direct reporting NFFE - 31: Sponsored direct reporting NFFE - 32: Account that is not a financial account
32
+ # Represents the FATCA status types for tax forms. Used for W8-BEN-E forms and FATCA compliance validations. Values correspond to numeric identifiers used in forms. - 1: Nonparticipating FFI (including a limited FFI or an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner) - 2: Participating FFI - 3: Reporting Model 1 FFI - 4: Reporting Model 2 FFI - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XII) - 6: Sponsored FFI that has not obtained a GIIN - 7: Certified deemed-compliant nonregistering local bank - 8: Certified deemed-compliant FFI with only low-value accounts - 9: Certified deemed-compliant sponsored, closely held investment vehicle - 10: Certified deemed-compliant limited life debt investment entity - 11: Certified deemed-compliant investment advisors and investment managers - 12: Owner-documented FFI - 13: Restricted distributor - 14: Nonreporting IGA FFI - 15: Foreign government, government of a U.S. possession, or foreign central bank of issue - 16: International organization - 17: Exempt retirement plans - 18: Entity wholly owned by exempt beneficial owners - 19: Territory financial institution - 20: Nonfinancial group entity - 21: Excepted nonfinancial start-up company - 22: Excepted nonfinancial entity in liquidation or bankruptcy - 23: 501(c) organization - 24: Nonprofit organization - 25: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation - 26: Excepted territory NFFE - 27: Active NFFE - 28: Passive NFFE - 29: Excepted inter-affiliate FFI - 30: Direct reporting NFFE - 31: Sponsored direct reporting NFFE - 32: Account that is not a financial account
33
33
  attr_accessor :fatca_status
34
34
 
35
35
  # The residential address of the individual or entity.
@@ -80,7 +80,7 @@ module AvalaraSdk::A1099::V2
80
80
  # A reference number for the form.
81
81
  attr_accessor :reference_number
82
82
 
83
- # The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Limited Branch - 2: U.S. Branch - 3: Participating FFI - 4: Reporting Model 1 FFI - 5: Reporting Model 2 FFI
83
+ # The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Branch treated as nonparticipating FFI - 2: U.S. Branch - 3: Participating FFI - 4: Reporting Model 1 FFI - 5: Reporting Model 2 FFI
84
84
  attr_accessor :disregarded_entity_fatca_status
85
85
 
86
86
  # The address for disregarded entities.
@@ -110,7 +110,7 @@ module AvalaraSdk::A1099::V2
110
110
  # Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements.
111
111
  attr_accessor :benefit_limitation_certification
112
112
 
113
- # The benefit limitation for tax treaty claims. Available values: - 1: Government - 2: Tax exempt pension trust or pension fund - 3: Other tax exempt organization - 4: Publicly traded corporation - 5: Subsidiary of a publicly traded corporation - 6: Company that meets the ownership and base erosion test - 7: Company that meets the derivative benefits test - 8: Company with an item of income that meets active trade or business test - 9: Favorable discretionary determination by the U.S. competent authority received - 10: Other
113
+ # The benefit limitation for tax treaty claims. Available values: - 1: Government - 2: Tax exempt pension trust or pension fund - 3: Other tax exempt organization - 4: Publicly traded corporation - 5: Subsidiary of a publicly traded corporation - 6: Company that meets the ownership and base erosion test - 7: Company that meets the derivative benefits test - 8: Company with an item of income that meets active trade or business test - 9: Favorable discretionary determination by the U.S. competent authority received - 10: Other - 11: No LOB article in treaty
114
114
  attr_accessor :benefit_limitation
115
115
 
116
116
  # Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income.
@@ -1126,8 +1126,24 @@ module AvalaraSdk::A1099::V2
1126
1126
  return false if @name.nil?
1127
1127
  return false if @citizenship_country.nil?
1128
1128
  return false if @entity_type.nil?
1129
+ entity_type_validator = EnumAttributeValidator.new('String', ["Corporation", "DisregardedEntity", "Partnership", "SimpleTrust", "GrantorTrust", "ComplexTrust", "Estate", "ForeignGovernmentControlledEntity", "CentralBankOfIssue", "TaxExemptOrganization", "PrivateFoundation", "InternationalOrganization", "ForeignGovernmentControlledIntegralPart"])
1130
+ return false unless entity_type_validator.valid?(@entity_type)
1129
1131
  return false if @fatca_status.nil?
1132
+ fatca_status_validator = EnumAttributeValidator.new('String', ["NonparticipatingFFI", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI", "RegisteredDeemedCompliantFFI", "SponsoredFFIWithoutGIIN", "CertifiedDeemedCompliantNonregisteringLocalBank", "CertifiedDeemedCompliantFFIWithLowValueAccounts", "CertifiedDeemedCompliantSponsoredCloselyHeldInvestmentVehicle", "CertifiedDeemedCompliantLimitedLifeDebtInvestmentEntity", "CertainInvestmentEntitiesWithoutFinancialAccounts", "OwnerDocumentedFFI", "RestrictedDistributor", "NonreportingIGAFFI", "ForeignGovernmentOrUSPossessionOrForeignCentralBank", "InternationalOrganization", "ExemptRetirementPlans", "EntityWhollyOwnedByExemptBeneficialOwners", "TerritoryFinancialInstitution", "NonfinancialGroupEntity", "ExceptedNonfinancialStartUpCompany", "ExceptedNonfinancialEntityInLiquidationOrBankruptcy", "Organization501c", "NonprofitOrganization", "PubliclyTradedNFFEOrAffiliateOfPubliclyTradedCorporation", "ExceptedTerritoryNFFE", "ActiveNFFE", "PassiveNFFE", "ExceptedInterAffiliateFFI", "DirectReportingNFFE", "SponsoredDirectReportingNFFE", "AccountThatIsNotFinancialAccount"])
1133
+ return false unless fatca_status_validator.valid?(@fatca_status)
1134
+ residence_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
1135
+ return false unless residence_state_validator.valid?(@residence_state)
1130
1136
  return false if @residence_country.nil?
1137
+ mailing_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
1138
+ return false unless mailing_state_validator.valid?(@mailing_state)
1139
+ disregarded_entity_fatca_status_validator = EnumAttributeValidator.new('String', ["BranchTreatedAsNonparticipatingFFI", "USBranch", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI"])
1140
+ return false unless disregarded_entity_fatca_status_validator.valid?(@disregarded_entity_fatca_status)
1141
+ disregarded_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
1142
+ return false unless disregarded_state_validator.valid?(@disregarded_state)
1143
+ benefit_limitation_validator = EnumAttributeValidator.new('String', ["Government", "TaxExemptPensionTrustOrPensionFund", "OtherTaxExemptOrganization", "PubliclyTradedCorporation", "SubsidiaryOfPubliclyTradedCorporation", "CompanyThatMeetsOwnershipAndBaseErosionTest", "CompanyThatMeetsDerivativeBenefitsTest", "CompanyWithItemOfIncomeThatMeetsActiveTradeOrBusinessTest", "FavorableDiscretionaryDeterminationByUSCompetentAuthorityReceived", "Other", "NoLOBArticleInTreaty"])
1144
+ return false unless benefit_limitation_validator.valid?(@benefit_limitation)
1145
+ iga_model_validator = EnumAttributeValidator.new('String', ["Model1IGA", "Model2IGA"])
1146
+ return false unless iga_model_validator.valid?(@iga_model)
1131
1147
  true
1132
1148
  end
1133
1149
 
@@ -1141,6 +1157,86 @@ module AvalaraSdk::A1099::V2
1141
1157
  @type = type
1142
1158
  end
1143
1159
 
1160
+ # Custom attribute writer method checking allowed values (enum).
1161
+ # @param [Object] entity_type Object to be assigned
1162
+ def entity_type=(entity_type)
1163
+ validator = EnumAttributeValidator.new('String', ["Corporation", "DisregardedEntity", "Partnership", "SimpleTrust", "GrantorTrust", "ComplexTrust", "Estate", "ForeignGovernmentControlledEntity", "CentralBankOfIssue", "TaxExemptOrganization", "PrivateFoundation", "InternationalOrganization", "ForeignGovernmentControlledIntegralPart"])
1164
+ unless validator.valid?(entity_type)
1165
+ fail ArgumentError, "invalid value for \"entity_type\", must be one of #{validator.allowable_values}."
1166
+ end
1167
+ @entity_type = entity_type
1168
+ end
1169
+
1170
+ # Custom attribute writer method checking allowed values (enum).
1171
+ # @param [Object] fatca_status Object to be assigned
1172
+ def fatca_status=(fatca_status)
1173
+ validator = EnumAttributeValidator.new('String', ["NonparticipatingFFI", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI", "RegisteredDeemedCompliantFFI", "SponsoredFFIWithoutGIIN", "CertifiedDeemedCompliantNonregisteringLocalBank", "CertifiedDeemedCompliantFFIWithLowValueAccounts", "CertifiedDeemedCompliantSponsoredCloselyHeldInvestmentVehicle", "CertifiedDeemedCompliantLimitedLifeDebtInvestmentEntity", "CertainInvestmentEntitiesWithoutFinancialAccounts", "OwnerDocumentedFFI", "RestrictedDistributor", "NonreportingIGAFFI", "ForeignGovernmentOrUSPossessionOrForeignCentralBank", "InternationalOrganization", "ExemptRetirementPlans", "EntityWhollyOwnedByExemptBeneficialOwners", "TerritoryFinancialInstitution", "NonfinancialGroupEntity", "ExceptedNonfinancialStartUpCompany", "ExceptedNonfinancialEntityInLiquidationOrBankruptcy", "Organization501c", "NonprofitOrganization", "PubliclyTradedNFFEOrAffiliateOfPubliclyTradedCorporation", "ExceptedTerritoryNFFE", "ActiveNFFE", "PassiveNFFE", "ExceptedInterAffiliateFFI", "DirectReportingNFFE", "SponsoredDirectReportingNFFE", "AccountThatIsNotFinancialAccount"])
1174
+ unless validator.valid?(fatca_status)
1175
+ fail ArgumentError, "invalid value for \"fatca_status\", must be one of #{validator.allowable_values}."
1176
+ end
1177
+ @fatca_status = fatca_status
1178
+ end
1179
+
1180
+ # Custom attribute writer method checking allowed values (enum).
1181
+ # @param [Object] residence_state Object to be assigned
1182
+ def residence_state=(residence_state)
1183
+ validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
1184
+ unless validator.valid?(residence_state)
1185
+ fail ArgumentError, "invalid value for \"residence_state\", must be one of #{validator.allowable_values}."
1186
+ end
1187
+ @residence_state = residence_state
1188
+ end
1189
+
1190
+ # Custom attribute writer method checking allowed values (enum).
1191
+ # @param [Object] mailing_state Object to be assigned
1192
+ def mailing_state=(mailing_state)
1193
+ validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
1194
+ unless validator.valid?(mailing_state)
1195
+ fail ArgumentError, "invalid value for \"mailing_state\", must be one of #{validator.allowable_values}."
1196
+ end
1197
+ @mailing_state = mailing_state
1198
+ end
1199
+
1200
+ # Custom attribute writer method checking allowed values (enum).
1201
+ # @param [Object] disregarded_entity_fatca_status Object to be assigned
1202
+ def disregarded_entity_fatca_status=(disregarded_entity_fatca_status)
1203
+ validator = EnumAttributeValidator.new('String', ["BranchTreatedAsNonparticipatingFFI", "USBranch", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI"])
1204
+ unless validator.valid?(disregarded_entity_fatca_status)
1205
+ fail ArgumentError, "invalid value for \"disregarded_entity_fatca_status\", must be one of #{validator.allowable_values}."
1206
+ end
1207
+ @disregarded_entity_fatca_status = disregarded_entity_fatca_status
1208
+ end
1209
+
1210
+ # Custom attribute writer method checking allowed values (enum).
1211
+ # @param [Object] disregarded_state Object to be assigned
1212
+ def disregarded_state=(disregarded_state)
1213
+ validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
1214
+ unless validator.valid?(disregarded_state)
1215
+ fail ArgumentError, "invalid value for \"disregarded_state\", must be one of #{validator.allowable_values}."
1216
+ end
1217
+ @disregarded_state = disregarded_state
1218
+ end
1219
+
1220
+ # Custom attribute writer method checking allowed values (enum).
1221
+ # @param [Object] benefit_limitation Object to be assigned
1222
+ def benefit_limitation=(benefit_limitation)
1223
+ validator = EnumAttributeValidator.new('String', ["Government", "TaxExemptPensionTrustOrPensionFund", "OtherTaxExemptOrganization", "PubliclyTradedCorporation", "SubsidiaryOfPubliclyTradedCorporation", "CompanyThatMeetsOwnershipAndBaseErosionTest", "CompanyThatMeetsDerivativeBenefitsTest", "CompanyWithItemOfIncomeThatMeetsActiveTradeOrBusinessTest", "FavorableDiscretionaryDeterminationByUSCompetentAuthorityReceived", "Other", "NoLOBArticleInTreaty"])
1224
+ unless validator.valid?(benefit_limitation)
1225
+ fail ArgumentError, "invalid value for \"benefit_limitation\", must be one of #{validator.allowable_values}."
1226
+ end
1227
+ @benefit_limitation = benefit_limitation
1228
+ end
1229
+
1230
+ # Custom attribute writer method checking allowed values (enum).
1231
+ # @param [Object] iga_model Object to be assigned
1232
+ def iga_model=(iga_model)
1233
+ validator = EnumAttributeValidator.new('String', ["Model1IGA", "Model2IGA"])
1234
+ unless validator.valid?(iga_model)
1235
+ fail ArgumentError, "invalid value for \"iga_model\", must be one of #{validator.allowable_values}."
1236
+ end
1237
+ @iga_model = iga_model
1238
+ end
1239
+
1144
1240
  # Checks equality by comparing each attribute.
1145
1241
  # @param [Object] Object to be compared
1146
1242
  def ==(o)