avalara_sdk 25.8.0 → 25.8.2

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 (185) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +32 -6
  4. data/docs/A1099/V2/BulkUpsert1099FormsRequest.md +4 -0
  5. data/docs/A1099/V2/CompaniesW9Api.md +6 -6
  6. data/docs/A1099/V2/CoveredIndividualRequest.md +26 -26
  7. data/docs/A1099/V2/Create1099Form201Response.md +4 -0
  8. data/docs/A1099/V2/ErrorResponse.md +1 -1
  9. data/docs/A1099/V2/ErrorResponseItem.md +20 -0
  10. data/docs/A1099/V2/Form1042S.md +140 -0
  11. data/docs/A1099/V2/Form1042SListItem.md +12 -8
  12. data/docs/A1099/V2/Form1042SListItemResponse.md +19 -9
  13. data/docs/A1099/V2/Form1042SRequest.md +14 -10
  14. data/docs/A1099/V2/Form1042SResponse.md +10 -6
  15. data/docs/A1099/V2/Form1095B.md +14 -2
  16. data/docs/A1099/V2/Form1095BListItem.md +14 -8
  17. data/docs/A1099/V2/Form1095BListItemResponse.md +20 -8
  18. data/docs/A1099/V2/Form1095BRequest.md +14 -8
  19. data/docs/A1099/V2/Form1095BResponse.md +106 -0
  20. data/docs/A1099/V2/Form1095CList.md +20 -0
  21. data/docs/A1099/V2/Form1095CListItem.md +90 -0
  22. data/docs/A1099/V2/Form1099Base.md +14 -2
  23. data/docs/A1099/V2/Form1099BaseResponse.md +20 -8
  24. data/docs/A1099/V2/Form1099Div.md +130 -0
  25. data/docs/A1099/V2/Form1099DivListItem.md +32 -28
  26. data/docs/A1099/V2/Form1099DivListItemResponse.md +130 -0
  27. data/docs/A1099/V2/Form1099DivRequest.md +32 -28
  28. data/docs/A1099/V2/Form1099DivResponse.md +48 -6
  29. data/docs/A1099/V2/Form1099Int.md +122 -0
  30. data/docs/A1099/V2/Form1099IntList.md +20 -0
  31. data/docs/A1099/V2/Form1099IntListItem.md +100 -0
  32. data/docs/A1099/V2/Form1099IntListItemResponse.md +122 -0
  33. data/docs/A1099/V2/Form1099IntRequest.md +96 -0
  34. data/docs/A1099/V2/Form1099IntResponse.md +120 -0
  35. data/docs/A1099/V2/Form1099K.md +14 -2
  36. data/docs/A1099/V2/Form1099KListItem.md +14 -8
  37. data/docs/A1099/V2/Form1099KListItemResponse.md +20 -8
  38. data/docs/A1099/V2/Form1099KRequest.md +18 -12
  39. data/docs/A1099/V2/Form1099KResponse.md +132 -0
  40. data/docs/A1099/V2/Form1099ListResponseValueInner.md +4 -0
  41. data/docs/A1099/V2/Form1099Misc.md +24 -12
  42. data/docs/A1099/V2/Form1099MiscListItem.md +14 -12
  43. data/docs/A1099/V2/Form1099MiscListItemResponse.md +30 -16
  44. data/docs/A1099/V2/Form1099MiscRequest.md +14 -12
  45. data/docs/A1099/V2/Form1099MiscResponse.md +12 -10
  46. data/docs/A1099/V2/Form1099Nec.md +14 -2
  47. data/docs/A1099/V2/Form1099NecListItem.md +14 -10
  48. data/docs/A1099/V2/Form1099NecListItemResponse.md +20 -8
  49. data/docs/A1099/V2/Form1099NecRequest.md +14 -10
  50. data/docs/A1099/V2/Form1099NecResponse.md +10 -8
  51. data/docs/A1099/V2/Form1099ProccessResult.md +3 -1
  52. data/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md +61 -0
  53. data/docs/A1099/V2/Form1099R.md +14 -4
  54. data/docs/A1099/V2/Form1099RListItem.md +12 -8
  55. data/docs/A1099/V2/Form1099RListItemResponse.md +20 -10
  56. data/docs/A1099/V2/Form1099RRequest.md +12 -8
  57. data/docs/A1099/V2/Form1099RResponse.md +132 -0
  58. data/docs/A1099/V2/FormRequestBase.md +14 -8
  59. data/docs/A1099/V2/FormRequestListItemBase.md +14 -8
  60. data/docs/A1099/V2/FormResponseBase.md +10 -6
  61. data/docs/A1099/V2/FormSingleRequestBase.md +14 -8
  62. data/docs/A1099/V2/Forms1099Api.md +11 -11
  63. data/docs/A1099/V2/FormsW9Api.md +21 -19
  64. data/docs/A1099/V2/Get1099Form200Response.md +4 -0
  65. data/docs/A1099/V2/ICreateForm1099Request.md +2 -0
  66. data/docs/A1099/V2/IUpdateForm1099Request.md +2 -0
  67. data/docs/A1099/V2/IrsResponse.md +20 -0
  68. data/docs/A1099/V2/Issuers1099Api.md +6 -6
  69. data/docs/A1099/V2/Jobs1099Api.md +1 -1
  70. data/docs/A1099/V2/OfferAndCoverageRequest.md +26 -0
  71. data/docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md +1 -1
  72. data/docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md +1 -1
  73. data/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md +22 -0
  74. data/docs/A1099/V2/TinMatchStatusResponse.md +22 -0
  75. data/docs/A1099/V2/Update1099Form200Response.md +8 -0
  76. data/docs/A1099/V2/W4FormResponse.md +1 -29
  77. data/docs/A1099/V2/W8BenEFormResponse.md +1 -29
  78. data/docs/A1099/V2/W8BenFormResponse.md +1 -29
  79. data/docs/A1099/V2/W8ImyFormResponse.md +1 -29
  80. data/docs/A1099/V2/W9FormBaseResponse.md +3 -3
  81. data/docs/A1099/V2/W9FormResponse.md +2 -28
  82. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +1 -1
  83. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +3 -3
  84. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +30 -14
  85. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +1 -1
  86. data/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb +1 -1
  87. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
  88. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
  89. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  90. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
  91. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
  92. data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
  93. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
  94. data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +2 -0
  95. data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +1 -1
  96. data/lib/avalara_sdk/models/A1099/V2/covered_individual_request.rb +79 -79
  97. data/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb +2 -0
  98. data/lib/avalara_sdk/models/A1099/V2/error_response.rb +1 -1
  99. data/lib/avalara_sdk/models/A1099/V2/error_response_item.rb +221 -0
  100. data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +824 -0
  101. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb +44 -119
  102. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item_response.rb +67 -12
  103. data/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb +55 -132
  104. data/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb +43 -24
  105. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +68 -9
  106. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +54 -119
  107. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item_response.rb +77 -12
  108. data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +56 -121
  109. data/lib/avalara_sdk/models/A1099/V2/form1095_b_response.rb +709 -0
  110. data/lib/avalara_sdk/models/A1099/V2/form1095_c_list.rb +238 -0
  111. data/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb +662 -0
  112. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +68 -9
  113. data/lib/avalara_sdk/models/A1099/V2/form1099_base_response.rb +77 -12
  114. data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +781 -0
  115. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +93 -147
  116. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb +931 -0
  117. data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +93 -149
  118. data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +214 -24
  119. data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +741 -0
  120. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb +238 -0
  121. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb +702 -0
  122. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb +887 -0
  123. data/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb +684 -0
  124. data/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb +773 -0
  125. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +68 -9
  126. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +56 -119
  127. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item_response.rb +77 -12
  128. data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +82 -123
  129. data/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb +839 -0
  130. data/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb +2 -0
  131. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +106 -47
  132. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +52 -135
  133. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item_response.rb +116 -40
  134. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +52 -137
  135. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +49 -39
  136. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +68 -9
  137. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +56 -129
  138. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item_response.rb +77 -12
  139. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +56 -131
  140. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +43 -33
  141. data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb +22 -4
  142. data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb +107 -0
  143. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +68 -19
  144. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +46 -119
  145. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb +77 -23
  146. data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +46 -121
  147. data/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb +839 -0
  148. data/lib/avalara_sdk/models/A1099/V2/form1099_status_detail.rb +1 -1
  149. data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +54 -119
  150. data/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb +56 -119
  151. data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +43 -24
  152. data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +56 -121
  153. data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +2 -0
  154. data/lib/avalara_sdk/models/A1099/V2/i_create_form1099_request.rb +1 -0
  155. data/lib/avalara_sdk/models/A1099/V2/i_update_form1099_request.rb +1 -0
  156. data/lib/avalara_sdk/models/A1099/V2/included_base.rb +1 -1
  157. data/lib/avalara_sdk/models/A1099/V2/irs_response.rb +221 -0
  158. data/lib/avalara_sdk/models/A1099/V2/issuer_command.rb +1 -0
  159. data/lib/avalara_sdk/models/A1099/V2/offer_and_coverage_request.rb +256 -0
  160. data/lib/avalara_sdk/models/A1099/V2/paginated_query_result_model_w9_form_base_response.rb +234 -0
  161. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb +1 -1
  162. data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail.rb +1 -1
  163. data/lib/avalara_sdk/models/A1099/V2/tin_match_status_response.rb +267 -0
  164. data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +4 -0
  165. data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +1 -1
  166. data/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb +15 -157
  167. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb +14 -156
  168. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb +15 -157
  169. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb +15 -157
  170. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +19 -14
  171. data/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb +18 -150
  172. data/lib/avalara_sdk/version.rb +1 -1
  173. data/lib/avalara_sdk.rb +21 -1
  174. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  175. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  176. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  177. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  178. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  179. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  180. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  181. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  182. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  183. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  184. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  185. metadata +42 -2
