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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +32 -6
- data/docs/A1099/V2/BulkUpsert1099FormsRequest.md +4 -0
- data/docs/A1099/V2/CompaniesW9Api.md +6 -6
- data/docs/A1099/V2/CoveredIndividualRequest.md +26 -26
- data/docs/A1099/V2/Create1099Form201Response.md +4 -0
- data/docs/A1099/V2/ErrorResponse.md +1 -1
- data/docs/A1099/V2/ErrorResponseItem.md +20 -0
- data/docs/A1099/V2/Form1042S.md +140 -0
- data/docs/A1099/V2/Form1042SListItem.md +12 -8
- data/docs/A1099/V2/Form1042SListItemResponse.md +19 -9
- data/docs/A1099/V2/Form1042SRequest.md +14 -10
- data/docs/A1099/V2/Form1042SResponse.md +10 -6
- data/docs/A1099/V2/Form1095B.md +14 -2
- data/docs/A1099/V2/Form1095BListItem.md +14 -8
- data/docs/A1099/V2/Form1095BListItemResponse.md +20 -8
- data/docs/A1099/V2/Form1095BRequest.md +14 -8
- data/docs/A1099/V2/Form1095BResponse.md +106 -0
- data/docs/A1099/V2/Form1095CList.md +20 -0
- data/docs/A1099/V2/Form1095CListItem.md +90 -0
- data/docs/A1099/V2/Form1099Base.md +14 -2
- data/docs/A1099/V2/Form1099BaseResponse.md +20 -8
- data/docs/A1099/V2/Form1099Div.md +130 -0
- data/docs/A1099/V2/Form1099DivListItem.md +32 -28
- data/docs/A1099/V2/Form1099DivListItemResponse.md +130 -0
- data/docs/A1099/V2/Form1099DivRequest.md +32 -28
- data/docs/A1099/V2/Form1099DivResponse.md +48 -6
- data/docs/A1099/V2/Form1099Int.md +122 -0
- data/docs/A1099/V2/Form1099IntList.md +20 -0
- data/docs/A1099/V2/Form1099IntListItem.md +100 -0
- data/docs/A1099/V2/Form1099IntListItemResponse.md +122 -0
- data/docs/A1099/V2/Form1099IntRequest.md +96 -0
- data/docs/A1099/V2/Form1099IntResponse.md +120 -0
- data/docs/A1099/V2/Form1099K.md +14 -2
- data/docs/A1099/V2/Form1099KListItem.md +14 -8
- data/docs/A1099/V2/Form1099KListItemResponse.md +20 -8
- data/docs/A1099/V2/Form1099KRequest.md +18 -12
- data/docs/A1099/V2/Form1099KResponse.md +132 -0
- data/docs/A1099/V2/Form1099ListResponseValueInner.md +4 -0
- data/docs/A1099/V2/Form1099Misc.md +24 -12
- data/docs/A1099/V2/Form1099MiscListItem.md +14 -12
- data/docs/A1099/V2/Form1099MiscListItemResponse.md +30 -16
- data/docs/A1099/V2/Form1099MiscRequest.md +14 -12
- data/docs/A1099/V2/Form1099MiscResponse.md +12 -10
- data/docs/A1099/V2/Form1099Nec.md +14 -2
- data/docs/A1099/V2/Form1099NecListItem.md +14 -10
- data/docs/A1099/V2/Form1099NecListItemResponse.md +20 -8
- data/docs/A1099/V2/Form1099NecRequest.md +14 -10
- data/docs/A1099/V2/Form1099NecResponse.md +10 -8
- data/docs/A1099/V2/Form1099ProccessResult.md +3 -1
- data/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md +61 -0
- data/docs/A1099/V2/Form1099R.md +14 -4
- data/docs/A1099/V2/Form1099RListItem.md +12 -8
- data/docs/A1099/V2/Form1099RListItemResponse.md +20 -10
- data/docs/A1099/V2/Form1099RRequest.md +12 -8
- data/docs/A1099/V2/Form1099RResponse.md +132 -0
- data/docs/A1099/V2/FormRequestBase.md +14 -8
- data/docs/A1099/V2/FormRequestListItemBase.md +14 -8
- data/docs/A1099/V2/FormResponseBase.md +10 -6
- data/docs/A1099/V2/FormSingleRequestBase.md +14 -8
- data/docs/A1099/V2/Forms1099Api.md +11 -11
- data/docs/A1099/V2/FormsW9Api.md +21 -19
- data/docs/A1099/V2/Get1099Form200Response.md +4 -0
- data/docs/A1099/V2/ICreateForm1099Request.md +2 -0
- data/docs/A1099/V2/IUpdateForm1099Request.md +2 -0
- data/docs/A1099/V2/IrsResponse.md +20 -0
- data/docs/A1099/V2/Issuers1099Api.md +6 -6
- data/docs/A1099/V2/Jobs1099Api.md +1 -1
- data/docs/A1099/V2/OfferAndCoverageRequest.md +26 -0
- data/docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md +1 -1
- data/docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md +1 -1
- data/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md +22 -0
- data/docs/A1099/V2/TinMatchStatusResponse.md +22 -0
- data/docs/A1099/V2/Update1099Form200Response.md +8 -0
- data/docs/A1099/V2/W4FormResponse.md +1 -29
- data/docs/A1099/V2/W8BenEFormResponse.md +1 -29
- data/docs/A1099/V2/W8BenFormResponse.md +1 -29
- data/docs/A1099/V2/W8ImyFormResponse.md +1 -29
- data/docs/A1099/V2/W9FormBaseResponse.md +3 -3
- data/docs/A1099/V2/W9FormResponse.md +2 -28
- data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +1 -1
- data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +3 -3
- data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +30 -14
- data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +1 -1
- data/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +2 -0
- data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/covered_individual_request.rb +79 -79
- data/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb +2 -0
- data/lib/avalara_sdk/models/A1099/V2/error_response.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/error_response_item.rb +221 -0
- data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +824 -0
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb +44 -119
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item_response.rb +67 -12
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb +55 -132
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb +43 -24
- data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +68 -9
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +54 -119
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item_response.rb +77 -12
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +56 -121
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_response.rb +709 -0
- data/lib/avalara_sdk/models/A1099/V2/form1095_c_list.rb +238 -0
- data/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb +662 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +68 -9
- data/lib/avalara_sdk/models/A1099/V2/form1099_base_response.rb +77 -12
- data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +781 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +93 -147
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb +931 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +93 -149
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +214 -24
- data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +741 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb +238 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb +702 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb +887 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb +684 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb +773 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +68 -9
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +56 -119
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item_response.rb +77 -12
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +82 -123
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb +839 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb +2 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +106 -47
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +52 -135
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item_response.rb +116 -40
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +52 -137
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +49 -39
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +68 -9
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +56 -129
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item_response.rb +77 -12
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +56 -131
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +43 -33
- data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb +22 -4
- data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb +107 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +68 -19
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +46 -119
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb +77 -23
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +46 -121
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb +839 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_status_detail.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +54 -119
- data/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb +56 -119
- data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +43 -24
- data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +56 -121
- data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +2 -0
- data/lib/avalara_sdk/models/A1099/V2/i_create_form1099_request.rb +1 -0
- data/lib/avalara_sdk/models/A1099/V2/i_update_form1099_request.rb +1 -0
- data/lib/avalara_sdk/models/A1099/V2/included_base.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/irs_response.rb +221 -0
- data/lib/avalara_sdk/models/A1099/V2/issuer_command.rb +1 -0
- data/lib/avalara_sdk/models/A1099/V2/offer_and_coverage_request.rb +256 -0
- data/lib/avalara_sdk/models/A1099/V2/paginated_query_result_model_w9_form_base_response.rb +234 -0
- data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/tin_match_status_response.rb +267 -0
- data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +4 -0
- data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb +15 -157
- data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb +14 -156
- data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb +15 -157
- data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb +15 -157
- data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +19 -14
- data/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb +18 -150
- data/lib/avalara_sdk/version.rb +1 -1
- data/lib/avalara_sdk.rb +21 -1
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
- metadata +42 -2
@@ -0,0 +1,839 @@
|
|
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 Form1099KResponse
|
14
|
+
attr_accessor :filer_type
|
15
|
+
|
16
|
+
attr_accessor :payment_type
|
17
|
+
|
18
|
+
attr_accessor :payment_settlement_entity_name_phone_number
|
19
|
+
|
20
|
+
attr_accessor :gross_amount_payment_card
|
21
|
+
|
22
|
+
attr_accessor :card_not_present_transactions
|
23
|
+
|
24
|
+
attr_accessor :merchant_category_code
|
25
|
+
|
26
|
+
attr_accessor :payment_transaction_number
|
27
|
+
|
28
|
+
attr_accessor :federal_income_tax_withheld
|
29
|
+
|
30
|
+
attr_accessor :january
|
31
|
+
|
32
|
+
attr_accessor :february
|
33
|
+
|
34
|
+
attr_accessor :march
|
35
|
+
|
36
|
+
attr_accessor :april
|
37
|
+
|
38
|
+
attr_accessor :may
|
39
|
+
|
40
|
+
attr_accessor :june
|
41
|
+
|
42
|
+
attr_accessor :july
|
43
|
+
|
44
|
+
attr_accessor :august
|
45
|
+
|
46
|
+
attr_accessor :sept
|
47
|
+
|
48
|
+
attr_accessor :october
|
49
|
+
|
50
|
+
attr_accessor :november
|
51
|
+
|
52
|
+
attr_accessor :december
|
53
|
+
|
54
|
+
attr_accessor :type
|
55
|
+
|
56
|
+
attr_accessor :created_at
|
57
|
+
|
58
|
+
attr_accessor :updated_at
|
59
|
+
|
60
|
+
attr_accessor :state_and_local_withholding
|
61
|
+
|
62
|
+
attr_accessor :tin_type
|
63
|
+
|
64
|
+
attr_accessor :id
|
65
|
+
|
66
|
+
attr_accessor :issuer_id
|
67
|
+
|
68
|
+
attr_accessor :issuer_reference_id
|
69
|
+
|
70
|
+
attr_accessor :issuer_tin
|
71
|
+
|
72
|
+
attr_accessor :tax_year
|
73
|
+
|
74
|
+
attr_accessor :reference_id
|
75
|
+
|
76
|
+
attr_accessor :recipient_name
|
77
|
+
|
78
|
+
attr_accessor :recipient_tin
|
79
|
+
|
80
|
+
attr_accessor :recipient_second_name
|
81
|
+
|
82
|
+
attr_accessor :address
|
83
|
+
|
84
|
+
attr_accessor :address2
|
85
|
+
|
86
|
+
attr_accessor :city
|
87
|
+
|
88
|
+
attr_accessor :state
|
89
|
+
|
90
|
+
attr_accessor :zip
|
91
|
+
|
92
|
+
attr_accessor :email
|
93
|
+
|
94
|
+
attr_accessor :account_number
|
95
|
+
|
96
|
+
attr_accessor :office_code
|
97
|
+
|
98
|
+
attr_accessor :non_us_province
|
99
|
+
|
100
|
+
attr_accessor :country_code
|
101
|
+
|
102
|
+
attr_accessor :federal_e_file
|
103
|
+
|
104
|
+
attr_accessor :postal_mail
|
105
|
+
|
106
|
+
attr_accessor :state_e_file
|
107
|
+
|
108
|
+
attr_accessor :tin_match
|
109
|
+
|
110
|
+
attr_accessor :no_tin
|
111
|
+
|
112
|
+
attr_accessor :second_tin_notice
|
113
|
+
|
114
|
+
attr_accessor :address_verification
|
115
|
+
|
116
|
+
attr_accessor :federal_efile_status
|
117
|
+
|
118
|
+
attr_accessor :e_delivery_status
|
119
|
+
|
120
|
+
attr_accessor :state_efile_status
|
121
|
+
|
122
|
+
attr_accessor :postal_mail_status
|
123
|
+
|
124
|
+
attr_accessor :tin_match_status
|
125
|
+
|
126
|
+
attr_accessor :address_verification_status
|
127
|
+
|
128
|
+
attr_accessor :validation_errors
|
129
|
+
|
130
|
+
class EnumAttributeValidator
|
131
|
+
attr_reader :datatype
|
132
|
+
attr_reader :allowable_values
|
133
|
+
|
134
|
+
def initialize(datatype, allowable_values)
|
135
|
+
@allowable_values = allowable_values.map do |value|
|
136
|
+
case datatype.to_s
|
137
|
+
when /Integer/i
|
138
|
+
value.to_i
|
139
|
+
when /Float/i
|
140
|
+
value.to_f
|
141
|
+
else
|
142
|
+
value
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def valid?(value)
|
148
|
+
!value || allowable_values.include?(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
153
|
+
def self.attribute_map
|
154
|
+
{
|
155
|
+
:'filer_type' => :'filerType',
|
156
|
+
:'payment_type' => :'paymentType',
|
157
|
+
:'payment_settlement_entity_name_phone_number' => :'paymentSettlementEntityNamePhoneNumber',
|
158
|
+
:'gross_amount_payment_card' => :'grossAmountPaymentCard',
|
159
|
+
:'card_not_present_transactions' => :'cardNotPresentTransactions',
|
160
|
+
:'merchant_category_code' => :'merchantCategoryCode',
|
161
|
+
:'payment_transaction_number' => :'paymentTransactionNumber',
|
162
|
+
:'federal_income_tax_withheld' => :'federalIncomeTaxWithheld',
|
163
|
+
:'january' => :'january',
|
164
|
+
:'february' => :'february',
|
165
|
+
:'march' => :'march',
|
166
|
+
:'april' => :'april',
|
167
|
+
:'may' => :'may',
|
168
|
+
:'june' => :'june',
|
169
|
+
:'july' => :'july',
|
170
|
+
:'august' => :'august',
|
171
|
+
:'sept' => :'sept',
|
172
|
+
:'october' => :'october',
|
173
|
+
:'november' => :'november',
|
174
|
+
:'december' => :'december',
|
175
|
+
:'type' => :'type',
|
176
|
+
:'created_at' => :'createdAt',
|
177
|
+
:'updated_at' => :'updatedAt',
|
178
|
+
:'state_and_local_withholding' => :'stateAndLocalWithholding',
|
179
|
+
:'tin_type' => :'tinType',
|
180
|
+
:'id' => :'id',
|
181
|
+
:'issuer_id' => :'issuerId',
|
182
|
+
:'issuer_reference_id' => :'issuerReferenceId',
|
183
|
+
:'issuer_tin' => :'issuerTin',
|
184
|
+
:'tax_year' => :'taxYear',
|
185
|
+
:'reference_id' => :'referenceId',
|
186
|
+
:'recipient_name' => :'recipientName',
|
187
|
+
:'recipient_tin' => :'recipientTin',
|
188
|
+
:'recipient_second_name' => :'recipientSecondName',
|
189
|
+
:'address' => :'address',
|
190
|
+
:'address2' => :'address2',
|
191
|
+
:'city' => :'city',
|
192
|
+
:'state' => :'state',
|
193
|
+
:'zip' => :'zip',
|
194
|
+
:'email' => :'email',
|
195
|
+
:'account_number' => :'accountNumber',
|
196
|
+
:'office_code' => :'officeCode',
|
197
|
+
:'non_us_province' => :'nonUsProvince',
|
198
|
+
:'country_code' => :'countryCode',
|
199
|
+
:'federal_e_file' => :'federalEFile',
|
200
|
+
:'postal_mail' => :'postalMail',
|
201
|
+
:'state_e_file' => :'stateEFile',
|
202
|
+
:'tin_match' => :'tinMatch',
|
203
|
+
:'no_tin' => :'noTin',
|
204
|
+
:'second_tin_notice' => :'secondTinNotice',
|
205
|
+
:'address_verification' => :'addressVerification',
|
206
|
+
:'federal_efile_status' => :'federalEfileStatus',
|
207
|
+
:'e_delivery_status' => :'eDeliveryStatus',
|
208
|
+
:'state_efile_status' => :'stateEfileStatus',
|
209
|
+
:'postal_mail_status' => :'postalMailStatus',
|
210
|
+
:'tin_match_status' => :'tinMatchStatus',
|
211
|
+
:'address_verification_status' => :'addressVerificationStatus',
|
212
|
+
:'validation_errors' => :'validationErrors'
|
213
|
+
}
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns all the JSON keys this model knows about
|
217
|
+
def self.acceptable_attributes
|
218
|
+
attribute_map.values
|
219
|
+
end
|
220
|
+
|
221
|
+
# Attribute type mapping.
|
222
|
+
def self.openapi_types
|
223
|
+
{
|
224
|
+
:'filer_type' => :'String',
|
225
|
+
:'payment_type' => :'String',
|
226
|
+
:'payment_settlement_entity_name_phone_number' => :'String',
|
227
|
+
:'gross_amount_payment_card' => :'Float',
|
228
|
+
:'card_not_present_transactions' => :'Float',
|
229
|
+
:'merchant_category_code' => :'String',
|
230
|
+
:'payment_transaction_number' => :'Float',
|
231
|
+
:'federal_income_tax_withheld' => :'Float',
|
232
|
+
:'january' => :'Float',
|
233
|
+
:'february' => :'Float',
|
234
|
+
:'march' => :'Float',
|
235
|
+
:'april' => :'Float',
|
236
|
+
:'may' => :'Float',
|
237
|
+
:'june' => :'Float',
|
238
|
+
:'july' => :'Float',
|
239
|
+
:'august' => :'Float',
|
240
|
+
:'sept' => :'Float',
|
241
|
+
:'october' => :'Float',
|
242
|
+
:'november' => :'Float',
|
243
|
+
:'december' => :'Float',
|
244
|
+
:'type' => :'String',
|
245
|
+
:'created_at' => :'Time',
|
246
|
+
:'updated_at' => :'Time',
|
247
|
+
:'state_and_local_withholding' => :'StateAndLocalWithholdingResponse',
|
248
|
+
:'tin_type' => :'String',
|
249
|
+
:'id' => :'String',
|
250
|
+
:'issuer_id' => :'String',
|
251
|
+
:'issuer_reference_id' => :'String',
|
252
|
+
:'issuer_tin' => :'String',
|
253
|
+
:'tax_year' => :'Integer',
|
254
|
+
:'reference_id' => :'String',
|
255
|
+
:'recipient_name' => :'String',
|
256
|
+
:'recipient_tin' => :'String',
|
257
|
+
:'recipient_second_name' => :'String',
|
258
|
+
:'address' => :'String',
|
259
|
+
:'address2' => :'String',
|
260
|
+
:'city' => :'String',
|
261
|
+
:'state' => :'String',
|
262
|
+
:'zip' => :'String',
|
263
|
+
:'email' => :'String',
|
264
|
+
:'account_number' => :'String',
|
265
|
+
:'office_code' => :'String',
|
266
|
+
:'non_us_province' => :'String',
|
267
|
+
:'country_code' => :'String',
|
268
|
+
:'federal_e_file' => :'Boolean',
|
269
|
+
:'postal_mail' => :'Boolean',
|
270
|
+
:'state_e_file' => :'Boolean',
|
271
|
+
:'tin_match' => :'Boolean',
|
272
|
+
:'no_tin' => :'Boolean',
|
273
|
+
:'second_tin_notice' => :'Boolean',
|
274
|
+
:'address_verification' => :'Boolean',
|
275
|
+
:'federal_efile_status' => :'StatusDetail',
|
276
|
+
:'e_delivery_status' => :'StatusDetail',
|
277
|
+
:'state_efile_status' => :'Array<StateEfileStatusDetailResponse>',
|
278
|
+
:'postal_mail_status' => :'StatusDetail',
|
279
|
+
:'tin_match_status' => :'StatusDetail',
|
280
|
+
:'address_verification_status' => :'StatusDetail',
|
281
|
+
:'validation_errors' => :'Array<ValidationErrorResponse>'
|
282
|
+
}
|
283
|
+
end
|
284
|
+
|
285
|
+
# List of attributes with nullable: true
|
286
|
+
def self.openapi_nullable
|
287
|
+
Set.new([
|
288
|
+
:'payment_settlement_entity_name_phone_number',
|
289
|
+
:'card_not_present_transactions',
|
290
|
+
:'merchant_category_code',
|
291
|
+
:'federal_income_tax_withheld',
|
292
|
+
:'january',
|
293
|
+
:'february',
|
294
|
+
:'march',
|
295
|
+
:'april',
|
296
|
+
:'may',
|
297
|
+
:'june',
|
298
|
+
:'july',
|
299
|
+
:'august',
|
300
|
+
:'sept',
|
301
|
+
:'october',
|
302
|
+
:'november',
|
303
|
+
:'december',
|
304
|
+
:'federal_efile_status',
|
305
|
+
:'e_delivery_status',
|
306
|
+
:'state_efile_status',
|
307
|
+
:'postal_mail_status',
|
308
|
+
:'tin_match_status',
|
309
|
+
:'address_verification_status',
|
310
|
+
:'validation_errors'
|
311
|
+
])
|
312
|
+
end
|
313
|
+
|
314
|
+
# List of class defined in allOf (OpenAPI v3)
|
315
|
+
def self.openapi_all_of
|
316
|
+
[
|
317
|
+
:'FormResponseBase'
|
318
|
+
]
|
319
|
+
end
|
320
|
+
|
321
|
+
# Initializes the object
|
322
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
323
|
+
def initialize(attributes = {})
|
324
|
+
if (!attributes.is_a?(Hash))
|
325
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099KResponse` initialize method"
|
326
|
+
end
|
327
|
+
|
328
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
329
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
330
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
331
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099KResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
332
|
+
end
|
333
|
+
h[k.to_sym] = v
|
334
|
+
}
|
335
|
+
|
336
|
+
if attributes.key?(:'filer_type')
|
337
|
+
self.filer_type = attributes[:'filer_type']
|
338
|
+
end
|
339
|
+
|
340
|
+
if attributes.key?(:'payment_type')
|
341
|
+
self.payment_type = attributes[:'payment_type']
|
342
|
+
end
|
343
|
+
|
344
|
+
if attributes.key?(:'payment_settlement_entity_name_phone_number')
|
345
|
+
self.payment_settlement_entity_name_phone_number = attributes[:'payment_settlement_entity_name_phone_number']
|
346
|
+
end
|
347
|
+
|
348
|
+
if attributes.key?(:'gross_amount_payment_card')
|
349
|
+
self.gross_amount_payment_card = attributes[:'gross_amount_payment_card']
|
350
|
+
end
|
351
|
+
|
352
|
+
if attributes.key?(:'card_not_present_transactions')
|
353
|
+
self.card_not_present_transactions = attributes[:'card_not_present_transactions']
|
354
|
+
end
|
355
|
+
|
356
|
+
if attributes.key?(:'merchant_category_code')
|
357
|
+
self.merchant_category_code = attributes[:'merchant_category_code']
|
358
|
+
end
|
359
|
+
|
360
|
+
if attributes.key?(:'payment_transaction_number')
|
361
|
+
self.payment_transaction_number = attributes[:'payment_transaction_number']
|
362
|
+
end
|
363
|
+
|
364
|
+
if attributes.key?(:'federal_income_tax_withheld')
|
365
|
+
self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld']
|
366
|
+
end
|
367
|
+
|
368
|
+
if attributes.key?(:'january')
|
369
|
+
self.january = attributes[:'january']
|
370
|
+
end
|
371
|
+
|
372
|
+
if attributes.key?(:'february')
|
373
|
+
self.february = attributes[:'february']
|
374
|
+
end
|
375
|
+
|
376
|
+
if attributes.key?(:'march')
|
377
|
+
self.march = attributes[:'march']
|
378
|
+
end
|
379
|
+
|
380
|
+
if attributes.key?(:'april')
|
381
|
+
self.april = attributes[:'april']
|
382
|
+
end
|
383
|
+
|
384
|
+
if attributes.key?(:'may')
|
385
|
+
self.may = attributes[:'may']
|
386
|
+
end
|
387
|
+
|
388
|
+
if attributes.key?(:'june')
|
389
|
+
self.june = attributes[:'june']
|
390
|
+
end
|
391
|
+
|
392
|
+
if attributes.key?(:'july')
|
393
|
+
self.july = attributes[:'july']
|
394
|
+
end
|
395
|
+
|
396
|
+
if attributes.key?(:'august')
|
397
|
+
self.august = attributes[:'august']
|
398
|
+
end
|
399
|
+
|
400
|
+
if attributes.key?(:'sept')
|
401
|
+
self.sept = attributes[:'sept']
|
402
|
+
end
|
403
|
+
|
404
|
+
if attributes.key?(:'october')
|
405
|
+
self.october = attributes[:'october']
|
406
|
+
end
|
407
|
+
|
408
|
+
if attributes.key?(:'november')
|
409
|
+
self.november = attributes[:'november']
|
410
|
+
end
|
411
|
+
|
412
|
+
if attributes.key?(:'december')
|
413
|
+
self.december = attributes[:'december']
|
414
|
+
end
|
415
|
+
|
416
|
+
if attributes.key?(:'type')
|
417
|
+
self.type = attributes[:'type']
|
418
|
+
end
|
419
|
+
|
420
|
+
if attributes.key?(:'created_at')
|
421
|
+
self.created_at = attributes[:'created_at']
|
422
|
+
end
|
423
|
+
|
424
|
+
if attributes.key?(:'updated_at')
|
425
|
+
self.updated_at = attributes[:'updated_at']
|
426
|
+
end
|
427
|
+
|
428
|
+
if attributes.key?(:'state_and_local_withholding')
|
429
|
+
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
430
|
+
end
|
431
|
+
|
432
|
+
if attributes.key?(:'tin_type')
|
433
|
+
self.tin_type = attributes[:'tin_type']
|
434
|
+
end
|
435
|
+
|
436
|
+
if attributes.key?(:'id')
|
437
|
+
self.id = attributes[:'id']
|
438
|
+
end
|
439
|
+
|
440
|
+
if attributes.key?(:'issuer_id')
|
441
|
+
self.issuer_id = attributes[:'issuer_id']
|
442
|
+
end
|
443
|
+
|
444
|
+
if attributes.key?(:'issuer_reference_id')
|
445
|
+
self.issuer_reference_id = attributes[:'issuer_reference_id']
|
446
|
+
end
|
447
|
+
|
448
|
+
if attributes.key?(:'issuer_tin')
|
449
|
+
self.issuer_tin = attributes[:'issuer_tin']
|
450
|
+
end
|
451
|
+
|
452
|
+
if attributes.key?(:'tax_year')
|
453
|
+
self.tax_year = attributes[:'tax_year']
|
454
|
+
end
|
455
|
+
|
456
|
+
if attributes.key?(:'reference_id')
|
457
|
+
self.reference_id = attributes[:'reference_id']
|
458
|
+
end
|
459
|
+
|
460
|
+
if attributes.key?(:'recipient_name')
|
461
|
+
self.recipient_name = attributes[:'recipient_name']
|
462
|
+
end
|
463
|
+
|
464
|
+
if attributes.key?(:'recipient_tin')
|
465
|
+
self.recipient_tin = attributes[:'recipient_tin']
|
466
|
+
end
|
467
|
+
|
468
|
+
if attributes.key?(:'recipient_second_name')
|
469
|
+
self.recipient_second_name = attributes[:'recipient_second_name']
|
470
|
+
end
|
471
|
+
|
472
|
+
if attributes.key?(:'address')
|
473
|
+
self.address = attributes[:'address']
|
474
|
+
end
|
475
|
+
|
476
|
+
if attributes.key?(:'address2')
|
477
|
+
self.address2 = attributes[:'address2']
|
478
|
+
end
|
479
|
+
|
480
|
+
if attributes.key?(:'city')
|
481
|
+
self.city = attributes[:'city']
|
482
|
+
end
|
483
|
+
|
484
|
+
if attributes.key?(:'state')
|
485
|
+
self.state = attributes[:'state']
|
486
|
+
end
|
487
|
+
|
488
|
+
if attributes.key?(:'zip')
|
489
|
+
self.zip = attributes[:'zip']
|
490
|
+
end
|
491
|
+
|
492
|
+
if attributes.key?(:'email')
|
493
|
+
self.email = attributes[:'email']
|
494
|
+
end
|
495
|
+
|
496
|
+
if attributes.key?(:'account_number')
|
497
|
+
self.account_number = attributes[:'account_number']
|
498
|
+
end
|
499
|
+
|
500
|
+
if attributes.key?(:'office_code')
|
501
|
+
self.office_code = attributes[:'office_code']
|
502
|
+
end
|
503
|
+
|
504
|
+
if attributes.key?(:'non_us_province')
|
505
|
+
self.non_us_province = attributes[:'non_us_province']
|
506
|
+
end
|
507
|
+
|
508
|
+
if attributes.key?(:'country_code')
|
509
|
+
self.country_code = attributes[:'country_code']
|
510
|
+
end
|
511
|
+
|
512
|
+
if attributes.key?(:'federal_e_file')
|
513
|
+
self.federal_e_file = attributes[:'federal_e_file']
|
514
|
+
end
|
515
|
+
|
516
|
+
if attributes.key?(:'postal_mail')
|
517
|
+
self.postal_mail = attributes[:'postal_mail']
|
518
|
+
end
|
519
|
+
|
520
|
+
if attributes.key?(:'state_e_file')
|
521
|
+
self.state_e_file = attributes[:'state_e_file']
|
522
|
+
end
|
523
|
+
|
524
|
+
if attributes.key?(:'tin_match')
|
525
|
+
self.tin_match = attributes[:'tin_match']
|
526
|
+
end
|
527
|
+
|
528
|
+
if attributes.key?(:'no_tin')
|
529
|
+
self.no_tin = attributes[:'no_tin']
|
530
|
+
end
|
531
|
+
|
532
|
+
if attributes.key?(:'second_tin_notice')
|
533
|
+
self.second_tin_notice = attributes[:'second_tin_notice']
|
534
|
+
end
|
535
|
+
|
536
|
+
if attributes.key?(:'address_verification')
|
537
|
+
self.address_verification = attributes[:'address_verification']
|
538
|
+
end
|
539
|
+
|
540
|
+
if attributes.key?(:'federal_efile_status')
|
541
|
+
self.federal_efile_status = attributes[:'federal_efile_status']
|
542
|
+
end
|
543
|
+
|
544
|
+
if attributes.key?(:'e_delivery_status')
|
545
|
+
self.e_delivery_status = attributes[:'e_delivery_status']
|
546
|
+
end
|
547
|
+
|
548
|
+
if attributes.key?(:'state_efile_status')
|
549
|
+
if (value = attributes[:'state_efile_status']).is_a?(Array)
|
550
|
+
self.state_efile_status = value
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
if attributes.key?(:'postal_mail_status')
|
555
|
+
self.postal_mail_status = attributes[:'postal_mail_status']
|
556
|
+
end
|
557
|
+
|
558
|
+
if attributes.key?(:'tin_match_status')
|
559
|
+
self.tin_match_status = attributes[:'tin_match_status']
|
560
|
+
end
|
561
|
+
|
562
|
+
if attributes.key?(:'address_verification_status')
|
563
|
+
self.address_verification_status = attributes[:'address_verification_status']
|
564
|
+
end
|
565
|
+
|
566
|
+
if attributes.key?(:'validation_errors')
|
567
|
+
if (value = attributes[:'validation_errors']).is_a?(Array)
|
568
|
+
self.validation_errors = value
|
569
|
+
end
|
570
|
+
end
|
571
|
+
end
|
572
|
+
|
573
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
574
|
+
# @return Array for valid properties with the reasons
|
575
|
+
def list_invalid_properties
|
576
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
577
|
+
invalid_properties = Array.new
|
578
|
+
invalid_properties
|
579
|
+
end
|
580
|
+
|
581
|
+
# Check to see if the all the properties in the model are valid
|
582
|
+
# @return true if the model is valid
|
583
|
+
def valid?
|
584
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
585
|
+
filer_type_validator = EnumAttributeValidator.new('String', ["PSE", "EPF", "Other"])
|
586
|
+
return false unless filer_type_validator.valid?(@filer_type)
|
587
|
+
payment_type_validator = EnumAttributeValidator.new('String', ["MerchantPaymentCard", "ThirdPartyNetwork"])
|
588
|
+
return false unless payment_type_validator.valid?(@payment_type)
|
589
|
+
type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
|
590
|
+
return false unless type_validator.valid?(@type)
|
591
|
+
tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
592
|
+
return false unless tin_type_validator.valid?(@tin_type)
|
593
|
+
true
|
594
|
+
end
|
595
|
+
|
596
|
+
# Custom attribute writer method checking allowed values (enum).
|
597
|
+
# @param [Object] filer_type Object to be assigned
|
598
|
+
def filer_type=(filer_type)
|
599
|
+
validator = EnumAttributeValidator.new('String', ["PSE", "EPF", "Other"])
|
600
|
+
unless validator.valid?(filer_type)
|
601
|
+
fail ArgumentError, "invalid value for \"filer_type\", must be one of #{validator.allowable_values}."
|
602
|
+
end
|
603
|
+
@filer_type = filer_type
|
604
|
+
end
|
605
|
+
|
606
|
+
# Custom attribute writer method checking allowed values (enum).
|
607
|
+
# @param [Object] payment_type Object to be assigned
|
608
|
+
def payment_type=(payment_type)
|
609
|
+
validator = EnumAttributeValidator.new('String', ["MerchantPaymentCard", "ThirdPartyNetwork"])
|
610
|
+
unless validator.valid?(payment_type)
|
611
|
+
fail ArgumentError, "invalid value for \"payment_type\", must be one of #{validator.allowable_values}."
|
612
|
+
end
|
613
|
+
@payment_type = payment_type
|
614
|
+
end
|
615
|
+
|
616
|
+
# Custom attribute writer method checking allowed values (enum).
|
617
|
+
# @param [Object] type Object to be assigned
|
618
|
+
def type=(type)
|
619
|
+
validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
|
620
|
+
unless validator.valid?(type)
|
621
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
622
|
+
end
|
623
|
+
@type = type
|
624
|
+
end
|
625
|
+
|
626
|
+
# Custom attribute writer method checking allowed values (enum).
|
627
|
+
# @param [Object] tin_type Object to be assigned
|
628
|
+
def tin_type=(tin_type)
|
629
|
+
validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
630
|
+
unless validator.valid?(tin_type)
|
631
|
+
fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
|
632
|
+
end
|
633
|
+
@tin_type = tin_type
|
634
|
+
end
|
635
|
+
|
636
|
+
# Custom attribute writer method with validation
|
637
|
+
# @param [Object] state_efile_status Value to be assigned
|
638
|
+
def state_efile_status=(state_efile_status)
|
639
|
+
@state_efile_status = state_efile_status
|
640
|
+
end
|
641
|
+
|
642
|
+
# Custom attribute writer method with validation
|
643
|
+
# @param [Object] validation_errors Value to be assigned
|
644
|
+
def validation_errors=(validation_errors)
|
645
|
+
@validation_errors = validation_errors
|
646
|
+
end
|
647
|
+
|
648
|
+
# Checks equality by comparing each attribute.
|
649
|
+
# @param [Object] Object to be compared
|
650
|
+
def ==(o)
|
651
|
+
return true if self.equal?(o)
|
652
|
+
self.class == o.class &&
|
653
|
+
filer_type == o.filer_type &&
|
654
|
+
payment_type == o.payment_type &&
|
655
|
+
payment_settlement_entity_name_phone_number == o.payment_settlement_entity_name_phone_number &&
|
656
|
+
gross_amount_payment_card == o.gross_amount_payment_card &&
|
657
|
+
card_not_present_transactions == o.card_not_present_transactions &&
|
658
|
+
merchant_category_code == o.merchant_category_code &&
|
659
|
+
payment_transaction_number == o.payment_transaction_number &&
|
660
|
+
federal_income_tax_withheld == o.federal_income_tax_withheld &&
|
661
|
+
january == o.january &&
|
662
|
+
february == o.february &&
|
663
|
+
march == o.march &&
|
664
|
+
april == o.april &&
|
665
|
+
may == o.may &&
|
666
|
+
june == o.june &&
|
667
|
+
july == o.july &&
|
668
|
+
august == o.august &&
|
669
|
+
sept == o.sept &&
|
670
|
+
october == o.october &&
|
671
|
+
november == o.november &&
|
672
|
+
december == o.december &&
|
673
|
+
type == o.type &&
|
674
|
+
created_at == o.created_at &&
|
675
|
+
updated_at == o.updated_at &&
|
676
|
+
state_and_local_withholding == o.state_and_local_withholding &&
|
677
|
+
tin_type == o.tin_type &&
|
678
|
+
id == o.id &&
|
679
|
+
issuer_id == o.issuer_id &&
|
680
|
+
issuer_reference_id == o.issuer_reference_id &&
|
681
|
+
issuer_tin == o.issuer_tin &&
|
682
|
+
tax_year == o.tax_year &&
|
683
|
+
reference_id == o.reference_id &&
|
684
|
+
recipient_name == o.recipient_name &&
|
685
|
+
recipient_tin == o.recipient_tin &&
|
686
|
+
recipient_second_name == o.recipient_second_name &&
|
687
|
+
address == o.address &&
|
688
|
+
address2 == o.address2 &&
|
689
|
+
city == o.city &&
|
690
|
+
state == o.state &&
|
691
|
+
zip == o.zip &&
|
692
|
+
email == o.email &&
|
693
|
+
account_number == o.account_number &&
|
694
|
+
office_code == o.office_code &&
|
695
|
+
non_us_province == o.non_us_province &&
|
696
|
+
country_code == o.country_code &&
|
697
|
+
federal_e_file == o.federal_e_file &&
|
698
|
+
postal_mail == o.postal_mail &&
|
699
|
+
state_e_file == o.state_e_file &&
|
700
|
+
tin_match == o.tin_match &&
|
701
|
+
no_tin == o.no_tin &&
|
702
|
+
second_tin_notice == o.second_tin_notice &&
|
703
|
+
address_verification == o.address_verification &&
|
704
|
+
federal_efile_status == o.federal_efile_status &&
|
705
|
+
e_delivery_status == o.e_delivery_status &&
|
706
|
+
state_efile_status == o.state_efile_status &&
|
707
|
+
postal_mail_status == o.postal_mail_status &&
|
708
|
+
tin_match_status == o.tin_match_status &&
|
709
|
+
address_verification_status == o.address_verification_status &&
|
710
|
+
validation_errors == o.validation_errors
|
711
|
+
end
|
712
|
+
|
713
|
+
# @see the `==` method
|
714
|
+
# @param [Object] Object to be compared
|
715
|
+
def eql?(o)
|
716
|
+
self == o
|
717
|
+
end
|
718
|
+
|
719
|
+
# Calculates hash code according to all attributes.
|
720
|
+
# @return [Integer] Hash code
|
721
|
+
def hash
|
722
|
+
[filer_type, payment_type, payment_settlement_entity_name_phone_number, gross_amount_payment_card, card_not_present_transactions, merchant_category_code, payment_transaction_number, federal_income_tax_withheld, january, february, march, april, may, june, july, august, sept, october, november, december, type, created_at, updated_at, state_and_local_withholding, tin_type, id, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, recipient_name, recipient_tin, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, federal_efile_status, e_delivery_status, state_efile_status, postal_mail_status, tin_match_status, address_verification_status, validation_errors].hash
|
723
|
+
end
|
724
|
+
|
725
|
+
# Builds the object from hash
|
726
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
727
|
+
# @return [Object] Returns the model itself
|
728
|
+
def self.build_from_hash(attributes)
|
729
|
+
return nil unless attributes.is_a?(Hash)
|
730
|
+
attributes = attributes.transform_keys(&:to_sym)
|
731
|
+
transformed_hash = {}
|
732
|
+
openapi_types.each_pair do |key, type|
|
733
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
734
|
+
transformed_hash["#{key}"] = nil
|
735
|
+
elsif type =~ /\AArray<(.*)>/i
|
736
|
+
# check to ensure the input is an array given that the attribute
|
737
|
+
# is documented as an array but the input is not
|
738
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
739
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
740
|
+
end
|
741
|
+
elsif !attributes[attribute_map[key]].nil?
|
742
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
743
|
+
end
|
744
|
+
end
|
745
|
+
new(transformed_hash)
|
746
|
+
end
|
747
|
+
|
748
|
+
# Deserializes the data based on type
|
749
|
+
# @param string type Data type
|
750
|
+
# @param string value Value to be deserialized
|
751
|
+
# @return [Object] Deserialized data
|
752
|
+
def self._deserialize(type, value)
|
753
|
+
case type.to_sym
|
754
|
+
when :Time
|
755
|
+
Time.parse(value)
|
756
|
+
when :Date
|
757
|
+
Date.parse(value)
|
758
|
+
when :String
|
759
|
+
value.to_s
|
760
|
+
when :Integer
|
761
|
+
value.to_i
|
762
|
+
when :Float
|
763
|
+
value.to_f
|
764
|
+
when :Boolean
|
765
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
766
|
+
true
|
767
|
+
else
|
768
|
+
false
|
769
|
+
end
|
770
|
+
when :Object
|
771
|
+
# generic object (usually a Hash), return directly
|
772
|
+
value
|
773
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
774
|
+
inner_type = Regexp.last_match[:inner_type]
|
775
|
+
value.map { |v| _deserialize(inner_type, v) }
|
776
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
777
|
+
k_type = Regexp.last_match[:k_type]
|
778
|
+
v_type = Regexp.last_match[:v_type]
|
779
|
+
{}.tap do |hash|
|
780
|
+
value.each do |k, v|
|
781
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
782
|
+
end
|
783
|
+
end
|
784
|
+
else # model
|
785
|
+
# models (e.g. Pet) or oneOf
|
786
|
+
klass = AvalaraSdk::A1099::V2.const_get(type)
|
787
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
788
|
+
end
|
789
|
+
end
|
790
|
+
|
791
|
+
# Returns the string representation of the object
|
792
|
+
# @return [String] String presentation of the object
|
793
|
+
def to_s
|
794
|
+
to_hash.to_s
|
795
|
+
end
|
796
|
+
|
797
|
+
# to_body is an alias to to_hash (backward compatibility)
|
798
|
+
# @return [Hash] Returns the object in the form of hash
|
799
|
+
def to_body
|
800
|
+
to_hash
|
801
|
+
end
|
802
|
+
|
803
|
+
# Returns the object in the form of hash
|
804
|
+
# @return [Hash] Returns the object in the form of hash
|
805
|
+
def to_hash
|
806
|
+
hash = {}
|
807
|
+
self.class.attribute_map.each_pair do |attr, param|
|
808
|
+
value = self.send(attr)
|
809
|
+
if value.nil?
|
810
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
811
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
812
|
+
end
|
813
|
+
|
814
|
+
hash[param] = _to_hash(value)
|
815
|
+
end
|
816
|
+
hash
|
817
|
+
end
|
818
|
+
|
819
|
+
# Outputs non-array value in the form of hash
|
820
|
+
# For object, use to_hash. Otherwise, just return the value
|
821
|
+
# @param [Object] value Any valid value
|
822
|
+
# @return [Hash] Returns the value in the form of hash
|
823
|
+
def _to_hash(value)
|
824
|
+
if value.is_a?(Array)
|
825
|
+
value.compact.map { |v| _to_hash(v) }
|
826
|
+
elsif value.is_a?(Hash)
|
827
|
+
{}.tap do |hash|
|
828
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
829
|
+
end
|
830
|
+
elsif value.respond_to? :to_hash
|
831
|
+
value.to_hash
|
832
|
+
else
|
833
|
+
value
|
834
|
+
end
|
835
|
+
end
|
836
|
+
|
837
|
+
end
|
838
|
+
|
839
|
+
end
|