Class: SmartyStreets::USExtract::Lookup

Inherits:
JSONAble
  • Object
show all
Defined in:
lib/smartystreets_ruby_sdk/us_extract/lookup.rb

Overview

In addition to holding all of the input data for this lookup, this class also will contain the result of the lookup after it comes back from the API.

See “smartystreets.com/docs/cloud/us-extract-api#http-request-input-fields

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from JSONAble

#from_json!, #to_json

Constructor Details

#initialize(text = nil, html = nil, aggressive = nil, addresses_have_line_breaks = nil, addresses_per_line = nil, match = nil, custom_param_hash = nil) ⇒ Lookup

Returns a new instance of Lookup.



12
13
14
15
16
17
18
19
20
21
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 12

def initialize(text=nil, html=nil, aggressive=nil, addresses_have_line_breaks=nil, addresses_per_line=nil, match=nil, custom_param_hash=nil)
  @text = text
  @html = html
  @aggressive = aggressive
  @addresses_have_line_breaks = addresses_have_line_breaks
  @addresses_per_line = addresses_per_line
  @match = match
  @result = nil
  @custom_param_hash = {}
end

Instance Attribute Details

#addresses_have_line_breaksObject

Returns the value of attribute addresses_have_line_breaks.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def addresses_have_line_breaks
  @addresses_have_line_breaks
end

#addresses_per_lineObject

Returns the value of attribute addresses_per_line.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def addresses_per_line
  @addresses_per_line
end

#aggressiveObject

Returns the value of attribute aggressive.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def aggressive
  @aggressive
end

#custom_param_hashObject

Returns the value of attribute custom_param_hash.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def custom_param_hash
  @custom_param_hash
end

#htmlObject

Returns the value of attribute html.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def html
  @html
end

#matchObject

Returns the value of attribute match.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def match
  @match
end

#resultObject

Returns the value of attribute result.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def result
  @result
end

#textObject

Returns the value of attribute text.



10
11
12
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 10

def text
  @text
end

Instance Method Details

#add_custom_parameter(parameter, value) ⇒ Object



23
24
25
# File 'lib/smartystreets_ruby_sdk/us_extract/lookup.rb', line 23

def add_custom_parameter(parameter, value)
  @custom_param_hash[parameter] = value
end