lib/kuaidi100_rails.rb in kuaidi100_rails-0.1.3 vs lib/kuaidi100_rails.rb in kuaidi100_rails-0.1.4
- old
+ new
@@ -54,9 +54,14 @@
#cn_name to en_code
def company_code(cn_name)
EXPRESS_KEYWORDS.select { |k, v| cn_name.to_s.downcase.include?(v.to_s.downcase) }.keys[0].to_s
end
+ #en_code to cn_name
+ def company_name(code_str)
+ EXPRESS_KEYWORDS[code_str.to_s.to_sym]
+ end
+
#subscribe express
#===Parameters==
#+com+ company code
#+nu+ express number
#+from+ start from address