Class: Nfe::Generated::ContribuintesV2::DFeTech_TaxPayers_Resources_CreateCompanyResourceItem

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb,
sig/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDFeTech_TaxPayers_Resources_CreateCompanyResourceItem

Returns a new instance of DFeTech_TaxPayers_Resources_CreateCompanyResourceItem.

Parameters:



17
# File 'sig/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rbs', line 17

def initialize: (?account_id: String?, address: DFeTech_TaxPayers_Resources_AddressResource, federal_tax_number: Integer, ?municipal_tax_number: String?, name: String, tax_regime: untyped, ?trade_name: String?) -> void

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id

Returns:

  • (Object)

    the current value of account_id



9
10
11
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 9

def 
  @account_id
end

#addressObject (readonly)

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



9
10
11
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 9

def address
  @address
end

#federal_tax_numberObject (readonly)

Returns the value of attribute federal_tax_number

Returns:

  • (Object)

    the current value of federal_tax_number



9
10
11
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 9

def federal_tax_number
  @federal_tax_number
end

#municipal_tax_numberObject (readonly)

Returns the value of attribute municipal_tax_number

Returns:

  • (Object)

    the current value of municipal_tax_number



9
10
11
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 9

def municipal_tax_number
  @municipal_tax_number
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 9

def name
  @name
end

#tax_regimeObject (readonly)

Returns the value of attribute tax_regime

Returns:

  • (Object)

    the current value of tax_regime



9
10
11
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 9

def tax_regime
  @tax_regime
end

#trade_nameObject (readonly)

Returns the value of attribute trade_name

Returns:

  • (Object)

    the current value of trade_name



9
10
11
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 9

def trade_name
  @trade_name
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:

  • (instance, nil)


10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    account_id: payload["accountId"],
    address: DFeTech_TaxPayers_Resources_AddressResource.from_api(payload["address"]),
    federal_tax_number: payload["federalTaxNumber"],
    municipal_tax_number: payload["municipalTaxNumber"],
    name: payload["name"],
    tax_regime: payload["taxRegime"],
    trade_name: payload["tradeName"],
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


16
# File 'sig/nfe/generated/contribuintes_v2/dfe_tech_tax_payers_resources_create_company_resource_item.rbs', line 16

def self.new: (?account_id: String?, address: DFeTech_TaxPayers_Resources_AddressResource, federal_tax_number: Integer, ?municipal_tax_number: String?, name: String, tax_regime: untyped, ?trade_name: String?) -> instance