avalara_sdk 25.8.3 → 25.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +4 -14
  4. data/docs/A1099/V2/CompaniesW9Api.md +9 -9
  5. data/docs/A1099/V2/CompanyBase.md +50 -0
  6. data/docs/A1099/V2/CompanyRequest.md +50 -0
  7. data/docs/A1099/V2/ErrorResponse.md +2 -2
  8. data/docs/A1099/V2/ErrorResponseItem.md +2 -2
  9. data/docs/A1099/V2/Form1042S.md +16 -16
  10. data/docs/A1099/V2/Form1095B.md +15 -15
  11. data/docs/A1099/V2/Form1095C.md +14 -14
  12. data/docs/A1099/V2/Form1099Base.md +14 -14
  13. data/docs/A1099/V2/Form1099Div.md +15 -15
  14. data/docs/A1099/V2/Form1099Int.md +16 -16
  15. data/docs/A1099/V2/Form1099K.md +20 -20
  16. data/docs/A1099/V2/Form1099ListRequest.md +1 -1
  17. data/docs/A1099/V2/Form1099Misc.md +15 -15
  18. data/docs/A1099/V2/Form1099Nec.md +17 -17
  19. data/docs/A1099/V2/Form1099R.md +17 -17
  20. data/docs/A1099/V2/Forms1099Api.md +12 -12
  21. data/docs/A1099/V2/FormsW9Api.md +17 -17
  22. data/docs/A1099/V2/IntermediaryOrFlowThrough.md +2 -2
  23. data/docs/A1099/V2/IssuerBase.md +46 -0
  24. data/docs/A1099/V2/IssuerRequest.md +46 -0
  25. data/docs/A1099/V2/Issuers1099Api.md +9 -9
  26. data/docs/A1099/V2/JobResponse.md +1 -1
  27. data/docs/A1099/V2/JobsApi.md +1 -1
  28. data/docs/A1099/V2/TinMatchStatusResponse.md +1 -1
  29. data/docs/A1099/V2/W4FormMinimalRequest.md +2 -2
  30. data/docs/A1099/V2/W4FormRequest.md +11 -11
  31. data/docs/A1099/V2/W4FormResponse.md +48 -20
  32. data/docs/A1099/V2/W8BenEFormMinimalRequest.md +2 -2
  33. data/docs/A1099/V2/W8BenEFormRequest.md +10 -10
  34. data/docs/A1099/V2/W8BenEFormResponse.md +96 -68
  35. data/docs/A1099/V2/W8BenFormMinimalRequest.md +2 -2
  36. data/docs/A1099/V2/W8BenFormRequest.md +6 -6
  37. data/docs/A1099/V2/W8BenFormResponse.md +55 -27
  38. data/docs/A1099/V2/W8ImyFormMinimalRequest.md +2 -2
  39. data/docs/A1099/V2/W8ImyFormRequest.md +10 -10
  40. data/docs/A1099/V2/W8ImyFormResponse.md +118 -90
  41. data/docs/A1099/V2/W9FormBaseMinimalRequest.md +2 -2
  42. data/docs/A1099/V2/W9FormBaseRequest.md +2 -2
  43. data/docs/A1099/V2/W9FormBaseResponse.md +3 -3
  44. data/docs/A1099/V2/W9FormMinimalRequest.md +2 -2
  45. data/docs/A1099/V2/W9FormRequest.md +12 -12
  46. data/docs/A1099/V2/W9FormResponse.md +44 -16
  47. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +21 -21
  48. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +7 -7
  49. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +16 -16
  50. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +21 -21
  51. data/lib/avalara_sdk/api/A1099/V2/jobs_api.rb +1 -1
  52. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
  53. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
  54. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  55. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
  56. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
  57. data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
  58. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
  59. data/lib/avalara_sdk/api_client.rb +10 -2
  60. data/lib/avalara_sdk/models/A1099/V2/company_base.rb +404 -0
  61. data/lib/avalara_sdk/models/A1099/V2/company_request.rb +411 -0
  62. data/lib/avalara_sdk/models/A1099/V2/company_response.rb +1 -1
  63. data/lib/avalara_sdk/models/A1099/V2/error_response.rb +2 -6
  64. data/lib/avalara_sdk/models/A1099/V2/error_response_item.rb +2 -0
  65. data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +20 -30
  66. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +19 -40
  67. data/lib/avalara_sdk/models/A1099/V2/form1095_c.rb +18 -49
  68. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +18 -29
  69. data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +20 -31
  70. data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +22 -32
  71. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +35 -38
  72. data/lib/avalara_sdk/models/A1099/V2/form1099_list_request.rb +2 -12
  73. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +20 -31
  74. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +23 -33
  75. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +48 -33
  76. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through.rb +48 -2
  77. data/lib/avalara_sdk/models/A1099/V2/issuer_base.rb +384 -0
  78. data/lib/avalara_sdk/models/A1099/V2/issuer_request.rb +391 -0
  79. data/lib/avalara_sdk/models/A1099/V2/issuer_response.rb +1 -1
  80. data/lib/avalara_sdk/models/A1099/V2/job_response.rb +0 -6
  81. data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +0 -6
  82. data/lib/avalara_sdk/models/A1099/V2/w4_form_minimal_request.rb +1 -27
  83. data/lib/avalara_sdk/models/A1099/V2/w4_form_request.rb +50 -24
  84. data/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb +191 -15
  85. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_minimal_request.rb +1 -27
  86. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +37 -28
  87. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb +190 -14
  88. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_minimal_request.rb +1 -27
  89. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +20 -23
  90. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb +191 -15
  91. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_minimal_request.rb +1 -27
  92. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_request.rb +72 -22
  93. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb +191 -15
  94. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_minimal_request.rb +1 -27
  95. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_request.rb +1 -27
  96. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +47 -18
  97. data/lib/avalara_sdk/models/A1099/V2/w9_form_minimal_request.rb +1 -27
  98. data/lib/avalara_sdk/models/A1099/V2/w9_form_request.rb +61 -22
  99. data/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb +190 -14
  100. data/lib/avalara_sdk/version.rb +1 -1
  101. data/lib/avalara_sdk.rb +8 -4
  102. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  103. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  104. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  105. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  106. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  107. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  108. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  109. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  110. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  111. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  112. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  113. metadata +10 -2
