Class: WyWecall::Client
- Inherits:
-
Object
- Object
- WyWecall::Client
- Includes:
- Api::Account, Api::BackUser, Api::Bot, Api::FilterRule, Api::HttpBase, Api::Intent, Api::Line, Api::LinePolicy, Api::Order, Api::Seat, Api::Sign, Api::Sms, Api::Task, Api::TaskCall, Api::Wallet
- Defined in:
- lib/wy_wecall/client.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#api_path ⇒ Object
Returns the value of attribute api_path.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#app_key ⇒ Object
Returns the value of attribute app_key.
-
#app_secret ⇒ Object
Returns the value of attribute app_secret.
-
#app_type ⇒ Object
Returns the value of attribute app_type.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#connection_adapter ⇒ Object
Returns the value of attribute connection_adapter.
-
#debug_flag ⇒ Object
Returns the value of attribute debug_flag.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #log_debug(message) ⇒ Object
Methods included from Api::Sign
#build_body_signature, #build_signature
Methods included from Api::Wallet
#query_wallet_info, #query_wallet_sms_info
Methods included from Api::TaskCall
#delete_task_call, #query_filtered_call_list, #query_task_call_detail, #query_task_call_list, #query_trask_call_un_call_list
Methods included from Api::Task
#delete_task, #import_customer, #import_customer_with_result, #query_console_folder_list, #query_task_detail, #query_task_list, #query_task_properties, #query_task_summary, #save_task, #start_task, #start_timing_task, #stop_task, #stop_timing_task
Methods included from Api::Sms
#query_sms_send_record_list, #query_sms_template_list, #query_valid_sms_template_list
Methods included from Api::Seat
#query_seat_details, #query_seat_info
Methods included from Api::Order
#query_call_order_list, #query_sms_order_list
Methods included from Api::LinePolicy
Methods included from Api::Line
Methods included from Api::Intent
#create_intent, #delete_intent, #query_intent_group_detail, #query_intent_groups, #query_intent_groups_by_ids, #update_intent
Methods included from Api::FilterRule
Methods included from Api::Bot
Methods included from Api::BackUser
#add_black_user, #delete_black_user, #query_black_user_by_phone, #query_black_user_group_list
Methods included from Api::Account
Methods included from Api::HttpBase
#api_url, #conn, #current_timestamp, #get, #post
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/wy_wecall/client.rb', line 25 def initialize( = {}) @app_key = [:app_key] || WyWecall.configuration.app_key @app_secret = [:app_secret] || WyWecall.configuration.app_secret @app_type = [:app_type] || WyWecall.configuration.app_type @algorithm = [:algorithm] || WyWecall.configuration.algorithm || WyWecall::Configuration::DEFAULT_ALGORITHM @headers = [:headers] || WyWecall.configuration.headers || WyWecall::Configuration::DEFAULT_HEADERS @base_url = [:base_url] || WyWecall.configuration.base_url || WyWecall::Configuration::DEFAULT_BASE_URL @connection_adapter = [:connection_adapter] || WyWecall.configuration.connection_adapter || WyWecall::Configuration::DEFAULT_CONNECTION_ADAPTER @timeout = [:timeout] || WyWecall.configuration.timeout || WyWecall::Configuration::DEFAULT_TIMEOUT @open_timeout = [:open_timeout] || WyWecall.configuration.open_timeout || WyWecall::Configuration::DEFAULT_OPEN_TIMEOUT @api_path = [:api_path] || WyWecall.configuration.api_path || WyWecall::Configuration::DEFAULT_API_PATH @api_version = [:api_version] || WyWecall.configuration.api_version || WyWecall::Configuration::DEFAULT_API_VERSION @debug_flag = [:debug_flag] || WyWecall.configuration.debug_flag || WyWecall::Configuration::DEFAULT_DEBUG_FLAG end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def algorithm @algorithm end |
#api_path ⇒ Object
Returns the value of attribute api_path.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def api_path @api_path end |
#api_version ⇒ Object
Returns the value of attribute api_version.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def api_version @api_version end |
#app_key ⇒ Object
Returns the value of attribute app_key.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def app_key @app_key end |
#app_secret ⇒ Object
Returns the value of attribute app_secret.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def app_secret @app_secret end |
#app_type ⇒ Object
Returns the value of attribute app_type.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def app_type @app_type end |
#base_url ⇒ Object
Returns the value of attribute base_url.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def base_url @base_url end |
#connection_adapter ⇒ Object
Returns the value of attribute connection_adapter.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def connection_adapter @connection_adapter end |
#debug_flag ⇒ Object
Returns the value of attribute debug_flag.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def debug_flag @debug_flag end |
#headers ⇒ Object
Returns the value of attribute headers.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def headers @headers end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def open_timeout @open_timeout end |
#timeout ⇒ Object
Returns the value of attribute timeout.
21 22 23 |
# File 'lib/wy_wecall/client.rb', line 21 def timeout @timeout end |
Instance Method Details
#log_debug(message) ⇒ Object
40 41 42 43 44 |
# File 'lib/wy_wecall/client.rb', line 40 def log_debug() return unless @debug_flag puts end |