Class: RubyPtvApi::Operation::XLocate::FindAddressByText

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_ptv_api/operation/x_locate/find_address_by_text.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#result_field_array, #search_option_base_array, #sort_option_array

Attributes inherited from Base

#coord_format, #profile

Instance Method Summary collapse

Methods inherited from Base

#additional_fields, #additional_fields=, #call, #extra_params, #options, #options=, #ptv_path, #sorting, #sorting=

Methods inherited from Base

#connection, #default_params, #demodulize, #demodulized_name, #endpoint, #parent_module_name, #post, #ptv_path, #underscore, #uri

Constructor Details

#initialize(text, country) ⇒ FindAddressByText

Returns a new instance of FindAddressByText.



7
8
9
10
# File 'lib/ruby_ptv_api/operation/x_locate/find_address_by_text.rb', line 7

def initialize(text, country)
  @text    = text
  @country = country
end

Instance Attribute Details

#countryObject (readonly)

Returns the value of attribute country.



5
6
7
# File 'lib/ruby_ptv_api/operation/x_locate/find_address_by_text.rb', line 5

def country
  @country
end

#textObject (readonly)

Returns the value of attribute text.



5
6
7
# File 'lib/ruby_ptv_api/operation/x_locate/find_address_by_text.rb', line 5

def text
  @text
end

Instance Method Details

#paramsObject



16
17
18
19
20
21
22
23
24
# File 'lib/ruby_ptv_api/operation/x_locate/find_address_by_text.rb', line 16

def params
  { 
    address: text,
    country: country,
    options: options,
    sorting: sorting,
    additionalFields: additional_fields
  }
end

#ptv_functionObject



12
13
14
# File 'lib/ruby_ptv_api/operation/x_locate/find_address_by_text.rb', line 12

def ptv_function
  'findAddressByText'
end