Class: FdxV660Api::FarmIncomeStatement
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::FarmIncomeStatement
- Defined in:
- lib/fdx_v660_api/models/farm_income_statement.rb
Overview
Farm Income Statement for IRS Form 1040 Schedule F
Instance Attribute Summary collapse
-
#account_id ⇒ String
Long-term persistent identity of the source account.
-
#additional_information ⇒ String
Additional explanation text or content about this tax form.
-
#ag_program_payments ⇒ Float
Box 4a, Agricultural program payments.
-
#attributes ⇒ Array[TaxFormAttribute]
Additional attributes for this tax form when defined fields are not available.
-
#capital_expenditures ⇒ Array[DateAndAmount]
Capital expenditures, for use in calculating Depreciation.
-
#car_and_truck ⇒ Float
Box 10, Car and truck expenses.
-
#ccc_loans ⇒ Float
Box 5a, Commodity Credit Corporation (CCC) loans reported under election.
-
#chemicals ⇒ Float
Box 11, Chemicals.
-
#conservation ⇒ Float
Box 12, Conservation expenses.
-
#coop_distributions ⇒ Float
Box 3a, Cooperative distributions.
-
#corrected ⇒ TrueClass | FalseClass
True to indicate this is a corrected tax form.
-
#cost_of_items_sold ⇒ Float
Box 1b, Cost or other basis of livestock or other items.
-
#crop_insurance_proceeds ⇒ Float
Box 6a, Crop insurance proceeds and federal crop disaster payments.
-
#crop_or_activity ⇒ String
Box A, Principal crop or activity.
-
#custom_hire_expenses ⇒ Float
Box 13, Custom hire (machine work).
-
#custom_hire_income ⇒ Float
Box 7, Custom hire (machine work) income.
-
#depreciation ⇒ Float
Box 14, Depreciation.
-
#employee_benefit_programs ⇒ Float
Box 15, Employee benefit programs.
-
#equipment_rent ⇒ Float
Box 24a, Rent or lease: Vehicles, machinery, equipment.
-
#error ⇒ Error2
Present if an error was encountered while retrieving this form.
-
#feed ⇒ Float
Box 16, Feed.
-
#fertilizers ⇒ Float
Box 17, Fertilizers and lime.
-
#freight ⇒ Float
Box 18, Freight and trucking.
-
#fuel ⇒ Float
Box 19, Gasoline, fuel, and oil.
-
#insurance ⇒ Float
Box 20, Insurance (other than health).
-
#issuer ⇒ TaxParty8
Issuer's name, address, phone, and TIN.
-
#labor_hired ⇒ Float
Box 22, Labor hired.
-
#links ⇒ Array[HateoasLink]
Links to retrieve this form as data or image, or to invoke other APIs.
-
#mortgage_interest ⇒ Float
Box 21a, Mortgage interest.
-
#other_expenses ⇒ Array[DescriptionAndAmount]
Box 32, Other expenses.
-
#other_income ⇒ Array[DescriptionAndAmount]
Box 8, Other income.
-
#other_interest ⇒ Float
Box 21c, Other interest.
-
#other_rent ⇒ Float
Box 24b, Rent or lease: Other.
-
#pension ⇒ Float
Box 23, Pension and profit-sharing plans.
-
#recipient ⇒ TaxParty1
Recipient's name, address, phone, and TIN.
-
#repairs ⇒ Float
Box 25, Repairs and maintenance.
-
#sales ⇒ Float
Box 1a, Sales of livestock and other resale items.
-
#sales_of_raised ⇒ Float
Box 2, Sales of livestock, produce, grains, and other products you raised.
-
#seeds ⇒ Float
Box 26, Seeds and plants.
-
#storage ⇒ Float
Box 27, Storage and warehousing.
-
#supplies ⇒ Float
Box 28, Supplies.
-
#tax_form_date ⇒ Date
Date of production or delivery of the tax form.
-
#tax_form_id ⇒ String
Long-term persistent id for this tax form.
-
#tax_form_type ⇒ TypeFormType1
Enumerated name of the tax form entity e.g.
-
#tax_year ⇒ Integer
Year for which taxes are being paid.
-
#taxes ⇒ Float
Box 29, Taxes.
-
#utilities ⇒ Float
Box 30, Utilities.
-
#vehicle_loan_interest ⇒ Float
Box 21b, Vehicle loan interest.
-
#veterinary ⇒ Float
Box 31, Veterinary, breeding, and medicine.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(tax_year: SKIP, corrected: SKIP, account_id: SKIP, tax_form_id: SKIP, tax_form_date: SKIP, additional_information: SKIP, tax_form_type: SKIP, issuer: SKIP, recipient: SKIP, attributes: SKIP, error: SKIP, links: SKIP, crop_or_activity: SKIP, sales: SKIP, cost_of_items_sold: SKIP, sales_of_raised: SKIP, coop_distributions: SKIP, ag_program_payments: SKIP, ccc_loans: SKIP, crop_insurance_proceeds: SKIP, custom_hire_income: SKIP, other_income: SKIP, car_and_truck: SKIP, chemicals: SKIP, conservation: SKIP, custom_hire_expenses: SKIP, depreciation: SKIP, employee_benefit_programs: SKIP, feed: SKIP, fertilizers: SKIP, freight: SKIP, fuel: SKIP, insurance: SKIP, mortgage_interest: SKIP, vehicle_loan_interest: SKIP, other_interest: SKIP, labor_hired: SKIP, pension: SKIP, equipment_rent: SKIP, other_rent: SKIP, repairs: SKIP, seeds: SKIP, storage: SKIP, supplies: SKIP, taxes: SKIP, utilities: SKIP, veterinary: SKIP, other_expenses: SKIP, capital_expenditures: SKIP, additional_properties: nil) ⇒ FarmIncomeStatement
constructor
A new instance of FarmIncomeStatement.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(tax_year: SKIP, corrected: SKIP, account_id: SKIP, tax_form_id: SKIP, tax_form_date: SKIP, additional_information: SKIP, tax_form_type: SKIP, issuer: SKIP, recipient: SKIP, attributes: SKIP, error: SKIP, links: SKIP, crop_or_activity: SKIP, sales: SKIP, cost_of_items_sold: SKIP, sales_of_raised: SKIP, coop_distributions: SKIP, ag_program_payments: SKIP, ccc_loans: SKIP, crop_insurance_proceeds: SKIP, custom_hire_income: SKIP, other_income: SKIP, car_and_truck: SKIP, chemicals: SKIP, conservation: SKIP, custom_hire_expenses: SKIP, depreciation: SKIP, employee_benefit_programs: SKIP, feed: SKIP, fertilizers: SKIP, freight: SKIP, fuel: SKIP, insurance: SKIP, mortgage_interest: SKIP, vehicle_loan_interest: SKIP, other_interest: SKIP, labor_hired: SKIP, pension: SKIP, equipment_rent: SKIP, other_rent: SKIP, repairs: SKIP, seeds: SKIP, storage: SKIP, supplies: SKIP, taxes: SKIP, utilities: SKIP, veterinary: SKIP, other_expenses: SKIP, capital_expenditures: SKIP, additional_properties: nil) ⇒ FarmIncomeStatement
Returns a new instance of FarmIncomeStatement.
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 336 def initialize(tax_year: SKIP, corrected: SKIP, account_id: SKIP, tax_form_id: SKIP, tax_form_date: SKIP, additional_information: SKIP, tax_form_type: SKIP, issuer: SKIP, recipient: SKIP, attributes: SKIP, error: SKIP, links: SKIP, crop_or_activity: SKIP, sales: SKIP, cost_of_items_sold: SKIP, sales_of_raised: SKIP, coop_distributions: SKIP, ag_program_payments: SKIP, ccc_loans: SKIP, crop_insurance_proceeds: SKIP, custom_hire_income: SKIP, other_income: SKIP, car_and_truck: SKIP, chemicals: SKIP, conservation: SKIP, custom_hire_expenses: SKIP, depreciation: SKIP, employee_benefit_programs: SKIP, feed: SKIP, fertilizers: SKIP, freight: SKIP, fuel: SKIP, insurance: SKIP, mortgage_interest: SKIP, vehicle_loan_interest: SKIP, other_interest: SKIP, labor_hired: SKIP, pension: SKIP, equipment_rent: SKIP, other_rent: SKIP, repairs: SKIP, seeds: SKIP, storage: SKIP, supplies: SKIP, taxes: SKIP, utilities: SKIP, veterinary: SKIP, other_expenses: SKIP, capital_expenditures: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @tax_year = tax_year unless tax_year == SKIP @corrected = corrected unless corrected == SKIP @account_id = account_id unless account_id == SKIP @tax_form_id = tax_form_id unless tax_form_id == SKIP @tax_form_date = tax_form_date unless tax_form_date == SKIP @additional_information = additional_information unless additional_information == SKIP @tax_form_type = tax_form_type unless tax_form_type == SKIP @issuer = issuer unless issuer == SKIP @recipient = recipient unless recipient == SKIP @attributes = attributes unless attributes == SKIP @error = error unless error == SKIP @links = links unless links == SKIP @crop_or_activity = crop_or_activity unless crop_or_activity == SKIP @sales = sales unless sales == SKIP @cost_of_items_sold = cost_of_items_sold unless cost_of_items_sold == SKIP @sales_of_raised = sales_of_raised unless sales_of_raised == SKIP @coop_distributions = coop_distributions unless coop_distributions == SKIP @ag_program_payments = ag_program_payments unless ag_program_payments == SKIP @ccc_loans = ccc_loans unless ccc_loans == SKIP @crop_insurance_proceeds = crop_insurance_proceeds unless crop_insurance_proceeds == SKIP @custom_hire_income = custom_hire_income unless custom_hire_income == SKIP @other_income = other_income unless other_income == SKIP @car_and_truck = car_and_truck unless car_and_truck == SKIP @chemicals = chemicals unless chemicals == SKIP @conservation = conservation unless conservation == SKIP @custom_hire_expenses = custom_hire_expenses unless custom_hire_expenses == SKIP @depreciation = depreciation unless depreciation == SKIP unless employee_benefit_programs == SKIP @employee_benefit_programs = employee_benefit_programs end @feed = feed unless feed == SKIP @fertilizers = fertilizers unless fertilizers == SKIP @freight = freight unless freight == SKIP @fuel = fuel unless fuel == SKIP @insurance = insurance unless insurance == SKIP @mortgage_interest = mortgage_interest unless mortgage_interest == SKIP @vehicle_loan_interest = vehicle_loan_interest unless vehicle_loan_interest == SKIP @other_interest = other_interest unless other_interest == SKIP @labor_hired = labor_hired unless labor_hired == SKIP @pension = pension unless pension == SKIP @equipment_rent = equipment_rent unless equipment_rent == SKIP @other_rent = other_rent unless other_rent == SKIP @repairs = repairs unless repairs == SKIP @seeds = seeds unless seeds == SKIP @storage = storage unless storage == SKIP @supplies = supplies unless supplies == SKIP @taxes = taxes unless taxes == SKIP @utilities = utilities unless utilities == SKIP @veterinary = veterinary unless veterinary == SKIP @other_expenses = other_expenses unless other_expenses == SKIP @capital_expenditures = capital_expenditures unless capital_expenditures == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
Long-term persistent identity of the source account. Not the account number
23 24 25 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 23 def account_id @account_id end |
#additional_information ⇒ String
Additional explanation text or content about this tax form
37 38 39 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 37 def additional_information @additional_information end |
#ag_program_payments ⇒ Float
Box 4a, Agricultural program payments
95 96 97 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 95 def ag_program_payments @ag_program_payments end |
#attributes ⇒ Array[TaxFormAttribute]
Additional attributes for this tax form when defined fields are not available. Some specific additional attributes already defined by providers: Fields required by [IRS FIRE](https://www.irs.gov/e-file-providers/filing-information-returns-elec tronically-fire): Name Control, Type of Identification Number (EIN, SSN, ITIN, ATIN). (ATIN is tax ID number for pending adoptions.) Tax form provider field for taxpayer notification: Recipient Email Address.
63 64 65 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 63 def attributes @attributes end |
#capital_expenditures ⇒ Array[DateAndAmount]
Capital expenditures, for use in calculating Depreciation
219 220 221 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 219 def capital_expenditures @capital_expenditures end |
#car_and_truck ⇒ Float
Box 10, Car and truck expenses
115 116 117 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 115 def car_and_truck @car_and_truck end |
#ccc_loans ⇒ Float
Box 5a, Commodity Credit Corporation (CCC) loans reported under election
99 100 101 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 99 def ccc_loans @ccc_loans end |
#chemicals ⇒ Float
Box 11, Chemicals
119 120 121 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 119 def chemicals @chemicals end |
#conservation ⇒ Float
Box 12, Conservation expenses
123 124 125 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 123 def conservation @conservation end |
#coop_distributions ⇒ Float
Box 3a, Cooperative distributions
91 92 93 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 91 def coop_distributions @coop_distributions end |
#corrected ⇒ TrueClass | FalseClass
True to indicate this is a corrected tax form
18 19 20 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 18 def corrected @corrected end |
#cost_of_items_sold ⇒ Float
Box 1b, Cost or other basis of livestock or other items
83 84 85 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 83 def cost_of_items_sold @cost_of_items_sold end |
#crop_insurance_proceeds ⇒ Float
Box 6a, Crop insurance proceeds and federal crop disaster payments
103 104 105 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 103 def crop_insurance_proceeds @crop_insurance_proceeds end |
#crop_or_activity ⇒ String
Box A, Principal crop or activity
75 76 77 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 75 def crop_or_activity @crop_or_activity end |
#custom_hire_expenses ⇒ Float
Box 13, Custom hire (machine work)
127 128 129 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 127 def custom_hire_expenses @custom_hire_expenses end |
#custom_hire_income ⇒ Float
Box 7, Custom hire (machine work) income
107 108 109 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 107 def custom_hire_income @custom_hire_income end |
#depreciation ⇒ Float
Box 14, Depreciation
131 132 133 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 131 def depreciation @depreciation end |
#employee_benefit_programs ⇒ Float
Box 15, Employee benefit programs
135 136 137 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 135 def employee_benefit_programs @employee_benefit_programs end |
#equipment_rent ⇒ Float
Box 24a, Rent or lease: Vehicles, machinery, equipment
179 180 181 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 179 def equipment_rent @equipment_rent end |
#error ⇒ Error2
Present if an error was encountered while retrieving this form
67 68 69 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 67 def error @error end |
#feed ⇒ Float
Box 16, Feed
139 140 141 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 139 def feed @feed end |
#fertilizers ⇒ Float
Box 17, Fertilizers and lime
143 144 145 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 143 def fertilizers @fertilizers end |
#freight ⇒ Float
Box 18, Freight and trucking
147 148 149 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 147 def freight @freight end |
#fuel ⇒ Float
Box 19, Gasoline, fuel, and oil
151 152 153 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 151 def fuel @fuel end |
#insurance ⇒ Float
Box 20, Insurance (other than health)
155 156 157 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 155 def insurance @insurance end |
#issuer ⇒ TaxParty8
Issuer's name, address, phone, and TIN. Issuer data need only be transmitted on enclosing TaxStatement, if it is the same on all its included tax forms.
47 48 49 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 47 def issuer @issuer end |
#labor_hired ⇒ Float
Box 22, Labor hired
171 172 173 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 171 def labor_hired @labor_hired end |
#links ⇒ Array[HateoasLink]
Links to retrieve this form as data or image, or to invoke other APIs
71 72 73 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 71 def links @links end |
#mortgage_interest ⇒ Float
Box 21a, Mortgage interest
159 160 161 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 159 def mortgage_interest @mortgage_interest end |
#other_expenses ⇒ Array[DescriptionAndAmount]
Box 32, Other expenses
215 216 217 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 215 def other_expenses @other_expenses end |
#other_income ⇒ Array[DescriptionAndAmount]
Box 8, Other income
111 112 113 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 111 def other_income @other_income end |
#other_interest ⇒ Float
Box 21c, Other interest
167 168 169 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 167 def other_interest @other_interest end |
#other_rent ⇒ Float
Box 24b, Rent or lease: Other
183 184 185 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 183 def other_rent @other_rent end |
#pension ⇒ Float
Box 23, Pension and profit-sharing plans
175 176 177 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 175 def pension @pension end |
#recipient ⇒ TaxParty1
Recipient's name, address, phone, and TIN. Recipient data need only be transmitted on enclosing TaxStatement, if it is the same on all its included tax forms.
53 54 55 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 53 def recipient @recipient end |
#repairs ⇒ Float
Box 25, Repairs and maintenance
187 188 189 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 187 def repairs @repairs end |
#sales ⇒ Float
Box 1a, Sales of livestock and other resale items
79 80 81 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 79 def sales @sales end |
#sales_of_raised ⇒ Float
Box 2, Sales of livestock, produce, grains, and other products you raised
87 88 89 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 87 def sales_of_raised @sales_of_raised end |
#seeds ⇒ Float
Box 26, Seeds and plants
191 192 193 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 191 def seeds @seeds end |
#storage ⇒ Float
Box 27, Storage and warehousing
195 196 197 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 195 def storage @storage end |
#supplies ⇒ Float
Box 28, Supplies
199 200 201 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 199 def supplies @supplies end |
#tax_form_date ⇒ Date
Date of production or delivery of the tax form
33 34 35 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 33 def tax_form_date @tax_form_date end |
#tax_form_id ⇒ String
Long-term persistent id for this tax form. Depending upon the data provider, this may be the same id as the enclosing tax statement id, or this may be a different id, or this id may be omitted.
29 30 31 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 29 def tax_form_id @tax_form_id end |
#tax_form_type ⇒ TypeFormType1
Enumerated name of the tax form entity e.g. "TaxW2"
41 42 43 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 41 def tax_form_type @tax_form_type end |
#tax_year ⇒ Integer
Year for which taxes are being paid
14 15 16 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 14 def tax_year @tax_year end |
#taxes ⇒ Float
Box 29, Taxes
203 204 205 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 203 def taxes @taxes end |
#utilities ⇒ Float
Box 30, Utilities
207 208 209 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 207 def utilities @utilities end |
#vehicle_loan_interest ⇒ Float
Box 21b, Vehicle loan interest
163 164 165 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 163 def vehicle_loan_interest @vehicle_loan_interest end |
#veterinary ⇒ Float
Box 31, Veterinary, breeding, and medicine
211 212 213 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 211 def veterinary @veterinary end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 415 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. tax_year = hash.key?('taxYear') ? hash['taxYear'] : SKIP corrected = hash.key?('corrected') ? hash['corrected'] : SKIP account_id = hash.key?('accountId') ? hash['accountId'] : SKIP tax_form_id = hash.key?('taxFormId') ? hash['taxFormId'] : SKIP tax_form_date = hash.key?('taxFormDate') ? hash['taxFormDate'] : SKIP additional_information = hash.key?('additionalInformation') ? hash['additionalInformation'] : SKIP tax_form_type = hash.key?('taxFormType') ? hash['taxFormType'] : SKIP issuer = TaxParty8.from_hash(hash['issuer']) if hash['issuer'] recipient = TaxParty1.from_hash(hash['recipient']) if hash['recipient'] # Parameter is an array, so we need to iterate through it attributes = nil unless hash['attributes'].nil? attributes = [] hash['attributes'].each do |structure| attributes << (TaxFormAttribute.from_hash(structure) if structure) end end attributes = SKIP unless hash.key?('attributes') error = Error2.from_hash(hash['error']) if hash['error'] # Parameter is an array, so we need to iterate through it links = nil unless hash['links'].nil? links = [] hash['links'].each do |structure| links << (HateoasLink.from_hash(structure) if structure) end end links = SKIP unless hash.key?('links') crop_or_activity = hash.key?('cropOrActivity') ? hash['cropOrActivity'] : SKIP sales = hash.key?('sales') ? hash['sales'] : SKIP cost_of_items_sold = hash.key?('costOfItemsSold') ? hash['costOfItemsSold'] : SKIP sales_of_raised = hash.key?('salesOfRaised') ? hash['salesOfRaised'] : SKIP coop_distributions = hash.key?('coopDistributions') ? hash['coopDistributions'] : SKIP ag_program_payments = hash.key?('agProgramPayments') ? hash['agProgramPayments'] : SKIP ccc_loans = hash.key?('cccLoans') ? hash['cccLoans'] : SKIP crop_insurance_proceeds = hash.key?('cropInsuranceProceeds') ? hash['cropInsuranceProceeds'] : SKIP custom_hire_income = hash.key?('customHireIncome') ? hash['customHireIncome'] : SKIP # Parameter is an array, so we need to iterate through it other_income = nil unless hash['otherIncome'].nil? other_income = [] hash['otherIncome'].each do |structure| other_income << (DescriptionAndAmount.from_hash(structure) if structure) end end other_income = SKIP unless hash.key?('otherIncome') car_and_truck = hash.key?('carAndTruck') ? hash['carAndTruck'] : SKIP chemicals = hash.key?('chemicals') ? hash['chemicals'] : SKIP conservation = hash.key?('conservation') ? hash['conservation'] : SKIP custom_hire_expenses = hash.key?('customHireExpenses') ? hash['customHireExpenses'] : SKIP depreciation = hash.key?('depreciation') ? hash['depreciation'] : SKIP employee_benefit_programs = hash.key?('employeeBenefitPrograms') ? hash['employeeBenefitPrograms'] : SKIP feed = hash.key?('feed') ? hash['feed'] : SKIP fertilizers = hash.key?('fertilizers') ? hash['fertilizers'] : SKIP freight = hash.key?('freight') ? hash['freight'] : SKIP fuel = hash.key?('fuel') ? hash['fuel'] : SKIP insurance = hash.key?('insurance') ? hash['insurance'] : SKIP mortgage_interest = hash.key?('mortgageInterest') ? hash['mortgageInterest'] : SKIP vehicle_loan_interest = hash.key?('vehicleLoanInterest') ? hash['vehicleLoanInterest'] : SKIP other_interest = hash.key?('otherInterest') ? hash['otherInterest'] : SKIP labor_hired = hash.key?('laborHired') ? hash['laborHired'] : SKIP pension = hash.key?('pension') ? hash['pension'] : SKIP equipment_rent = hash.key?('equipmentRent') ? hash['equipmentRent'] : SKIP other_rent = hash.key?('otherRent') ? hash['otherRent'] : SKIP repairs = hash.key?('repairs') ? hash['repairs'] : SKIP seeds = hash.key?('seeds') ? hash['seeds'] : SKIP storage = hash.key?('storage') ? hash['storage'] : SKIP supplies = hash.key?('supplies') ? hash['supplies'] : SKIP taxes = hash.key?('taxes') ? hash['taxes'] : SKIP utilities = hash.key?('utilities') ? hash['utilities'] : SKIP veterinary = hash.key?('veterinary') ? hash['veterinary'] : SKIP # Parameter is an array, so we need to iterate through it other_expenses = nil unless hash['otherExpenses'].nil? other_expenses = [] hash['otherExpenses'].each do |structure| other_expenses << (DescriptionAndAmount.from_hash(structure) if structure) end end other_expenses = SKIP unless hash.key?('otherExpenses') # Parameter is an array, so we need to iterate through it capital_expenditures = nil unless hash['capitalExpenditures'].nil? capital_expenditures = [] hash['capitalExpenditures'].each do |structure| capital_expenditures << (DateAndAmount.from_hash(structure) if structure) end end capital_expenditures = SKIP unless hash.key?('capitalExpenditures') # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. FarmIncomeStatement.new(tax_year: tax_year, corrected: corrected, account_id: account_id, tax_form_id: tax_form_id, tax_form_date: tax_form_date, additional_information: additional_information, tax_form_type: tax_form_type, issuer: issuer, recipient: recipient, attributes: attributes, error: error, links: links, crop_or_activity: crop_or_activity, sales: sales, cost_of_items_sold: cost_of_items_sold, sales_of_raised: sales_of_raised, coop_distributions: coop_distributions, ag_program_payments: ag_program_payments, ccc_loans: ccc_loans, crop_insurance_proceeds: crop_insurance_proceeds, custom_hire_income: custom_hire_income, other_income: other_income, car_and_truck: car_and_truck, chemicals: chemicals, conservation: conservation, custom_hire_expenses: custom_hire_expenses, depreciation: depreciation, employee_benefit_programs: employee_benefit_programs, feed: feed, fertilizers: fertilizers, freight: freight, fuel: fuel, insurance: insurance, mortgage_interest: mortgage_interest, vehicle_loan_interest: vehicle_loan_interest, other_interest: other_interest, labor_hired: labor_hired, pension: pension, equipment_rent: equipment_rent, other_rent: other_rent, repairs: repairs, seeds: seeds, storage: storage, supplies: supplies, taxes: taxes, utilities: utilities, veterinary: veterinary, other_expenses: other_expenses, capital_expenditures: capital_expenditures, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 222 def self.names @_hash = {} if @_hash.nil? @_hash['tax_year'] = 'taxYear' @_hash['corrected'] = 'corrected' @_hash['account_id'] = 'accountId' @_hash['tax_form_id'] = 'taxFormId' @_hash['tax_form_date'] = 'taxFormDate' @_hash['additional_information'] = 'additionalInformation' @_hash['tax_form_type'] = 'taxFormType' @_hash['issuer'] = 'issuer' @_hash['recipient'] = 'recipient' @_hash['attributes'] = 'attributes' @_hash['error'] = 'error' @_hash['links'] = 'links' @_hash['crop_or_activity'] = 'cropOrActivity' @_hash['sales'] = 'sales' @_hash['cost_of_items_sold'] = 'costOfItemsSold' @_hash['sales_of_raised'] = 'salesOfRaised' @_hash['coop_distributions'] = 'coopDistributions' @_hash['ag_program_payments'] = 'agProgramPayments' @_hash['ccc_loans'] = 'cccLoans' @_hash['crop_insurance_proceeds'] = 'cropInsuranceProceeds' @_hash['custom_hire_income'] = 'customHireIncome' @_hash['other_income'] = 'otherIncome' @_hash['car_and_truck'] = 'carAndTruck' @_hash['chemicals'] = 'chemicals' @_hash['conservation'] = 'conservation' @_hash['custom_hire_expenses'] = 'customHireExpenses' @_hash['depreciation'] = 'depreciation' @_hash['employee_benefit_programs'] = 'employeeBenefitPrograms' @_hash['feed'] = 'feed' @_hash['fertilizers'] = 'fertilizers' @_hash['freight'] = 'freight' @_hash['fuel'] = 'fuel' @_hash['insurance'] = 'insurance' @_hash['mortgage_interest'] = 'mortgageInterest' @_hash['vehicle_loan_interest'] = 'vehicleLoanInterest' @_hash['other_interest'] = 'otherInterest' @_hash['labor_hired'] = 'laborHired' @_hash['pension'] = 'pension' @_hash['equipment_rent'] = 'equipmentRent' @_hash['other_rent'] = 'otherRent' @_hash['repairs'] = 'repairs' @_hash['seeds'] = 'seeds' @_hash['storage'] = 'storage' @_hash['supplies'] = 'supplies' @_hash['taxes'] = 'taxes' @_hash['utilities'] = 'utilities' @_hash['veterinary'] = 'veterinary' @_hash['other_expenses'] = 'otherExpenses' @_hash['capital_expenditures'] = 'capitalExpenditures' @_hash end |
.nullables ⇒ Object
An array for nullable fields
332 333 334 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 332 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 277 def self.optionals %w[ tax_year corrected account_id tax_form_id tax_form_date additional_information tax_form_type issuer recipient attributes error links crop_or_activity sales cost_of_items_sold sales_of_raised coop_distributions ag_program_payments ccc_loans crop_insurance_proceeds custom_hire_income other_income car_and_truck chemicals conservation custom_hire_expenses depreciation employee_benefit_programs feed fertilizers freight fuel insurance mortgage_interest vehicle_loan_interest other_interest labor_hired pension equipment_rent other_rent repairs seeds storage supplies taxes utilities veterinary other_expenses capital_expenditures ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 612 def inspect class_name = self.class.name.split('::').last "<#{class_name} tax_year: #{@tax_year.inspect}, corrected: #{@corrected.inspect},"\ " account_id: #{@account_id.inspect}, tax_form_id: #{@tax_form_id.inspect}, tax_form_date:"\ " #{@tax_form_date.inspect}, additional_information: #{@additional_information.inspect},"\ " tax_form_type: #{@tax_form_type.inspect}, issuer: #{@issuer.inspect}, recipient:"\ " #{@recipient.inspect}, attributes: #{@attributes.inspect}, error: #{@error.inspect},"\ " links: #{@links.inspect}, crop_or_activity: #{@crop_or_activity.inspect}, sales:"\ " #{@sales.inspect}, cost_of_items_sold: #{@cost_of_items_sold.inspect}, sales_of_raised:"\ " #{@sales_of_raised.inspect}, coop_distributions: #{@coop_distributions.inspect},"\ " ag_program_payments: #{@ag_program_payments.inspect}, ccc_loans: #{@ccc_loans.inspect},"\ " crop_insurance_proceeds: #{@crop_insurance_proceeds.inspect}, custom_hire_income:"\ " #{@custom_hire_income.inspect}, other_income: #{@other_income.inspect}, car_and_truck:"\ " #{@car_and_truck.inspect}, chemicals: #{@chemicals.inspect}, conservation:"\ " #{@conservation.inspect}, custom_hire_expenses: #{@custom_hire_expenses.inspect},"\ " depreciation: #{@depreciation.inspect}, employee_benefit_programs:"\ " #{@employee_benefit_programs.inspect}, feed: #{@feed.inspect}, fertilizers:"\ " #{@fertilizers.inspect}, freight: #{@freight.inspect}, fuel: #{@fuel.inspect}, insurance:"\ " #{@insurance.inspect}, mortgage_interest: #{@mortgage_interest.inspect},"\ " vehicle_loan_interest: #{@vehicle_loan_interest.inspect}, other_interest:"\ " #{@other_interest.inspect}, labor_hired: #{@labor_hired.inspect}, pension:"\ " #{@pension.inspect}, equipment_rent: #{@equipment_rent.inspect}, other_rent:"\ " #{@other_rent.inspect}, repairs: #{@repairs.inspect}, seeds: #{@seeds.inspect}, storage:"\ " #{@storage.inspect}, supplies: #{@supplies.inspect}, taxes: #{@taxes.inspect}, utilities:"\ " #{@utilities.inspect}, veterinary: #{@veterinary.inspect}, other_expenses:"\ " #{@other_expenses.inspect}, capital_expenditures: #{@capital_expenditures.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'lib/fdx_v660_api/models/farm_income_statement.rb', line 587 def to_s class_name = self.class.name.split('::').last "<#{class_name} tax_year: #{@tax_year}, corrected: #{@corrected}, account_id:"\ " #{@account_id}, tax_form_id: #{@tax_form_id}, tax_form_date: #{@tax_form_date},"\ " additional_information: #{@additional_information}, tax_form_type: #{@tax_form_type},"\ " issuer: #{@issuer}, recipient: #{@recipient}, attributes: #{@attributes}, error:"\ " #{@error}, links: #{@links}, crop_or_activity: #{@crop_or_activity}, sales: #{@sales},"\ " cost_of_items_sold: #{@cost_of_items_sold}, sales_of_raised: #{@sales_of_raised},"\ " coop_distributions: #{@coop_distributions}, ag_program_payments: #{@ag_program_payments},"\ " ccc_loans: #{@ccc_loans}, crop_insurance_proceeds: #{@crop_insurance_proceeds},"\ " custom_hire_income: #{@custom_hire_income}, other_income: #{@other_income}, car_and_truck:"\ " #{@car_and_truck}, chemicals: #{@chemicals}, conservation: #{@conservation},"\ " custom_hire_expenses: #{@custom_hire_expenses}, depreciation: #{@depreciation},"\ " employee_benefit_programs: #{@employee_benefit_programs}, feed: #{@feed}, fertilizers:"\ " #{@fertilizers}, freight: #{@freight}, fuel: #{@fuel}, insurance: #{@insurance},"\ " mortgage_interest: #{@mortgage_interest}, vehicle_loan_interest:"\ " #{@vehicle_loan_interest}, other_interest: #{@other_interest}, labor_hired:"\ " #{@labor_hired}, pension: #{@pension}, equipment_rent: #{@equipment_rent}, other_rent:"\ " #{@other_rent}, repairs: #{@repairs}, seeds: #{@seeds}, storage: #{@storage}, supplies:"\ " #{@supplies}, taxes: #{@taxes}, utilities: #{@utilities}, veterinary: #{@veterinary},"\ " other_expenses: #{@other_expenses}, capital_expenditures: #{@capital_expenditures},"\ " additional_properties: #{@additional_properties}>" end |