Class: Nfe::Generated::Nfeio::ProcessingBatchSummaryResponsePage

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProcessingBatchSummaryResponsePage

Returns a new instance of ProcessingBatchSummaryResponsePage.

Parameters:



15
# File 'sig/nfe/generated/nfeio/processing_batch_summary_response_page.rbs', line 15

def initialize: (?has_next: bool, ?has_previous: bool, ?items: Array[ProcessingBatchSummaryResponse]?, ?next_cursor: GuidPaginationCursor, ?previous_cursor: GuidPaginationCursor) -> void

Instance Attribute Details

#has_nextObject (readonly)

Returns the value of attribute has_next

Returns:

  • (Object)

    the current value of has_next



9
10
11
# File 'lib/nfe/generated/nfeio/processing_batch_summary_response_page.rb', line 9

def has_next
  @has_next
end

#has_previousObject (readonly)

Returns the value of attribute has_previous

Returns:

  • (Object)

    the current value of has_previous



9
10
11
# File 'lib/nfe/generated/nfeio/processing_batch_summary_response_page.rb', line 9

def has_previous
  @has_previous
end

#itemsObject (readonly)

Returns the value of attribute items

Returns:

  • (Object)

    the current value of items



9
10
11
# File 'lib/nfe/generated/nfeio/processing_batch_summary_response_page.rb', line 9

def items
  @items
end

#next_cursorObject (readonly)

Returns the value of attribute next_cursor

Returns:

  • (Object)

    the current value of next_cursor



9
10
11
# File 'lib/nfe/generated/nfeio/processing_batch_summary_response_page.rb', line 9

def next_cursor
  @next_cursor
end

#previous_cursorObject (readonly)

Returns the value of attribute previous_cursor

Returns:

  • (Object)

    the current value of previous_cursor



9
10
11
# File 'lib/nfe/generated/nfeio/processing_batch_summary_response_page.rb', line 9

def previous_cursor
  @previous_cursor
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/nfeio/processing_batch_summary_response_page.rb', line 10

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

  new(
    has_next: payload["hasNext"],
    has_previous: payload["hasPrevious"],
    items: (payload["items"] || []).map { |e| ProcessingBatchSummaryResponse.from_api(e) },
    next_cursor: GuidPaginationCursor.from_api(payload["nextCursor"]),
    previous_cursor: GuidPaginationCursor.from_api(payload["previousCursor"]),
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


14
# File 'sig/nfe/generated/nfeio/processing_batch_summary_response_page.rbs', line 14

def self.new: (?has_next: bool, ?has_previous: bool, ?items: Array[ProcessingBatchSummaryResponse]?, ?next_cursor: GuidPaginationCursor, ?previous_cursor: GuidPaginationCursor) -> instance