@@ -13,10 +13,13 @@ module AvalaraSdk::A1099::V2
13
13
  class Form1099ProccessResult
14
14
  attr_accessor :job_data
15
15
 
16
+ attr_accessor :processed_forms
17
+
16
18
  # Attribute mapping from ruby-style variable name to JSON key.
17
19
  def self.attribute_map
18
20
  {
19
- :'job_data' => :'jobData'
21
+ :'job_data' => :'jobData',
22
+ :'processed_forms' => :'processedForms'
20
23
  }
21
24
  end
22
25
 
@@ -28,13 +31,15 @@ module AvalaraSdk::A1099::V2
28
31
  # Attribute type mapping.
29
32
  def self.openapi_types
30
33
  {
31
- :'job_data' => :'Data'
34
+ :'job_data' => :'Data',
35
+ :'processed_forms' => :'Array<Form1099ProccessResultProcessedFormsInner>'
32
36
  }
33
37
  end
34
38
 
35
39
  # List of attributes with nullable: true
36
40
  def self.openapi_nullable
37
41
  Set.new([
42
+ :'processed_forms'
38
43
  ])
39
44
  end
40
45
 
@@ -56,6 +61,12 @@ module AvalaraSdk::A1099::V2
56
61
  if attributes.key?(:'job_data')
