Class: Nfe::Generated::NfConsumidorV2::TaxpayerCommentsResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTaxpayerCommentsResource

Returns a new instance of TaxpayerCommentsResource.

Parameters:

  • field: (String, nil)
  • text: (String, nil)


12
# File 'sig/nfe/generated/nf_consumidor_v2/taxpayer_comments_resource.rbs', line 12

def initialize: (?field: String?, ?text: String?) -> void

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field

Returns:

  • (Object)

    the current value of field



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/taxpayer_comments_resource.rb', line 9

def field
  @field
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/taxpayer_comments_resource.rb', line 9

def text
  @text
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
# File 'lib/nfe/generated/nf_consumidor_v2/taxpayer_comments_resource.rb', line 10

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

  new(
    field: payload["field"],
    text: payload["text"],
  )
end

.newinstance

Parameters:

  • field: (String, nil)
  • text: (String, nil)

Returns:

  • (instance)


11
# File 'sig/nfe/generated/nf_consumidor_v2/taxpayer_comments_resource.rbs', line 11

def self.new: (?field: String?, ?text: String?) -> instance