Class: Nfe::Generated::CalculoImpostosV1::CalculateRequest
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::CalculoImpostosV1::CalculateRequest
- Defined in:
- lib/nfe/generated/calculo_impostos_v1/calculate_request.rb,
sig/nfe/generated/calculo_impostos_v1/calculate_request.rbs
Instance Attribute Summary collapse
-
#collection_id ⇒ Object
readonly
Returns the value of attribute collection_id.
-
#is_product_registration ⇒ Object
readonly
Returns the value of attribute is_product_registration.
-
#issuer ⇒ Object
readonly
Returns the value of attribute issuer.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#operation_type ⇒ Object
readonly
Returns the value of attribute operation_type.
-
#recipient ⇒ Object
readonly
Returns the value of attribute recipient.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ CalculateRequest
constructor
A new instance of CalculateRequest.
Constructor Details
#initialize ⇒ CalculateRequest
Returns a new instance of CalculateRequest.
16 |
# File 'sig/nfe/generated/calculo_impostos_v1/calculate_request.rbs', line 16
def initialize: (?collection_id: String?, ?is_product_registration: bool, issuer: CalculateRequestIssuer, items: Array[CalculateItemRequest], operation_type: untyped, recipient: CalculateRequestRecipient) -> void
|
Instance Attribute Details
#collection_id ⇒ Object (readonly)
Returns the value of attribute collection_id
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_request.rb', line 9 def collection_id @collection_id end |
#is_product_registration ⇒ Object (readonly)
Returns the value of attribute is_product_registration
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_request.rb', line 9 def is_product_registration @is_product_registration end |
#issuer ⇒ Object (readonly)
Returns the value of attribute issuer
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_request.rb', line 9 def issuer @issuer end |
#items ⇒ Object (readonly)
Returns the value of attribute items
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_request.rb', line 9 def items @items end |
#operation_type ⇒ Object (readonly)
Returns the value of attribute operation_type
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_request.rb', line 9 def operation_type @operation_type end |
#recipient ⇒ Object (readonly)
Returns the value of attribute recipient
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_request.rb', line 9 def recipient @recipient end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_request.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( collection_id: payload["collectionId"], is_product_registration: payload["isProductRegistration"], issuer: CalculateRequestIssuer.from_api(payload["issuer"]), items: (payload["items"] || []).map { |e| CalculateItemRequest.from_api(e) }, operation_type: payload["operationType"], recipient: CalculateRequestRecipient.from_api(payload["recipient"]), ) end |
.new ⇒ instance
15 |
# File 'sig/nfe/generated/calculo_impostos_v1/calculate_request.rbs', line 15
def self.new: (?collection_id: String?, ?is_product_registration: bool, issuer: CalculateRequestIssuer, items: Array[CalculateItemRequest], operation_type: untyped, recipient: CalculateRequestRecipient) -> instance
|