Class: Nfe::Generated::CalculoImpostosV1::TaxCodePaginatedResponse
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::CalculoImpostosV1::TaxCodePaginatedResponse
- Defined in:
- lib/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rb,
sig/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rbs
Instance Attribute Summary collapse
-
#current_page ⇒ Object
readonly
Returns the value of attribute current_page.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
-
#total_pages ⇒ Object
readonly
Returns the value of attribute total_pages.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ TaxCodePaginatedResponse
constructor
A new instance of TaxCodePaginatedResponse.
Constructor Details
#initialize ⇒ TaxCodePaginatedResponse
Returns a new instance of TaxCodePaginatedResponse.
14 |
# File 'sig/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rbs', line 14
def initialize: (?current_page: Integer, ?items: Array[TaxCode]?, ?total_count: Integer, ?total_pages: Integer) -> void
|
Instance Attribute Details
#current_page ⇒ Object (readonly)
Returns the value of attribute current_page
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rb', line 9 def current_page @current_page end |
#items ⇒ Object (readonly)
Returns the value of attribute items
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rb', line 9 def items @items end |
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rb', line 9 def total_count @total_count end |
#total_pages ⇒ Object (readonly)
Returns the value of attribute total_pages
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rb', line 9 def total_pages @total_pages end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( current_page: payload["currentPage"], items: (payload["items"] || []).map { |e| TaxCode.from_api(e) }, total_count: payload["totalCount"], total_pages: payload["totalPages"], ) end |
.new ⇒ instance
13 |
# File 'sig/nfe/generated/calculo_impostos_v1/tax_code_paginated_response.rbs', line 13
def self.new: (?current_page: Integer, ?items: Array[TaxCode]?, ?total_count: Integer, ?total_pages: Integer) -> instance
|