@@ -10,17 +10,18 @@ require 'date'
10
10
  require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
- class Form1099Nec
14
- # Nonemployee compensation
13
+ # Form 1099-NEC: Nonemployee Compensation
14
+ class Form1099Nec
15
+ # Nonemployee compensation. Required if DirectSalesIndicator is false.
15
16
  attr_accessor :nonemployee_compensation
16
17
 
17
- # Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale
18
+ # Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale. Should be true if Nonemployee compensation is not provided.
18
19
  attr_accessor :direct_sales_indicator
19
20
 
20
- # Federal income tax withheld
21
+ # Federal income tax withheld.
21
22
  attr_accessor :federal_income_tax_withheld
22
23
 
23
- # Form type
24
+ # Form type.
24
25
  attr_accessor :type
25
26
 
26
27
  # Form ID. Unique identifier set when the record is created.
@@ -29,13 +30,13 @@ module AvalaraSdk::A1099::V2
29
30
  # Issuer ID - only required when creating forms
30
31
  attr_accessor :issuer_id
31
32
 
32
- # Issuer Reference ID - only required when creating forms
33
+ # Issuer Reference ID - only required when creating forms via $bulk-upsert
33
34
  attr_accessor :issuer_reference_id
34
35
 
35
36
  # Issuer TIN - readonly
36
37
  attr_accessor :issuer_tin
37
38
 
38
- # Tax Year - only required when creating forms
39
+ # Tax Year - only required when creating forms via $bulk-upsert
39
40
  attr_accessor :tax_year
40
41
 
41
42
  # Internal reference ID. Never shown to any agency or recipient.
@@ -47,7 +48,7 @@ module AvalaraSdk::A1099::V2
47
48
  # Recipient name
48
49
  attr_accessor :recipient_name
49
50
 
50
- # Type of TIN (Tax ID Number)
51
+ # Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
51
52
  attr_accessor :tin_type
52
53
 
53
54
  # Recipient second name
@@ -83,16 +84,16 @@ module AvalaraSdk::A1099::V2
83
84
  # Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.
84
85
  attr_accessor :country_code
85
86
 
86
- # Date when federal e-filing should be scheduled for this form
87
+ # Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
87
88
  attr_accessor :federal_efile_date
88
89
 
89
90
  # Boolean indicating that postal mailing to the recipient should be scheduled for this form
90
91
  attr_accessor :postal_mail
91
92
 
92
- # Date when state e-filing should be scheduled for this form
93
+ # Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
93
94
  attr_accessor :state_efile_date
