Class: Nfe::Generated::ProductInvoiceRtcV1::IssuerResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIssuerResource

Returns a new instance of IssuerResource.

Parameters:

  • account_id: (String, nil)
  • address: (AddressResource)
  • company_registry_number: (Integer, nil)
  • economic_activities: (Array[EconomicActivityResource], nil)
  • email: (String, nil)
  • federal_tax_number: (Integer, nil)
  • id: (String, nil)
  • legal_nature: (Object)
  • municipal_tax_number: (String, nil)
  • name: (String, nil)
  • openning_date: (String, nil)
  • regional_sttax_number: (Integer, nil)
  • regional_tax_number: (Integer, nil)
  • special_tax_regime: (Object)
  • st_state_tax_number: (String, nil)
  • tax_regime: (Object)
  • trade_name: (String, nil)
  • type: (Object)


28
# File 'sig/nfe/generated/product_invoice_rtc_v1/issuer_resource.rbs', line 28

def initialize: (?account_id: String?, ?address: AddressResource, ?company_registry_number: Integer?, ?economic_activities: Array[EconomicActivityResource]?, ?email: String?, ?federal_tax_number: Integer?, ?id: String?, ?legal_nature: untyped, ?municipal_tax_number: String?, ?name: String?, ?openning_date: String?, ?regional_sttax_number: Integer?, ?regional_tax_number: Integer?, ?special_tax_regime: untyped, ?st_state_tax_number: String?, ?tax_regime: untyped, ?trade_name: String?, ?type: untyped) -> 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/product_invoice_rtc_v1/issuer_resource.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/product_invoice_rtc_v1/issuer_resource.rb', line 9

def address
  @address
end

#company_registry_numberObject (readonly)

Returns the value of attribute company_registry_number

Returns:

  • (Object)

    the current value of company_registry_number



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def company_registry_number
  @company_registry_number
end

#economic_activitiesObject (readonly)

Returns the value of attribute economic_activities

Returns:

  • (Object)

    the current value of economic_activities



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def economic_activities
  @economic_activities
end

#emailObject (readonly)

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def email
  @email
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/product_invoice_rtc_v1/issuer_resource.rb', line 9

def federal_tax_number
  @federal_tax_number
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def id
  @id
end

Returns the value of attribute legal_nature

Returns:

  • (Object)

    the current value of legal_nature



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def legal_nature
  @legal_nature
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/product_invoice_rtc_v1/issuer_resource.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/product_invoice_rtc_v1/issuer_resource.rb', line 9

def name
  @name
end

#openning_dateObject (readonly)

Returns the value of attribute openning_date

Returns:

  • (Object)

    the current value of openning_date



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def openning_date
  @openning_date
end

#regional_sttax_numberObject (readonly)

Returns the value of attribute regional_sttax_number

Returns:

  • (Object)

    the current value of regional_sttax_number



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def regional_sttax_number
  @regional_sttax_number
end

#regional_tax_numberObject (readonly)

Returns the value of attribute regional_tax_number

Returns:

  • (Object)

    the current value of regional_tax_number



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def regional_tax_number
  @regional_tax_number
end

#special_tax_regimeObject (readonly)

Returns the value of attribute special_tax_regime

Returns:

  • (Object)

    the current value of special_tax_regime



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def special_tax_regime
  @special_tax_regime
end

#st_state_tax_numberObject (readonly)

Returns the value of attribute st_state_tax_number

Returns:

  • (Object)

    the current value of st_state_tax_number



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def st_state_tax_number
  @st_state_tax_number
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/product_invoice_rtc_v1/issuer_resource.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/product_invoice_rtc_v1/issuer_resource.rb', line 9

def trade_name
  @trade_name
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 9

def type
  @type
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
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/nfe/generated/product_invoice_rtc_v1/issuer_resource.rb', line 10

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

  new(
    account_id: payload["accountId"],
    address: AddressResource.from_api(payload["address"]),
    company_registry_number: payload["companyRegistryNumber"],
    economic_activities: (payload["economicActivities"] || []).map { |e| EconomicActivityResource.from_api(e) },
    email: payload["email"],
    federal_tax_number: payload["federalTaxNumber"],
    id: payload["id"],
    legal_nature: payload["legalNature"],
    municipal_tax_number: payload["municipalTaxNumber"],
    name: payload["name"],
    openning_date: payload["openningDate"],
    regional_sttax_number: payload["regionalSTTaxNumber"],
    regional_tax_number: payload["regionalTaxNumber"],
    special_tax_regime: payload["specialTaxRegime"],
    st_state_tax_number: payload["stStateTaxNumber"],
    tax_regime: payload["taxRegime"],
    trade_name: payload["tradeName"],
    type: payload["type"],
  )
end

.newinstance

Parameters:

  • account_id: (String, nil)
  • address: (AddressResource)
  • company_registry_number: (Integer, nil)
  • economic_activities: (Array[EconomicActivityResource], nil)
  • email: (String, nil)
  • federal_tax_number: (Integer, nil)
  • id: (String, nil)
  • legal_nature: (Object)
  • municipal_tax_number: (String, nil)
  • name: (String, nil)
  • openning_date: (String, nil)
  • regional_sttax_number: (Integer, nil)
  • regional_tax_number: (Integer, nil)
  • special_tax_regime: (Object)
  • st_state_tax_number: (String, nil)
  • tax_regime: (Object)
  • trade_name: (String, nil)
  • type: (Object)

Returns:

  • (instance)


27
# File 'sig/nfe/generated/product_invoice_rtc_v1/issuer_resource.rbs', line 27

def self.new: (?account_id: String?, ?address: AddressResource, ?company_registry_number: Integer?, ?economic_activities: Array[EconomicActivityResource]?, ?email: String?, ?federal_tax_number: Integer?, ?id: String?, ?legal_nature: untyped, ?municipal_tax_number: String?, ?name: String?, ?openning_date: String?, ?regional_sttax_number: Integer?, ?regional_tax_number: Integer?, ?special_tax_regime: untyped, ?st_state_tax_number: String?, ?tax_regime: untyped, ?trade_name: String?, ?type: untyped) -> instance