Class: Nfe::Generated::ServiceInvoiceRtcV1::PartyDefinition

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePartyDefinition

Returns a new instance of PartyDefinition.

Parameters:

  • address: (AddressDefinition)
  • caepf: (String)
  • email: (String)
  • federal_tax_number: (Float)
  • municipal_tax_number: (String)
  • name: (String)
  • no_tax_id_reason: (String)
  • phone_number: (String)
  • state_tax_number: (String)
  • tax_regime: (String)
  • type: (String)


21
# File 'sig/nfe/generated/service_invoice_rtc_v1/party_definition.rbs', line 21

def initialize: (?address: AddressDefinition, ?caepf: String, ?email: String, ?federal_tax_number: Float, ?municipal_tax_number: String, ?name: String, ?no_tax_id_reason: String, ?phone_number: String, ?state_tax_number: String, ?tax_regime: String, ?type: String) -> void

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.rb', line 9

def address
  @address
end

#caepfObject (readonly)

Returns the value of attribute caepf

Returns:

  • (Object)

    the current value of caepf



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.rb', line 9

def caepf
  @caepf
end

#emailObject (readonly)

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.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/service_invoice_rtc_v1/party_definition.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/service_invoice_rtc_v1/party_definition.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/service_invoice_rtc_v1/party_definition.rb', line 9

def name
  @name
end

#no_tax_id_reasonObject (readonly)

Returns the value of attribute no_tax_id_reason

Returns:

  • (Object)

    the current value of no_tax_id_reason



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.rb', line 9

def no_tax_id_reason
  @no_tax_id_reason
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number

Returns:

  • (Object)

    the current value of phone_number



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.rb', line 9

def phone_number
  @phone_number
end

#state_tax_numberObject (readonly)

Returns the value of attribute state_tax_number

Returns:

  • (Object)

    the current value of state_tax_number



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.rb', line 9

def state_tax_number
  @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/service_invoice_rtc_v1/party_definition.rb', line 9

def tax_regime
  @tax_regime
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.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
# File 'lib/nfe/generated/service_invoice_rtc_v1/party_definition.rb', line 10

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

  new(
    address: AddressDefinition.from_api(payload["address"]),
    caepf: payload["caepf"],
    email: payload["email"],
    federal_tax_number: payload["federalTaxNumber"],
    municipal_tax_number: payload["municipalTaxNumber"],
    name: payload["name"],
    no_tax_id_reason: payload["noTaxIdReason"],
    phone_number: payload["phoneNumber"],
    state_tax_number: payload["stateTaxNumber"],
    tax_regime: payload["taxRegime"],
    type: payload["type"],
  )
end

.newinstance

Parameters:

  • address: (AddressDefinition)
  • caepf: (String)
  • email: (String)
  • federal_tax_number: (Float)
  • municipal_tax_number: (String)
  • name: (String)
  • no_tax_id_reason: (String)
  • phone_number: (String)
  • state_tax_number: (String)
  • tax_regime: (String)
  • type: (String)

Returns:

  • (instance)


20
# File 'sig/nfe/generated/service_invoice_rtc_v1/party_definition.rbs', line 20

def self.new: (?address: AddressDefinition, ?caepf: String, ?email: String, ?federal_tax_number: Float, ?municipal_tax_number: String, ?name: String, ?no_tax_id_reason: String, ?phone_number: String, ?state_tax_number: String, ?tax_regime: String, ?type: String) -> instance