94
95
 
95
- # Date when recipient e-delivery should be scheduled for this form
96
+ # Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
96
97
  attr_accessor :recipient_edelivery_date
97
98
 
98
99
  # Boolean indicating that TIN Matching should be scheduled for this form
@@ -110,22 +111,22 @@ module AvalaraSdk::A1099::V2
110
111
  # Second TIN notice
111
112
  attr_accessor :second_tin_notice
112
113
 
113
- # Federal e-file status
114
+ # Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
114
115
  attr_accessor :federal_efile_status
115
116
 
116
- # State e-file status
117
+ # State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
117
118
  attr_accessor :state_efile_status
118
119
 
119
- # Postal mail to recipient status
120
+ # Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
120
121
  attr_accessor :postal_mail_status
121
122
 
122
- # TIN Match status
123
+ # TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
123
124
  attr_accessor :tin_match_status
124
125
 
125
- # Address verification status
126
+ # Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
126
127
  attr_accessor :address_verification_status
127
128
 
128
- # EDelivery status
129
+ # EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
129
130
  attr_accessor :e_delivery_status
130
131
 
131
132
  # Validation errors
@@ -294,6 +295,7 @@ module AvalaraSdk::A1099::V2
294
295
  :'no_tin',
295
296
  :'address_verification',
296
297
  :'state_and_local_withholding',
298
+ :'second_tin_notice',
297
299
  :'federal_efile_status',
298
300
  :'state_efile_status',
299
301
  :'postal_mail_status',
@@ -528,9 +530,9 @@ module AvalaraSdk::A1099::V2
528
530
  def valid?
529
531
  warn '[DEPRECATED] the `valid?` method is obsolete'
530
532
  return false if @type.nil?
531
- type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
533
+ type_validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
532
534
  return false unless type_validator.valid?(@type)
533
- tin_type_validator = EnumAttributeValidator.new('String', ["Empty", "EIN", "SSN", "ITIN", "ATIN"])
535
+ tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
534
536
  return false unless tin_type_validator.valid?(@tin_type)
535
537
  true
536
538
  end
@@ -538,7 +540,7 @@ module AvalaraSdk::A1099::V2
538
540
  # Custom attribute writer method checking allowed values (enum).
539
541
  # @param [Object] type Object to be assigned
540
542
  def type=(type)
541
- validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
543
+ validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
542
544
  unless validator.valid?(type)
543
545
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
544
546
  end
@@ -548,25 +550,13 @@ module AvalaraSdk::A1099::V2
548
550
  # Custom attribute writer method checking allowed values (enum).
549
551
  # @param [Object] tin_type Object to be assigned
550
552
  def tin_type=(tin_type)
551
- validator = EnumAttributeValidator.new('String', ["Empty", "EIN", "SSN", "ITIN", "ATIN"])
553
+ validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
552
554
  unless validator.valid?(tin_type)
553
555
  fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
554
556
  end
555
557
  @tin_type = tin_type
556
558
  end
557
559
 
558
- # Custom attribute writer method with validation
559
- # @param [Object] state_efile_status Value to be assigned
560
- def state_efile_status=(state_efile_status)
561
- @state_efile_status = state_efile_status
562
- end
563
-
564
- # Custom attribute writer method with validation
565
- # @param [Object] validation_errors Value to be assigned
566
- def validation_errors=(validation_errors)
567
- @validation_errors = validation_errors
568
- end
569
-
570
560
  # Checks equality by comparing each attribute.
571
561
  # @param [Object] Object to be compared
572
562
  def ==(o)
@@ -10,7 +10,7 @@ require 'date'
10
10
  require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
- # Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc.
13
+ # Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc. *At least one of the following amounts must be provided:* Gross distribution, Taxable amount, Capital gain, Employee contributions/Designated Roth contributions or insurance premiums, Net unrealized appreciation in employer's securities, Other amount, Total employee contributions, Traditional IRA/SEP/SIMPLE or Roth conversion amount, or Amount allocable to IRR within 5 years
14
14
  class Form1099R
15
15
  # Gross distribution
16
16
  attr_accessor :gross_distribution
@@ -36,10 +36,10 @@ module AvalaraSdk::A1099::V2
36
36
  # Net unrealized appreciation in employer's securities
37
37
  attr_accessor :net_unrealized_appreciation_in_employer_securities
38
38
 
