Module: AvataxClient::ReverseCoercion
- Included in:
- AvataxClient::Request::Base
- Defined in:
- lib/avatax_client/reverse_coercion.rb
Overview
Transform a hash into a format compatible with Avatax.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#to_body ⇒ Hash
Build a hash that can be used in the request body to Avatax API.
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/avatax_client/reverse_coercion.rb', line 5 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#to_body ⇒ Hash
Build a hash that can be used in the request body to Avatax API
22 23 24 25 26 27 |
# File 'lib/avatax_client/reverse_coercion.rb', line 22 def to_body hash = to_hash hash = translate_names(hash) hash = transform_collections(hash) hash end |