Module: Unit::TaxForm

Defined in:
lib/unit/models/tax_form/tax_form.rb,
lib/unit/models/tax_form/list_tax_form_params.rb

Defined Under Namespace

Classes: ListTaxFormParams

Constant Summary collapse

TAX_FORM_LIMIT =
100
TAX_FORM_OFFSET =
0

Class Method Summary collapse

Class Method Details

.get_by_id(tax_form_id:) ⇒ Object

Get tax form by id

Parameters:

  • tax_form_id (String)

See Also:



27
28
29
# File 'lib/unit/models/tax_form/tax_form.rb', line 27

def get_by_id(tax_form_id:)
  Unit::Resource::TaxFormResource.get_tax_form_by_id(tax_form_id)
end

.get_pdf_by_id(tax_form_id:) ⇒ Object

Get tax form pdf by id

Parameters:

  • tax_form_id (String)

See Also:



34
35
36
# File 'lib/unit/models/tax_form/tax_form.rb', line 34

def get_pdf_by_id(tax_form_id:)
  Unit::Resource::TaxFormResource.get_tax_form_pdf_by_id(tax_form_id)
end

.list_tax_forms(limit: TAX_FORM_LIMIT, offset: TAX_FORM_OFFSET, account_id: nil, customer_id: nil, tax_years: nil, tax_form_types: nil) ⇒ Object

List tax forms

Parameters:

  • limit (Integer) (defaults to: TAX_FORM_LIMIT)
  • offset (Integer) (defaults to: TAX_FORM_OFFSET)
  • account_id (String) (defaults to: nil)
  • customer_id (String) (defaults to: nil)
  • tax_years (String) (defaults to: nil)
  • tax_form_types (String) (defaults to: nil)

See Also:



18
19
20
21
22
# File 'lib/unit/models/tax_form/tax_form.rb', line 18

def list_tax_forms(limit: TAX_FORM_LIMIT, offset: TAX_FORM_OFFSET,
                   account_id: nil, customer_id: nil, tax_years: nil, tax_form_types: nil)
  params = ListTaxFormParams.new(limit, offset, , customer_id, tax_years, tax_form_types)
  Unit::Resource::TaxFormResource.list(params)
end