39
- # Distribution code
39
+ # Distribution code. Available values: - 1: Early distribution, no known exception (in most cases, under age 59½) - 2: Early distribution, exception applies (under age 59½) - 3: Disability - 4: Death - 5: Prohibited transaction - 6: Section 1035 exchange (a tax-free exchange of life insurance, annuity, qualified long-term care insurance, or endowment contracts) - 7: Normal distribution - 8: Excess contributions plus earnings/excess deferrals (and/or earnings) taxable in payment year - 9: Cost of current life insurance protection (premiums paid by a trustee or custodian for current insurance protection) - A: May be eligible for 10-year tax option - B: Designated Roth account distribution - C: Reportable Death Benefits Under Section 6050Y(c) - D: Annuity payments from nonqualified annuity payments and distributions from life insurance contracts that may be subject to tax under section 1411 - E: Distribution under Employee Plans Compliance Resolution System (EPCRS) - F: Charitable gift annuity - G: Direct rollover and rollover contribution - H: Direct rollover of distribution from a designated Roth account to a Roth IRA - J: Early distribution from a Roth IRA (This code may be used with a Code 8 or P) - K: Distribution of IRA Assets Not Having A Readily Available FMV - L: Loans treated as deemed distributions under section 72(p) - M: Qualified Plan Loan Offsets - N: Recharacterized IRA contribution made for year following payment year - P: Excess contributions plus earnings/excess deferrals taxable for year prior to payment year - Q: Qualified distribution from a Roth IRA (Distribution from a Roth IRA when the 5-year holding period has been met, and the recipient has reached 59½, has died, or is disabled) - R: Recharacterized IRA contribution made for year prior to payment year - S: Early distribution from a SIMPLE IRA in first 2 years no known exceptions - T: Roth IRA distribution exception applies because participant has reached 59½, died or is disabled, but it is unknown if the 5-year period has been met - U: Distribution from ESOP under Section 404(k) - W: Charges or payments for purchasing qualified long-term care insurance contracts under combined arrangements
40
40
  attr_accessor :distribution_code
41
41
 
42
- # Second distribution code
42
+ # Second distribution code. Must be a valid combination with the first distribution code. See DistributionCode property documentation for code descriptions. Valid combinations based on first distribution code: - 1: _, 8, B, D, K, L, M, P - 2: _, 8, B, D, K, L, M, P - 3: _, D - 4: _, 8, A, B, D, G, H, K, L, M, P - 5: _ - 6: _, W - 7: _, A, B, D, K, L, M - 8: _, 1, 2, 4, B, J, K - 9: _ - A: 4, 7 - B: _, 1, 2, 4, 7, 8, G, L, M, P, U - C: _, D - D: 1, 2, 3, 4, 7, C - E: _ - F: _ - G: _, 4, B, K - H: _, 4 - J: _, 8, P - K: 1, 2, 4, 7, 8, G - L: _, 1, 2, 4, 7, B - M: _, 1, 2, 4, 7, B - N: _ - P: _, 1, 2, 4, B, J - Q: _ - R: _ - S: _ - T: _ - U: _, B - W: _, 6 (_ indicates no second distribution code) (format: firstDistributionCode: availableSecondDistributionCodes)
43
43
  attr_accessor :second_distribution_code
44
44
 
45
45
  # IRA/SEP/SIMPLE
@@ -69,10 +69,10 @@ module AvalaraSdk::A1099::V2
69
69
  # Date of payment
70
70
  attr_accessor :date_of_payment
71
71
 
72
- # FATCA filing requirement
72
+ # FATCA filing requirement.
73
73
  attr_accessor :fatca_filing_requirement
74
74
 
75
- # Form type
75
+ # Form type.
76
76
  attr_accessor :type
77
77
 
78
78
  # Form ID. Unique identifier set when the record is created.
@@ -81,13 +81,13 @@ module AvalaraSdk::A1099::V2
81
81
  # Issuer ID - only required when creating forms
82
82
  attr_accessor :issuer_id
83
83
 
84
- # Issuer Reference ID - only required when creating forms
84
+ # Issuer Reference ID - only required when creating forms via $bulk-upsert
85
85
  attr_accessor :issuer_reference_id
86
86
 
87
87
  # Issuer TIN - readonly
88
88
  attr_accessor :issuer_tin
89
89
 
90
- # Tax Year - only required when creating forms
90
+ # Tax Year - only required when creating forms via $bulk-upsert
91
91
  attr_accessor :tax_year
92
92
 
