Class: Nfe::Generated::NfProdutoV2::TaxDeterminationResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTaxDeterminationResource

Returns a new instance of TaxDeterminationResource.

Parameters:

  • acquisition_purpose: (String, nil)
  • buyer_tax_profile: (String, nil)
  • issuer_tax_profile: (String, nil)
  • operation_code: (Integer, nil)
  • origin: (String, nil)


15
# File 'sig/nfe/generated/nf_produto_v2/tax_determination_resource.rbs', line 15

def initialize: (?acquisition_purpose: String?, ?buyer_tax_profile: String?, ?issuer_tax_profile: String?, ?operation_code: Integer?, ?origin: String?) -> void

Instance Attribute Details

#acquisition_purposeObject (readonly)

Returns the value of attribute acquisition_purpose

Returns:

  • (Object)

    the current value of acquisition_purpose



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/tax_determination_resource.rb', line 9

def acquisition_purpose
  @acquisition_purpose
end

#buyer_tax_profileObject (readonly)

Returns the value of attribute buyer_tax_profile

Returns:

  • (Object)

    the current value of buyer_tax_profile



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/tax_determination_resource.rb', line 9

def buyer_tax_profile
  @buyer_tax_profile
end

#issuer_tax_profileObject (readonly)

Returns the value of attribute issuer_tax_profile

Returns:

  • (Object)

    the current value of issuer_tax_profile



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/tax_determination_resource.rb', line 9

def issuer_tax_profile
  @issuer_tax_profile
end

#operation_codeObject (readonly)

Returns the value of attribute operation_code

Returns:

  • (Object)

    the current value of operation_code



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/tax_determination_resource.rb', line 9

def operation_code
  @operation_code
end

#originObject (readonly)

Returns the value of attribute origin

Returns:

  • (Object)

    the current value of origin



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/tax_determination_resource.rb', line 9

def origin
  @origin
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
# File 'lib/nfe/generated/nf_produto_v2/tax_determination_resource.rb', line 10

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

  new(
    acquisition_purpose: payload["acquisitionPurpose"],
    buyer_tax_profile: payload["buyerTaxProfile"],
    issuer_tax_profile: payload["issuerTaxProfile"],
    operation_code: payload["operationCode"],
    origin: payload["origin"],
  )
end

.newinstance

Parameters:

  • acquisition_purpose: (String, nil)
  • buyer_tax_profile: (String, nil)
  • issuer_tax_profile: (String, nil)
  • operation_code: (Integer, nil)
  • origin: (String, nil)

Returns:

  • (instance)


14
# File 'sig/nfe/generated/nf_produto_v2/tax_determination_resource.rbs', line 14

def self.new: (?acquisition_purpose: String?, ?buyer_tax_profile: String?, ?issuer_tax_profile: String?, ?operation_code: Integer?, ?origin: String?) -> instance