Class: Nfe::Generated::NfProdutoV2::TransportRateResource
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::NfProdutoV2::TransportRateResource
- Defined in:
- lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb,
sig/nfe/generated/nf_produto_v2/transport_rate_resource.rbs
Instance Attribute Summary collapse
-
#bc_retention_amount ⇒ Object
readonly
Returns the value of attribute bc_retention_amount.
-
#cfop ⇒ Object
readonly
Returns the value of attribute cfop.
-
#city_generator_fact_code ⇒ Object
readonly
Returns the value of attribute city_generator_fact_code.
-
#icms_retention_amount ⇒ Object
readonly
Returns the value of attribute icms_retention_amount.
-
#icms_retention_rate ⇒ Object
readonly
Returns the value of attribute icms_retention_rate.
-
#service_amount ⇒ Object
readonly
Returns the value of attribute service_amount.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ TransportRateResource
constructor
A new instance of TransportRateResource.
Constructor Details
#initialize ⇒ TransportRateResource
Returns a new instance of TransportRateResource.
16 |
# File 'sig/nfe/generated/nf_produto_v2/transport_rate_resource.rbs', line 16
def initialize: (?bc_retention_amount: Float?, ?cfop: Integer?, ?city_generator_fact_code: Integer?, ?icms_retention_amount: Float?, ?icms_retention_rate: Float?, ?service_amount: Float?) -> void
|
Instance Attribute Details
#bc_retention_amount ⇒ Object (readonly)
Returns the value of attribute bc_retention_amount
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb', line 9 def bc_retention_amount @bc_retention_amount end |
#cfop ⇒ Object (readonly)
Returns the value of attribute cfop
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb', line 9 def cfop @cfop end |
#city_generator_fact_code ⇒ Object (readonly)
Returns the value of attribute city_generator_fact_code
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb', line 9 def city_generator_fact_code @city_generator_fact_code end |
#icms_retention_amount ⇒ Object (readonly)
Returns the value of attribute icms_retention_amount
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb', line 9 def icms_retention_amount @icms_retention_amount end |
#icms_retention_rate ⇒ Object (readonly)
Returns the value of attribute icms_retention_rate
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb', line 9 def icms_retention_rate @icms_retention_rate end |
#service_amount ⇒ Object (readonly)
Returns the value of attribute service_amount
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb', line 9 def service_amount @service_amount end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nfe/generated/nf_produto_v2/transport_rate_resource.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( bc_retention_amount: payload["bcRetentionAmount"], cfop: payload["cfop"], city_generator_fact_code: payload["cityGeneratorFactCode"], icms_retention_amount: payload["icmsRetentionAmount"], icms_retention_rate: payload["icmsRetentionRate"], service_amount: payload["serviceAmount"], ) end |
.new ⇒ instance
15 |
# File 'sig/nfe/generated/nf_produto_v2/transport_rate_resource.rbs', line 15
def self.new: (?bc_retention_amount: Float?, ?cfop: Integer?, ?city_generator_fact_code: Integer?, ?icms_retention_amount: Float?, ?icms_retention_rate: Float?, ?service_amount: Float?) -> instance
|