93
93
  # Internal reference ID. Never shown to any agency or recipient.
@@ -99,7 +99,7 @@ module AvalaraSdk::A1099::V2
99
99
  # Recipient name
100
100
  attr_accessor :recipient_name
101
101
 
102
- # Type of TIN (Tax ID Number)
102
+ # Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
103
103
  attr_accessor :tin_type
104
104
 
105
105
  # Recipient second name
@@ -135,16 +135,16 @@ module AvalaraSdk::A1099::V2
135
135
  # Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.
136
136
  attr_accessor :country_code
137
137
 
138
- # Date when federal e-filing should be scheduled for this form
138
+ # Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
139
139
  attr_accessor :federal_efile_date
140
140
 
141
141
  # Boolean indicating that postal mailing to the recipient should be scheduled for this form
142
142
  attr_accessor :postal_mail
143
143
 
144
- # Date when state e-filing should be scheduled for this form
144
+ # Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
145
145
  attr_accessor :state_efile_date
146
146
 
147
- # Date when recipient e-delivery should be scheduled for this form
147
+ # Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
148
148
  attr_accessor :recipient_edelivery_date
149
149
 
150
150
  # Boolean indicating that TIN Matching should be scheduled for this form
@@ -162,22 +162,22 @@ module AvalaraSdk::A1099::V2
162
162
  # Second TIN notice
163
163
  attr_accessor :second_tin_notice
164
164
 
165
- # Federal e-file status
165
+ # Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
166
166
  attr_accessor :federal_efile_status
167
167
 
168
- # State e-file status
168
+ # State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
169
169
  attr_accessor :state_efile_status
170
170
 
171
- # Postal mail to recipient status
171
+ # Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
172
172
  attr_accessor :postal_mail_status
173
173
 
174
- # TIN Match status
174
+ # TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
175
175
  attr_accessor :tin_match_status
176
176
 
177
- # Address verification status
177
+ # Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
178
178
  attr_accessor :address_verification_status
179
179
 
180
- # EDelivery status
180
+ # EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
181
181
  attr_accessor :e_delivery_status
182
182
 
183
183
  # Validation errors
@@ -397,6 +397,7 @@ module AvalaraSdk::A1099::V2
397
397
  :'no_tin',
398
398
  :'address_verification',
399
399
  :'state_and_local_withholding',
400
+ :'second_tin_notice',
400
401
  :'federal_efile_status',
401
402
  :'state_efile_status',
402
403
  :'postal_mail_status',
@@ -463,6 +464,8 @@ module AvalaraSdk::A1099::V2
463
464
 
464
465
  if attributes.key?(:'distribution_code')
465
466
  self.distribution_code = attributes[:'distribution_code']
467
+ else
468
+ self.distribution_code = nil
466
469
  end
467
470
 
468
471
  if attributes.key?(:'second_distribution_code')
@@ -696,18 +699,42 @@ module AvalaraSdk::A1099::V2
696
699
  # @return true if the model is valid
697
700
  def valid?
698
701
  warn '[DEPRECATED] the `valid?` method is obsolete'
702
+ distribution_code_validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "W"])
703
+ return false unless distribution_code_validator.valid?(@distribution_code)
704
+ second_distribution_code_validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "W"])
705
+ return false unless second_distribution_code_validator.valid?(@second_distribution_code)
699
706
  return false if @type.nil?
700
- type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
707
+ type_validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
701
708
  return false unless type_validator.valid?(@type)
702
- tin_type_validator = EnumAttributeValidator.new('String', ["Empty", "EIN", "SSN", "ITIN", "ATIN"])
709
+ tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
703
710
  return false unless tin_type_validator.valid?(@tin_type)
704
711
  true
705
712
  end
706
713
 
714
+ # Custom attribute writer method checking allowed values (enum).
715
+ # @param [Object] distribution_code Object to be assigned
716
+ def distribution_code=(distribution_code)
717
+ validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "W"])
718
+ unless validator.valid?(distribution_code)
719
+ fail ArgumentError, "invalid value for \"distribution_code\", must be one of #{validator.allowable_values}."
720
+ end
721
+ @distribution_code = distribution_code
722
+ end
723
+
724
+ # Custom attribute writer method checking allowed values (enum).
725
+ # @param [Object] second_distribution_code Object to be assigned
726
+ def second_distribution_code=(second_distribution_code)
727
+ validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "W"])
728
+ unless validator.valid?(second_distribution_code)
729
+ fail ArgumentError, "invalid value for \"second_distribution_code\", must be one of #{validator.allowable_values}."
730
+ end
731
+ @second_distribution_code = second_distribution_code
732
+ end
733
+
707
734
  # Custom attribute writer method checking allowed values (enum).
