Class: Unit::TaxForm::ListTaxFormParams
- Inherits:
-
Object
- Object
- Unit::TaxForm::ListTaxFormParams
- Defined in:
- lib/unit/models/tax_form/list_tax_form_params.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#customer_id ⇒ Object
readonly
Returns the value of attribute customer_id.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#tax_form_types ⇒ Object
readonly
Returns the value of attribute tax_form_types.
-
#tax_years ⇒ Object
readonly
Returns the value of attribute tax_years.
Instance Method Summary collapse
-
#initialize(limit = TAX_FORM_LIMIT, offset = TAX_FORM_OFFSET, account_id = nil, customer_id = nil, tax_years = nil, tax_form_types = nil) ⇒ ListTaxFormParams
constructor
A new instance of ListTaxFormParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(limit = TAX_FORM_LIMIT, offset = TAX_FORM_OFFSET, account_id = nil, customer_id = nil, tax_years = nil, tax_form_types = nil) ⇒ ListTaxFormParams
Returns a new instance of ListTaxFormParams.
16 17 18 19 20 21 22 23 24 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 16 def initialize(limit = TAX_FORM_LIMIT, offset = TAX_FORM_OFFSET, account_id = nil, customer_id = nil, tax_years = nil, tax_form_types = nil) @limit = limit @offset = offset @account_id = account_id @customer_id = customer_id @tax_years = tax_years @tax_form_types = tax_form_types end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 8 def account_id @account_id end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
8 9 10 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 8 def customer_id @customer_id end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
8 9 10 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 8 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 8 def offset @offset end |
#tax_form_types ⇒ Object (readonly)
Returns the value of attribute tax_form_types.
8 9 10 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 8 def tax_form_types @tax_form_types end |
#tax_years ⇒ Object (readonly)
Returns the value of attribute tax_years.
8 9 10 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 8 def tax_years @tax_years end |
Instance Method Details
#to_hash ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/unit/models/tax_form/list_tax_form_params.rb', line 26 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[accountId]": account_id, "filter[customerId]": customer_id, "filter[taxYears]": tax_years, "filter[taxFormTypes]": tax_form_types } params.compact end |