Class: Io::Flow::V0::Clients::Romanizations

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Method Summary collapse

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