57
62
  self.job_data = attributes[:'job_data']
58
63
  end
64
+
65
+ if attributes.key?(:'processed_forms')
66
+ if (value = attributes[:'processed_forms']).is_a?(Array)
67
+ self.processed_forms = value
68
+ end
69
+ end
59
70
  end
60
71
 
61
72
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -73,12 +84,19 @@ module AvalaraSdk::A1099::V2
73
84
  true
74
85
  end
75
86
 
87
+ # Custom attribute writer method with validation
88
+ # @param [Object] processed_forms Value to be assigned
89
+ def processed_forms=(processed_forms)
90
+ @processed_forms = processed_forms
91
+ end
92
+
76
93
  # Checks equality by comparing each attribute.
77
94
  # @param [Object] Object to be compared
78
95
  def ==(o)
79
96
  return true if self.equal?(o)
80
97
  self.class == o.class &&
81
- job_data == o.job_data
98
+ job_data == o.job_data &&
99
+ processed_forms == o.processed_forms
82
100
  end
83
101
 
84
102
  # @see the `==` method
@@ -90,7 +108,7 @@ module AvalaraSdk::A1099::V2
90
108
  # Calculates hash code according to all attributes.
91
109
  # @return [Integer] Hash code
92
110
  def hash
93
- [job_data].hash
111
+ [job_data, processed_forms].hash
94
112
  end
