module WireClient::AccountTransactionHelpers
Public Instance Methods
country_subdivision_abbr()
click to toggle source
# File lib/wire_client/base/account_transaction_helpers.rb, line 3 def country_subdivision_abbr return US_STATES[@country_subdivision] if a_full_name_us_state? @country_subdivision end
country_subdivision_name()
click to toggle source
# File lib/wire_client/base/account_transaction_helpers.rb, line 8 def country_subdivision_name return US_STATES.key(@country_subdivision) if an_abbreviated_us_state? @country_subdivision end
Protected Instance Methods
a_full_name_us_state?()
click to toggle source
# File lib/wire_client/base/account_transaction_helpers.rb, line 27 def a_full_name_us_state? within_the_us? && !an_abrreviated_state_name? end
an_abbreviated_us_state?()
click to toggle source
# File lib/wire_client/base/account_transaction_helpers.rb, line 23 def an_abbreviated_us_state? within_the_us? && an_abrreviated_state_name? end
an_abrreviated_state_name?()
click to toggle source
# File lib/wire_client/base/account_transaction_helpers.rb, line 19 def an_abrreviated_state_name? @country_subdivision.match(/\A[A-Z]{2,2}\z/) end
within_the_us?()
click to toggle source
# File lib/wire_client/base/account_transaction_helpers.rb, line 15 def within_the_us? @country == 'US' end