708
735
  # @param [Object] type Object to be assigned
709
736
  def type=(type)
710
- validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
737
+ validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
711
738
  unless validator.valid?(type)
712
739
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
713
740
  end
@@ -717,25 +744,13 @@ module AvalaraSdk::A1099::V2
717
744
  # Custom attribute writer method checking allowed values (enum).
718
745
  # @param [Object] tin_type Object to be assigned
719
746
  def tin_type=(tin_type)
720
- validator = EnumAttributeValidator.new('String', ["Empty", "EIN", "SSN", "ITIN", "ATIN"])
747
+ validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
721
748
  unless validator.valid?(tin_type)
722
749
  fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
723
750
  end
724
751
  @tin_type = tin_type
725
752
  end
726
753
 
727
- # Custom attribute writer method with validation
728
- # @param [Object] state_efile_status Value to be assigned
729
- def state_efile_status=(state_efile_status)
730
- @state_efile_status = state_efile_status
731
- end
732
-
733
- # Custom attribute writer method with validation
734
- # @param [Object] validation_errors Value to be assigned
735
- def validation_errors=(validation_errors)
736
- @validation_errors = validation_errors
737
- end
738
-
739
754
  # Checks equality by comparing each attribute.
740
755
  # @param [Object] Object to be compared
741
756
  def ==(o)
@@ -15,10 +15,10 @@ module AvalaraSdk::A1099::V2
15
15
  # EIN (Employer Identification Number) of the intermediary or flow-through entity
16
16
  attr_accessor :ein
17
17
 
18
- # Chapter 3 status code for the intermediary or flow-through entity
18
+ # Chapter 3 status code for the intermediary or flow-through entity. Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
19
19
  attr_accessor :chap3_status_code
20
20
 
21
- # Chapter 4 status code for the intermediary or flow-through entity
21
+ # Chapter 4 status code for the intermediary or flow-through entity. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
22
22
  attr_accessor :chap4_status_code
23
23
 
24
24
  # Name of the intermediary or flow-through entity
@@ -45,6 +45,28 @@ module AvalaraSdk::A1099::V2
45
45
  # Zip code of the intermediary or flow-through entity
46
46
  attr_accessor :zip
47
47
 
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
48
70
  # Attribute mapping from ruby-style variable name to JSON key.
49
71
  def self.attribute_map
50
72
  {
@@ -173,9 +195,33 @@ module AvalaraSdk::A1099::V2
173
195
  # @return true if the model is valid
174
196
  def valid?
175
197
  warn '[DEPRECATED] the `valid?` method is obsolete'
198
+ chap3_status_code_validator = EnumAttributeValidator.new('String', ["01", "02", "34", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "35", "36", "37", "38", "39"])
199
+ return false unless chap3_status_code_validator.valid?(@chap3_status_code)
200
+ chap4_status_code_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"])
201
+ return false unless chap4_status_code_validator.valid?(@chap4_status_code)
176
202
  true
177
203
  end
178
204
 
205
+ # Custom attribute writer method checking allowed values (enum).
206
+ # @param [Object] chap3_status_code Object to be assigned
207
+ def chap3_status_code=(chap3_status_code)
208
+ validator = EnumAttributeValidator.new('String', ["01", "02", "34", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "35", "36", "37", "38", "39"])
209
+ unless validator.valid?(chap3_status_code)
210
+ fail ArgumentError, "invalid value for \"chap3_status_code\", must be one of #{validator.allowable_values}."
211
+ end
212
+ @chap3_status_code = chap3_status_code
213
+ end
214
+
215
+ # Custom attribute writer method checking allowed values (enum).
216
+ # @param [Object] chap4_status_code Object to be assigned
217
+ def chap4_status_code=(chap4_status_code)
218
+ validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"])
219
+ unless validator.valid?(chap4_status_code)
220
+ fail ArgumentError, "invalid value for \"chap4_status_code\", must be one of #{validator.allowable_values}."
221
+ end
222
+ @chap4_status_code = chap4_status_code
223
+ end
224
+
179
225
  # Checks equality by comparing each attribute.
180
226
  # @param [Object] Object to be compared
181
227
  def ==(o)