95
113
 
96
114
  # Builds the object from hash
@@ -0,0 +1,107 @@
1
+ =begin
2
+ #Avalara 1099 & W-9 API Definition
3
+
4
+ ### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
5
+
6
+
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module AvalaraSdk::A1099::V2
13
+ module Form1099ProccessResultProcessedFormsInner
14
+ class << self
15
+ # List of class defined in oneOf (OpenAPI v3)
16
+ def openapi_one_of
17
+ [
18
+ :'Form1042S',
19
+ :'Form1095B',
20
+ :'Form1099Div',
21
+ :'Form1099Int',
22
+ :'Form1099K',
23
+ :'Form1099Misc',
24
+ :'Form1099Nec',
25
+ :'Form1099R'
26
+ ]
27
+ end
28
+
29
+ # Builds the object
30
+ # @param [Mixed] Data to be matched against the list of oneOf items
31
+ # @return [Object] Returns the model or the data itself
32
+ def build(data)
33
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
34
+ # Note:
35
+ # - We do not attempt to check whether exactly one item matches.
36
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
37
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
38
+ # - TODO: scalar values are de facto behaving as if they were nullable.
39
+ # - TODO: logging when debugging is set.
40
+ openapi_one_of.each do |klass|
41
+ begin
42
+ next if klass == :AnyType # "nullable: true"
43
+ typed_data = find_and_cast_into_type(klass, data)
44
+ return typed_data if typed_data
45
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
46
+ end
47
+ end
48
+
49
+ openapi_one_of.include?(:AnyType) ? data : nil
50
+ end
51
+
52
+ private
53
+
54
+ SchemaMismatchError = Class.new(StandardError)
55
+
56
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
57
+ def find_and_cast_into_type(klass, data)
58
+ return if data.nil?
59
+
60
+ case klass.to_s
61
+ when 'Boolean'
62
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
63
+ when 'Float'
64
+ return data if data.instance_of?(Float)
65
+ when 'Integer'
66
+ return data if data.instance_of?(Integer)
67
+ when 'Time'
68
+ return Time.parse(data)
69
+ when 'Date'
70
+ return Date.parse(data)
71
+ when 'String'
72
+ return data if data.instance_of?(String)
73
+ when 'Object' # "type: object"
74
+ return data if data.instance_of?(Hash)
75
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
76
+ if data.instance_of?(Array)
77
+ sub_type = Regexp.last_match[:sub_type]
78
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
79
+ end
80
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
81
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
82
+ sub_type = Regexp.last_match[:sub_type]
83
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
84
+ end
85
+ else # model
86
+ const = AvalaraSdk::A1099::V2.const_get(klass)
87
+ if const
88
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
89
+ model = const.build(data)
90
+ return model if model
91
+ else
92
+ # raise if data contains keys that are not known to the model
93
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
94
+ model = const.build_from_hash(data)
95
+ return model if model
96
+ end
97
+ end
98
+ end
99
+
100
+ raise # if no match by now, raise
101
+ rescue
102
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
103
+ end
104
+ end
105
+ end
106
+
107
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Avalara 1099 & W-9 API Definition
3
3
 
4
- ### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
4
+ ### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
5
5
 
6
6
 
7
7
  =end
@@ -47,8 +47,6 @@ module AvalaraSdk::A1099::V2
47
47
 
48
48
  attr_accessor :first_year_designated_roth_contrib
49
49
 
50
- attr_accessor :fatca_requirement_indicator
51
-
52
50
  attr_accessor :date_of_payment
53
51
 
54
52
  attr_accessor :id
@@ -83,14 +81,22 @@ module AvalaraSdk::A1099::V2
83
81
 
84
82
  attr_accessor :address_verification_status
85
83
 
84
+ attr_accessor :e_delivery_status
85
+
86
86
  attr_accessor :reference_id
87
87
 
88
88
  attr_accessor :email
89
89
 
90
90
  attr_accessor :tin_type
91
91
 
92
+ attr_accessor :fatca_filing_requirement
93
+
92
94
  attr_accessor :tin
93
95
 
96
+ attr_accessor :no_tin
97
+
98
+ attr_accessor :second_tin_notice
99
+
94
100
  attr_accessor :recipient_name
95
101
 
96
102
  attr_accessor :recipient_second_name
@@ -105,10 +111,14 @@ module AvalaraSdk::A1099::V2
105
111
 
106
112
  attr_accessor :zip
107
113
 
108
- attr_accessor :foreign_province
114
+ attr_accessor :non_us_province
109
115
 
110
116
  attr_accessor :country_code
111
117
 
118
+ attr_accessor :account_number
119
+
120
+ attr_accessor :office_code
121
+
112
122
  attr_accessor :validation_errors
113
123
 
114
124
  attr_accessor :created_at
@@ -138,7 +148,6 @@ module AvalaraSdk::A1099::V2
138
148
  :'total_employee_contributions' => :'totalEmployeeContributions',
139
149
  :'amount_allocable_to_irr' => :'amountAllocableToIrr',
140
150
  :'first_year_designated_roth_contrib' => :'firstYearDesignatedRothContrib',
141
- :'fatca_requirement_indicator' => :'fatcaRequirementIndicator',
142
151
  :'date_of_payment' => :'dateOfPayment',
143
152
  :'id' => :'id',
144
153
  :'type' => :'type',
@@ -156,10 +165,14 @@ module AvalaraSdk::A1099::V2
156
165
  :'tin_match_status' => :'tinMatchStatus',
157
166
  :'address_verification' => :'addressVerification',
158
167
  :'address_verification_status' => :'addressVerificationStatus',
168
+ :'e_delivery_status' => :'eDeliveryStatus',
159
169
  :'reference_id' => :'referenceId',
160
170
  :'email' => :'email',
161
171
  :'tin_type' => :'tinType',
172
+ :'fatca_filing_requirement' => :'fatcaFilingRequirement',
162
173
  :'tin' => :'tin',
174
+ :'no_tin' => :'noTin',
175
+ :'second_tin_notice' => :'secondTinNotice',
163
176
  :'recipient_name' => :'recipientName',
164
177
  :'recipient_second_name' => :'recipientSecondName',
165
178
  :'address' => :'address',
@@ -167,8 +180,10 @@ module AvalaraSdk::A1099::V2
167
180
  :'city' => :'city',
168
181
  :'state' => :'state',
169
182
  :'zip' => :'zip',
170
- :'foreign_province' => :'foreignProvince',
183
+ :'non_us_province' => :'nonUsProvince',
171
184
  :'country_code' => :'countryCode',
185
+ :'account_number' => :'accountNumber',
186
+ :'office_code' => :'officeCode',
172
187
  :'validation_errors' => :'validationErrors',
173
188
  :'created_at' => :'createdAt',
174
189
  :'updated_at' => :'updatedAt',
@@ -202,7 +217,6 @@ module AvalaraSdk::A1099::V2
202
217
  :'total_employee_contributions' => :'Float',
203
218
  :'amount_allocable_to_irr' => :'Float',
204
219
  :'first_year_designated_roth_contrib' => :'String',
205
- :'fatca_requirement_indicator' => :'Boolean',
206
220
  :'date_of_payment' => :'String',
207
221
  :'id' => :'String',
208
222
  :'type' => :'String',
@@ -220,10 +234,14 @@ module AvalaraSdk::A1099::V2
220
234
  :'tin_match_status' => :'Form1099StatusDetail',
221
235
  :'address_verification' => :'Boolean',
222
236
  :'address_verification_status' => :'Form1099StatusDetail',
237
+ :'e_delivery_status' => :'Form1099StatusDetail',
223
238
  :'reference_id' => :'String',
224
239
  :'email' => :'String',
225
240
  :'tin_type' => :'String',
241
+ :'fatca_filing_requirement' => :'Boolean',
226
242
  :'tin' => :'String',
243
+ :'no_tin' => :'Boolean',
244
+ :'second_tin_notice' => :'Boolean',
227
245
  :'recipient_name' => :'String',
228
246
  :'recipient_second_name' => :'String',
229
247
  :'address' => :'String',
@@ -231,8 +249,10 @@ module AvalaraSdk::A1099::V2
231
249
  :'city' => :'String',
232
250
  :'state' => :'String',
233
251
  :'zip' => :'String',
234
- :'foreign_province' => :'String',
252
+ :'non_us_province' => :'String',
235
253
  :'country_code' => :'String',
254
+ :'account_number' => :'String',
255
+ :'office_code' => :'String',
236
256
  :'validation_errors' => :'Array<ValidationError>',
237
257
  :'created_at' => :'Time',
238
258
  :'updated_at' => :'Time',
@@ -261,7 +281,6 @@ module AvalaraSdk::A1099::V2
261
281
  :'total_employee_contributions',
262
282
  :'amount_allocable_to_irr',
263
283
  :'first_year_designated_roth_contrib',
264
- :'fatca_requirement_indicator',
265
284
  :'date_of_payment',
266
285
  :'issuer_reference_id',
267
286
  :'issuer_tin',
@@ -269,10 +288,13 @@ module AvalaraSdk::A1099::V2
269
288
  :'postal_mail_status',
270
289
  :'tin_match_status',
271
290
  :'address_verification_status',
291
+ :'e_delivery_status',
272
292
  :'reference_id',
273
293
  :'email',
274
294
  :'tin_type',
295
+ :'fatca_filing_requirement',
275
296
  :'tin',
297
+ :'second_tin_notice',
276
298
  :'recipient_name',
277
299
  :'recipient_second_name',
278
300
  :'address',
@@ -280,8 +302,10 @@ module AvalaraSdk::A1099::V2
280
302
  :'city',
281
303
  :'state',
282
304
  :'zip',
283
- :'foreign_province',
305
+ :'non_us_province',
284
306
  :'country_code',
307
+ :'account_number',
308
+ :'office_code',
285
309
  :'validation_errors',
286
310
  :'state_and_local_withholding'
287
311
  ])
@@ -381,10 +405,6 @@ module AvalaraSdk::A1099::V2
381
405
  self.first_year_designated_roth_contrib = attributes[:'first_year_designated_roth_contrib']
382
406
  end
383
407
 
384
- if attributes.key?(:'fatca_requirement_indicator')
385
- self.fatca_requirement_indicator = attributes[:'fatca_requirement_indicator']
386
- end
387
-
388
408
  if attributes.key?(:'date_of_payment')
389
409
  self.date_of_payment = attributes[:'date_of_payment']
390
410
  end
@@ -455,6 +475,10 @@ module AvalaraSdk::A1099::V2
455
475
  self.address_verification_status = attributes[:'address_verification_status']
456
476
  end
457
477
 
478
+ if attributes.key?(:'e_delivery_status')
479
+ self.e_delivery_status = attributes[:'e_delivery_status']
480
+ end
481
+
458
482
  if attributes.key?(:'reference_id')
459
483
  self.reference_id = attributes[:'reference_id']
460
484
  end
@@ -467,10 +491,22 @@ module AvalaraSdk::A1099::V2
467
491
  self.tin_type = attributes[:'tin_type']
468
492
  end
469
493
 
494
+ if attributes.key?(:'fatca_filing_requirement')
495
+ self.fatca_filing_requirement = attributes[:'fatca_filing_requirement']
496
+ end
497
+
470
498
  if attributes.key?(:'tin')
471
499
  self.tin = attributes[:'tin']
472
500
  end
473
501
 
502
+ if attributes.key?(:'no_tin')
503
+ self.no_tin = attributes[:'no_tin']
504
+ end
505
+
506
+ if attributes.key?(:'second_tin_notice')
507
+ self.second_tin_notice = attributes[:'second_tin_notice']
508
+ end
509
+
474
510
  if attributes.key?(:'recipient_name')
475
511
  self.recipient_name = attributes[:'recipient_name']
