Class: Io::Flow::V0::Clients::Romanizations
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::Romanizations
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Romanizations
constructor
A new instance of Romanizations.
- #post(romanization_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ Romanizations
Returns a new instance of Romanizations.
8132 8133 8134 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8132 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#post(romanization_form) ⇒ Object
8136 8137 8138 8139 8140 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8136 def post(romanization_form) (x = romanization_form; x.is_a?(::Io::Flow::V0::Models::RomanizationForm) ? x : ::Io::Flow::V0::Models::RomanizationForm.new(x)) r = @client.request("/romanize").with_json(romanization_form.to_json).post ::Io::Flow::V0::Models::Romanization.new(r) end |