Class: ModulePos::Fiscalization::Entities::Base
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- ModulePos::Fiscalization::Entities::Base
- Defined in:
- lib/module_pos/fiscalization/entities/base.rb
Direct Known Subclasses
AgentInfo, AgentInfo::Agent, AgentInfo::PaymentsOperator, AgentInfo::TransferOperator, Doc, Doc::MoneyPosition, DocStatus, DocStatus::FailureInfo, DocStatus::FiscalInfo, PosStatus, Position, Position::SupplierInfo, Secret
Instance Method Summary collapse
-
#as_json ⇒ Hash
(also: #to_h)
Return camelize hash for request.
- #to_json ⇒ Object
Instance Method Details
#as_json ⇒ Hash Also known as: to_h
Return camelize hash for request
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/module_pos/fiscalization/entities/base.rb', line 19 def as_json(*) ApiUtils.camelize_keys attributes, ->(val) { case val when Base val.as_json when BigDecimal val.to_f else val end } end |
#to_json ⇒ Object
33 34 35 |
# File 'lib/module_pos/fiscalization/entities/base.rb', line 33 def to_json to_h.to_json end |