freshchat_whatsapp 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b9358445148af3b6517df994e94b2be0890569c4a1e0da5bbf1713a38d7b35e
4
- data.tar.gz: 0266f6d8591e0bb329ed04d40c653149cc59d1fb95ee3fcb389bd6909fb94206
3
+ metadata.gz: cf284892aad1e921175e65593c684f1c9c5c1c660ffd384f52463279d0da64b5
4
+ data.tar.gz: 7525d0386ffe6ed483240ba243b321683ad93cfff19cdca5951ff1de4fdcbacf
5
5
  SHA512:
6
- metadata.gz: dc57debcbb509e2dfd8a6f1ae6ced2f4fc07e2e79417812a31da486fd2d7081dd288bc388a17e878ab065e084c83664abdeb9dc73413178007b76a7411bf3de4
7
- data.tar.gz: b0ae3a5d35485fb2c07f2aaf7d398fefe604a05901e21803b9bf634e87a1988b10db62d91742c5d9bbe6f0671ecff80468dae99560e1966952098a9c94c3cb62
6
+ metadata.gz: 71349f2ebfc206db75152ec6fcbe329f31b4e005d3bbb8b968b8406e046b311d1592f9f3d0daf938ee8223976214ad8d1ee170c9cf53418e8692f28fbfe6d034
7
+ data.tar.gz: '05244586475043a615b112b9a53276110bd994d60bb183091c1232f0bb4ebdeedf8c00e4811827207bb876f924d0c677de6e9140cd8a26313b11746a78c3b989'
@@ -40,7 +40,7 @@ module FreshchatWhatsapp
40
40
  'template_name': @template_name,
41
41
  'language': {
42
42
  'policy': 'deterministic',
43
- 'code': 'en'
43
+ 'code': @language
44
44
  }
45
45
  }
46
46
  }
@@ -5,8 +5,10 @@ require 'freshchat_whatsapp/actions/check_message_status'
5
5
 
6
6
  module FreshchatWhatsapp
7
7
  class Api
8
- def initialize
9
- @base_path = FreshchatWhatsapp.configuration.base_path
8
+ def initialize(base_path=nil,token=nil)
9
+ fresh_chat_base_path = base_path || FreshchatWhatsapp.configuration.base_path
10
+ @base_path = fresh_chat_base_path
11
+ @token = token
10
12
  end
11
13
 
12
14
  def send_hsm_message(from_number, to_number, namespace, template_name, language, params)
@@ -33,7 +35,7 @@ module FreshchatWhatsapp
33
35
  attr_reader :base_path
34
36
 
35
37
  def client
36
- @client = FreshchatWhatsapp::Client.new
38
+ @client = FreshchatWhatsapp::Client.new(@base_path, @token)
37
39
  end
38
40
  end
39
41
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  module FreshchatWhatsapp
4
4
  class Client
5
- def initialize(token_type = :bearer)
6
- @base_path = FreshchatWhatsapp.configuration.base_path
7
- @token = FreshchatWhatsapp.configuration.api_key
5
+ def initialize(base_path=nil, token=nil, batoken_type = :bearer)
6
+ @base_path = base_path || FreshchatWhatsapp.configuration.base_path
7
+ @token = token || FreshchatWhatsapp.configuration.api_key
8
8
  @token_type = token_type
9
9
  end
10
10
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FreshchatWhatsapp
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freshchat_whatsapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvind Vyas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-22 00:00:00.000000000 Z
11
+ date: 2024-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday