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
@@ -0,0 +1,234 @@
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
+ # Generic paginated model to wrap query response data
14
+ class PaginatedQueryResultModelW9FormBaseResponse
15
+ attr_accessor :recordset_count
16
+
17
+ attr_accessor :value
18
+
19
+ attr_accessor :next_link
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'recordset_count' => :'@recordsetCount',
25
+ :'value' => :'value',
26
+ :'next_link' => :'@nextLink'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'recordset_count' => :'Integer',
39
+ :'value' => :'Array<CreateW9Form201Response>',
40
+ :'next_link' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ :'recordset_count',
48
+ :'value',
49
+ :'next_link'
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::PaginatedQueryResultModelW9FormBaseResponse` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::PaginatedQueryResultModelW9FormBaseResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'recordset_count')
69
+ self.recordset_count = attributes[:'recordset_count']
70
+ end
71
+
72
+ if attributes.key?(:'value')
73
+ if (value = attributes[:'value']).is_a?(Array)
74
+ self.value = value
75
+ end
76
+ end
77
+
78
+ if attributes.key?(:'next_link')
79
+ self.next_link = attributes[:'next_link']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ recordset_count == o.recordset_count &&
104
+ value == o.value &&
105
+ next_link == o.next_link
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [recordset_count, value, next_link].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ attributes = attributes.transform_keys(&:to_sym)
126
+ transformed_hash = {}
127
+ openapi_types.each_pair do |key, type|
128
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
130
+ elsif type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[attribute_map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
135
+ end
136
+ elsif !attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
138
+ end
139
+ end
140
+ new(transformed_hash)
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def self._deserialize(type, value)
148
+ case type.to_sym
149
+ when :Time
150
+ Time.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ # models (e.g. Pet) or oneOf
181
+ klass = AvalaraSdk::A1099::V2.const_get(type)
182
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ 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
@@ -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
@@ -0,0 +1,267 @@
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
+ class TinMatchStatusResponse
14
+ # The current timestamp for the TIN match request.
15
+ attr_accessor :time
16
+
17
+ # The current status for the TIN match request.
18
+ attr_accessor :status
19
+
20
+ # The IRS response.
21
+ attr_accessor :irs_response
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'time' => :'time',
49
+ :'status' => :'status',
50
+ :'irs_response' => :'irsResponse'
51
+ }
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'time' => :'Time',
63
+ :'status' => :'String',
64
+ :'irs_response' => :'IrsResponse'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ :'time',
72
+ :'irs_response'
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::TinMatchStatusResponse` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::TinMatchStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'time')
92
+ self.time = attributes[:'time']
93
+ end
94
+
95
+ if attributes.key?(:'status')
96
+ self.status = attributes[:'status']
97
+ end
98
+
99
+ if attributes.key?(:'irs_response')
100
+ self.irs_response = attributes[:'irs_response']
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
108
+ invalid_properties = Array.new
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ warn '[DEPRECATED] the `valid?` method is obsolete'
116
+ status_validator = EnumAttributeValidator.new('String', ["None", "Pending", "Matched", "Failed"])
117
+ return false unless status_validator.valid?(@status)
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method checking allowed values (enum).
122
+ # @param [Object] status Object to be assigned
123
+ def status=(status)
124
+ validator = EnumAttributeValidator.new('String', ["None", "Pending", "Matched", "Failed"])
125
+ unless validator.valid?(status)
126
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
127
+ end
128
+ @status = status
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ time == o.time &&
137
+ status == o.status &&
138
+ irs_response == o.irs_response
139
+ end
140
+
141
+ # @see the `==` method
142
+ # @param [Object] Object to be compared
143
+ def eql?(o)
144
+ self == o
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ def hash
150
+ [time, status, irs_response].hash
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def self.build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ attributes = attributes.transform_keys(&:to_sym)
159
+ transformed_hash = {}
160
+ openapi_types.each_pair do |key, type|
161
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = nil
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[attribute_map[key]].is_a?(Array)
167
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
168
+ end
169
+ elsif !attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
171
+ end
172
+ end
173
+ new(transformed_hash)
174
+ end
175
+
176
+ # Deserializes the data based on type
177
+ # @param string type Data type
178
+ # @param string value Value to be deserialized
179
+ # @return [Object] Deserialized data
180
+ def self._deserialize(type, value)
181
+ case type.to_sym
182
+ when :Time
183
+ Time.parse(value)
184
+ when :Date
185
+ Date.parse(value)
186
+ when :String
187
+ value.to_s
188
+ when :Integer
189
+ value.to_i
190
+ when :Float
191
+ value.to_f
192
+ when :Boolean
193
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
194
+ true
195
+ else
196
+ false
197
+ end
198
+ when :Object
199
+ # generic object (usually a Hash), return directly
200
+ value
201
+ when /\AArray<(?<inner_type>.+)>\z/
202
+ inner_type = Regexp.last_match[:inner_type]
203
+ value.map { |v| _deserialize(inner_type, v) }
204
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
205
+ k_type = Regexp.last_match[:k_type]
206
+ v_type = Regexp.last_match[:v_type]
207
+ {}.tap do |hash|
208
+ value.each do |k, v|
209
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
210
+ end
211
+ end
212
+ else # model
213
+ # models (e.g. Pet) or oneOf
214
+ klass = AvalaraSdk::A1099::V2.const_get(type)
215
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
216
+ end
217
+ end
218
+
219
+ # Returns the string representation of the object
220
+ # @return [String] String presentation of the object
221
+ def to_s
222
+ to_hash.to_s
223
+ end
224
+
225
+ # to_body is an alias to to_hash (backward compatibility)
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_body
228
+ to_hash
229
+ end
230
+
231
+ # Returns the object in the form of hash
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_hash
234
+ hash = {}
235
+ self.class.attribute_map.each_pair do |attr, param|
236
+ value = self.send(attr)
237
+ if value.nil?
238
+ is_nullable = self.class.openapi_nullable.include?(attr)
239
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
+ end
241
+
242
+ hash[param] = _to_hash(value)
243
+ end
244
+ hash
245
+ end
246
+
247
+ # Outputs non-array value in the form of hash
248
+ # For object, use to_hash. Otherwise, just return the value
249
+ # @param [Object] value Any valid value
250
+ # @return [Hash] Returns the value in the form of hash
251
+ def _to_hash(value)
252
+ if value.is_a?(Array)
253
+ value.compact.map { |v| _to_hash(v) }
254
+ elsif value.is_a?(Hash)
255
+ {}.tap do |hash|
256
+ value.each { |k, v| hash[k] = _to_hash(v) }
257
+ end
258
+ elsif value.respond_to? :to_hash
259
+ value.to_hash
260
+ else
261
+ value
262
+ end
263
+ end
264
+
265
+ end
266
+
267
+ end
@@ -16,9 +16,13 @@ module AvalaraSdk::A1099::V2
16
16
  def openapi_one_of
17
17
  [
18
18
  :'Form1042SResponse',
19
+ :'Form1095BResponse',
19
20
  :'Form1099DivResponse',
21
+ :'Form1099IntResponse',
22
+ :'Form1099KResponse',
20
23
  :'Form1099MiscResponse',
21
24
  :'Form1099NecResponse',
25
+ :'Form1099RResponse',
22
26
  :'FormResponseBase'
23
27
  ]
24
28
  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