Class: Nfe::Generated::CalculoImpostosV1::CalculateItemRequest
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::CalculoImpostosV1::CalculateItemRequest
- Defined in:
- lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb,
sig/nfe/generated/calculo_impostos_v1/calculate_item_request.rbs
Instance Attribute Summary collapse
-
#acquisition_purpose ⇒ Object
readonly
Returns the value of attribute acquisition_purpose.
-
#benefit ⇒ Object
readonly
Returns the value of attribute benefit.
-
#cest ⇒ Object
readonly
Returns the value of attribute cest.
-
#discount_amount ⇒ Object
readonly
Returns the value of attribute discount_amount.
-
#ex_tipi ⇒ Object
readonly
Returns the value of attribute ex_tipi.
-
#freight_amount ⇒ Object
readonly
Returns the value of attribute freight_amount.
-
#gtin ⇒ Object
readonly
Returns the value of attribute gtin.
-
#icms ⇒ Object
readonly
Returns the value of attribute icms.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ii ⇒ Object
readonly
Returns the value of attribute ii.
-
#insurance_amount ⇒ Object
readonly
Returns the value of attribute insurance_amount.
-
#issuer_tax_profile ⇒ Object
readonly
Returns the value of attribute issuer_tax_profile.
-
#ncm ⇒ Object
readonly
Returns the value of attribute ncm.
-
#operation_code ⇒ Object
readonly
Returns the value of attribute operation_code.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#others_amount ⇒ Object
readonly
Returns the value of attribute others_amount.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#recipient_tax_profile ⇒ Object
readonly
Returns the value of attribute recipient_tax_profile.
-
#sku ⇒ Object
readonly
Returns the value of attribute sku.
-
#unit_amount ⇒ Object
readonly
Returns the value of attribute unit_amount.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ CalculateItemRequest
constructor
A new instance of CalculateItemRequest.
Constructor Details
#initialize ⇒ CalculateItemRequest
Returns a new instance of CalculateItemRequest.
30 |
# File 'sig/nfe/generated/calculo_impostos_v1/calculate_item_request.rbs', line 30
def initialize: (?acquisition_purpose: String?, ?benefit: String?, ?cest: String?, ?discount_amount: Float?, ?ex_tipi: String?, ?freight_amount: Float?, ?gtin: String?, ?icms: Icms, id: String, ?ii: Ii, ?insurance_amount: Float?, ?issuer_tax_profile: String?, ?ncm: String?, operation_code: Integer, origin: untyped, ?others_amount: Float?, quantity: Float, ?recipient_tax_profile: String?, ?sku: String?, unit_amount: Float) -> void
|
Instance Attribute Details
#acquisition_purpose ⇒ Object (readonly)
Returns the value of attribute acquisition_purpose
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def acquisition_purpose @acquisition_purpose end |
#benefit ⇒ Object (readonly)
Returns the value of attribute benefit
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def benefit @benefit end |
#cest ⇒ Object (readonly)
Returns the value of attribute cest
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def cest @cest end |
#discount_amount ⇒ Object (readonly)
Returns the value of attribute discount_amount
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def discount_amount @discount_amount end |
#ex_tipi ⇒ Object (readonly)
Returns the value of attribute ex_tipi
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def ex_tipi @ex_tipi end |
#freight_amount ⇒ Object (readonly)
Returns the value of attribute freight_amount
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def freight_amount @freight_amount end |
#gtin ⇒ Object (readonly)
Returns the value of attribute gtin
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def gtin @gtin end |
#icms ⇒ Object (readonly)
Returns the value of attribute icms
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def icms @icms end |
#id ⇒ Object (readonly)
Returns the value of attribute id
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def id @id end |
#ii ⇒ Object (readonly)
Returns the value of attribute ii
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def ii @ii end |
#insurance_amount ⇒ Object (readonly)
Returns the value of attribute insurance_amount
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def insurance_amount @insurance_amount end |
#issuer_tax_profile ⇒ Object (readonly)
Returns the value of attribute issuer_tax_profile
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def issuer_tax_profile @issuer_tax_profile end |
#ncm ⇒ Object (readonly)
Returns the value of attribute ncm
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def ncm @ncm end |
#operation_code ⇒ Object (readonly)
Returns the value of attribute operation_code
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def operation_code @operation_code end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def origin @origin end |
#others_amount ⇒ Object (readonly)
Returns the value of attribute others_amount
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def others_amount @others_amount end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def quantity @quantity end |
#recipient_tax_profile ⇒ Object (readonly)
Returns the value of attribute recipient_tax_profile
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def recipient_tax_profile @recipient_tax_profile end |
#sku ⇒ Object (readonly)
Returns the value of attribute sku
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def sku @sku end |
#unit_amount ⇒ Object (readonly)
Returns the value of attribute unit_amount
9 10 11 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 9 def unit_amount @unit_amount end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/nfe/generated/calculo_impostos_v1/calculate_item_request.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( acquisition_purpose: payload["acquisitionPurpose"], benefit: payload["benefit"], cest: payload["cest"], discount_amount: payload["discountAmount"], ex_tipi: payload["exTipi"], freight_amount: payload["freightAmount"], gtin: payload["gtin"], icms: Icms.from_api(payload["icms"]), id: payload["id"], ii: Ii.from_api(payload["ii"]), insurance_amount: payload["insuranceAmount"], issuer_tax_profile: payload["issuerTaxProfile"], ncm: payload["ncm"], operation_code: payload["operationCode"], origin: payload["origin"], others_amount: payload["othersAmount"], quantity: payload["quantity"], recipient_tax_profile: payload["recipientTaxProfile"], sku: payload["sku"], unit_amount: payload["unitAmount"], ) end |
.new ⇒ instance
29 |
# File 'sig/nfe/generated/calculo_impostos_v1/calculate_item_request.rbs', line 29
def self.new: (?acquisition_purpose: String?, ?benefit: String?, ?cest: String?, ?discount_amount: Float?, ?ex_tipi: String?, ?freight_amount: Float?, ?gtin: String?, ?icms: Icms, id: String, ?ii: Ii, ?insurance_amount: Float?, ?issuer_tax_profile: String?, ?ncm: String?, operation_code: Integer, origin: untyped, ?others_amount: Float?, quantity: Float, ?recipient_tax_profile: String?, ?sku: String?, unit_amount: Float) -> instance
|