476
512
  end
@@ -499,14 +535,22 @@ module AvalaraSdk::A1099::V2
499
535
  self.zip = attributes[:'zip']
500
536
  end
501
537
 
502
- if attributes.key?(:'foreign_province')
503
- self.foreign_province = attributes[:'foreign_province']
538
+ if attributes.key?(:'non_us_province')
539
+ self.non_us_province = attributes[:'non_us_province']
504
540
  end
505
541
 
506
542
  if attributes.key?(:'country_code')
507
543
  self.country_code = attributes[:'country_code']
508
544
  end
509
545
 
546
+ if attributes.key?(:'account_number')
547
+ self.account_number = attributes[:'account_number']
548
+ end
549
+
550
+ if attributes.key?(:'office_code')
551
+ self.office_code = attributes[:'office_code']
552
+ end
553
+
510
554
  if attributes.key?(:'validation_errors')
511
555
  if (value = attributes[:'validation_errors']).is_a?(Array)
512
556
  self.validation_errors = value
@@ -576,7 +620,6 @@ module AvalaraSdk::A1099::V2
576
620
  total_employee_contributions == o.total_employee_contributions &&
577
621
  amount_allocable_to_irr == o.amount_allocable_to_irr &&
578
622
  first_year_designated_roth_contrib == o.first_year_designated_roth_contrib &&
579
- fatca_requirement_indicator == o.fatca_requirement_indicator &&
580
623
  date_of_payment == o.date_of_payment &&
581
624
  id == o.id &&
582
625
  type == o.type &&
@@ -594,10 +637,14 @@ module AvalaraSdk::A1099::V2
594
637
  tin_match_status == o.tin_match_status &&
595
638
  address_verification == o.address_verification &&
596
639
  address_verification_status == o.address_verification_status &&
640
+ e_delivery_status == o.e_delivery_status &&
597
641
  reference_id == o.reference_id &&
598
642
  email == o.email &&
599
643
  tin_type == o.tin_type &&
644
+ fatca_filing_requirement == o.fatca_filing_requirement &&
600
645
  tin == o.tin &&
646
+ no_tin == o.no_tin &&
647
+ second_tin_notice == o.second_tin_notice &&
601
648
  recipient_name == o.recipient_name &&
602
649
  recipient_second_name == o.recipient_second_name &&
603
650
  address == o.address &&
@@ -605,8 +652,10 @@ module AvalaraSdk::A1099::V2
605
652
  city == o.city &&
606
653
  state == o.state &&
607
654
  zip == o.zip &&
608
- foreign_province == o.foreign_province &&
655
+ non_us_province == o.non_us_province &&
609
656
  country_code == o.country_code &&
657
+ account_number == o.account_number &&
658
+ office_code == o.office_code &&
610
659
  validation_errors == o.validation_errors &&
611
660
  created_at == o.created_at &&
612
661
  updated_at == o.updated_at &&
@@ -622,7 +671,7 @@ module AvalaraSdk::A1099::V2
622
671
  # Calculates hash code according to all attributes.
623
672
  # @return [Integer] Hash code
624
673
  def hash
625
- [gross_distributions, taxable_amount, taxable_amount_not_determined, total_distribution_indicator, capital_gain, fed_income_tax_withheld, employee_contributions, net_unrealized_appreciation, distribution_code_required, distribution_code_optional, ira_sep_simple_indicator, total_ira_sep_simple_distribution, other, other_percent, percentage_total_distribution, total_employee_contributions, amount_allocable_to_irr, first_year_designated_roth_contrib, fatca_requirement_indicator, date_of_payment, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash
674
+ [gross_distributions, taxable_amount, taxable_amount_not_determined, total_distribution_indicator, capital_gain, fed_income_tax_withheld, employee_contributions, net_unrealized_appreciation, distribution_code_required, distribution_code_optional, ira_sep_simple_indicator, total_ira_sep_simple_distribution, other, other_percent, percentage_total_distribution, total_employee_contributions, amount_allocable_to_irr, first_year_designated_roth_contrib, date_of_payment, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash
626
675
  end
627
676
 
628
677
  # Builds the object from hash