Class: Nfe::Generated::NfProdutoV2::ImportDeclarationResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeImportDeclarationResource

Returns a new instance of ImportDeclarationResource.

Parameters:

  • acquirer_federal_tax_number: (String, nil)
  • additions: (Array[AdditionResource], nil)
  • code: (String, nil)
  • customs_clearance_name: (String, nil)
  • customs_clearance_state: (Object)
  • customs_clearanced_on: (String, nil)
  • exporter: (String, nil)
  • intermediation: (Object)
  • international_transport: (Object)
  • registered_on: (String, nil)
  • state_third: (String, nil)


21
# File 'sig/nfe/generated/nf_produto_v2/import_declaration_resource.rbs', line 21

def initialize: (?acquirer_federal_tax_number: String?, ?additions: Array[AdditionResource]?, ?code: String?, ?customs_clearance_name: String?, ?customs_clearance_state: untyped, ?customs_clearanced_on: String?, ?exporter: String?, ?intermediation: untyped, ?international_transport: untyped, ?registered_on: String?, ?state_third: String?) -> void

Instance Attribute Details

#acquirer_federal_tax_numberObject (readonly)

Returns the value of attribute acquirer_federal_tax_number

Returns:

  • (Object)

    the current value of acquirer_federal_tax_number



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

def acquirer_federal_tax_number
  @acquirer_federal_tax_number
end

#additionsObject (readonly)

Returns the value of attribute additions

Returns:

  • (Object)

    the current value of additions



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

def additions
  @additions
end

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



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

def code
  @code
end

#customs_clearance_nameObject (readonly)

Returns the value of attribute customs_clearance_name

Returns:

  • (Object)

    the current value of customs_clearance_name



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

def customs_clearance_name
  @customs_clearance_name
end

#customs_clearance_stateObject (readonly)

Returns the value of attribute customs_clearance_state

Returns:

  • (Object)

    the current value of customs_clearance_state



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

def customs_clearance_state
  @customs_clearance_state
end

#customs_clearanced_onObject (readonly)

Returns the value of attribute customs_clearanced_on

Returns:

  • (Object)

    the current value of customs_clearanced_on



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

def customs_clearanced_on
  @customs_clearanced_on
end

#exporterObject (readonly)

Returns the value of attribute exporter

Returns:

  • (Object)

    the current value of exporter



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

def exporter
  @exporter
end

#intermediationObject (readonly)

Returns the value of attribute intermediation

Returns:

  • (Object)

    the current value of intermediation



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

def intermediation
  @intermediation
end

#international_transportObject (readonly)

Returns the value of attribute international_transport

Returns:

  • (Object)

    the current value of international_transport



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

def international_transport
  @international_transport
end

#registered_onObject (readonly)

Returns the value of attribute registered_on

Returns:

  • (Object)

    the current value of registered_on



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

def registered_on
  @registered_on
end

#state_thirdObject (readonly)

Returns the value of attribute state_third

Returns:

  • (Object)

    the current value of state_third



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

def state_third
  @state_third
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/nf_produto_v2/import_declaration_resource.rb', line 10

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

  new(
    acquirer_federal_tax_number: payload["acquirerFederalTaxNumber"],
    additions: (payload["additions"] || []).map { |e| AdditionResource.from_api(e) },
    code: payload["code"],
    customs_clearance_name: payload["customsClearanceName"],
    customs_clearance_state: payload["customsClearanceState"],
    customs_clearanced_on: payload["customsClearancedOn"],
    exporter: payload["exporter"],
    intermediation: payload["intermediation"],
    international_transport: payload["internationalTransport"],
    registered_on: payload["registeredOn"],
    state_third: payload["stateThird"],
  )
end

.newinstance

Parameters:

  • acquirer_federal_tax_number: (String, nil)
  • additions: (Array[AdditionResource], nil)
  • code: (String, nil)
  • customs_clearance_name: (String, nil)
  • customs_clearance_state: (Object)
  • customs_clearanced_on: (String, nil)
  • exporter: (String, nil)
  • intermediation: (Object)
  • international_transport: (Object)
  • registered_on: (String, nil)
  • state_third: (String, nil)

Returns:

  • (instance)


20
# File 'sig/nfe/generated/nf_produto_v2/import_declaration_resource.rbs', line 20

def self.new: (?acquirer_federal_tax_number: String?, ?additions: Array[AdditionResource]?, ?code: String?, ?customs_clearance_name: String?, ?customs_clearance_state: untyped, ?customs_clearanced_on: String?, ?exporter: String?, ?intermediation: untyped, ?international_transport: untyped, ?registered_on: String?, ?state_third: String?) -> instance