direct7 0.0.15 → 0.0.16

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: c0546e0b943b43bcc8e4c609055043703bd2265c0407389a2ed489683bdbbbba
4
- data.tar.gz: d6b2d1e9d8b5ede3f6c4e293a7a67a137b98e13c73ecc24c7cd4636e34137471
3
+ metadata.gz: 423361ec4f8a5b9b72ac7f154785511dbf4b040fb5135762d36569e0167372b8
4
+ data.tar.gz: f9148154385db307b499e9547fa1944d5290b83070913648b16ed3352ce142d6
5
5
  SHA512:
6
- metadata.gz: b53723c34ea53b71e3366d7db46d3c73e9053887d255d261193a07be9a8fe03fb99edbd855de1ad351bbbe65b0bbdd0cdc0e150f7f07a1964d9ee7cd9e79e748
7
- data.tar.gz: 258dcd2bc7648cae763f32e395cf308f476aeb3452a9c4bbb2e7004224affc609c745a8ccc2d8804d916cc238ea7750ae8022a52978a4ab1af162ec64563a3d5
6
+ metadata.gz: 18c3822051045542dc5ec210170e09d508ba530a6778d06127e1333400af77822c9df93e7d4937147ae4b23544a4baf5a21d3542896d829d4908b8372f95e198
7
+ data.tar.gz: cb4635ee81cd9ed9238932e72c70d109c02bf0d396ae0f79c6a7678e0c7e78902126f9e4f57c193c2a5250bc4d45deab15aca6cce596a08d52c7152d7963a954
data/README.md CHANGED
@@ -8,7 +8,7 @@ The SDK is available on RubyGems and can be installed using two methods:
8
8
  Add this line to your application's Gemfile:
9
9
 
10
10
  ```bash
11
- gem 'direct7', '~> 0.0.15'
11
+ gem 'direct7', '~> 0.0.16'
12
12
  ```
13
13
 
14
14
  And then execute:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.0.16
data/direct7.gemspec CHANGED
@@ -4,7 +4,7 @@ require "direct7/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "direct7"
7
- spec.version = "0.0.15"
7
+ spec.version = "0.0.16"
8
8
  spec.authors = ["Direct7 Networks"]
9
9
  spec.email = ["support@d7networks.com"]
10
10
  spec.summary = "Ruby SDK for Direct7 Platform REST API"
@@ -215,6 +215,14 @@ module Direct7
215
215
  'sections' => sections,
216
216
  'button' => list_button_text
217
217
  }
218
+ elsif interactive_type == 'location_request_message'
219
+ message['content']['interactive']['action'] = {
220
+ 'name' => "send_location"
221
+ }
222
+ elsif interactive_type == 'address_message'
223
+ message['content']['interactive']['action'] = {
224
+ 'parameters' => parameters,
225
+ }
218
226
  end
219
227
  end
220
228
 
data/test/test.rb CHANGED
@@ -544,6 +544,89 @@ class TestSERVICES < Test::Unit::TestCase
544
544
  puts response
545
545
  end
546
546
 
547
+ # Interactive : location request
548
+ def test_send_whatsapp_interactive_message
549
+ response = @client.whatsapp.send_whatsapp_interactive_message(
550
+ originator='971563XXXXXX',
551
+ recipient='991999999XXXX',
552
+ interactive_type= "location_request_message",
553
+ header_type= nil,
554
+ header_text= nil,
555
+ header_link=nil, header_file_name=nil,
556
+ body_text= "Lets make a trip!",
557
+ footer_text= nil,
558
+ parameters= nil, sections=nil,
559
+ buttons=nil
560
+ )
561
+ puts response
562
+ end
563
+
564
+ # Interactive : address message
565
+ def test_send_whatsapp_interactive_message
566
+ parameters = {
567
+ "country": "IN",
568
+ "values": {
569
+ "name": "Steni Mariya",
570
+ "phone_number": "+97156965xxxx",
571
+ "in_pin_code": 680026,
572
+ "house_number": "45",
573
+ "floor_number": "3",
574
+ "tower_number": 34,
575
+ "building_name": "Excel",
576
+ "address": "House name",
577
+ "landmark_area": "Near Mobile Tower",
578
+ "city": "Thrissur",
579
+ "state": "Kerala"
580
+ },
581
+ "saved_addresses": [
582
+ {
583
+ "id": "address1",
584
+ "value": {
585
+ "name": "Lifiya Mariya",
586
+ "phone_number": "+971569xxxxx",
587
+ "in_pin_code": 680026,
588
+ "house_number": "45",
589
+ "floor_number": "3",
590
+ "tower_number": 34,
591
+ "building_name": "Excel",
592
+ "address": "House name",
593
+ "landmark_area": "Near Mobile Tower",
594
+ "city": "Thrissur",
595
+ "state": "Kerala"
596
+ }
597
+ },
598
+ {
599
+ "id": "address1",
600
+ "value": {
601
+ "name": "Mariya",
602
+ "phone_number": "+971569658xxx",
603
+ "in_pin_code": 680026,
604
+ "house_number": "45",
605
+ "floor_number": "3",
606
+ "tower_number": 34,
607
+ "building_name": "Excel",
608
+ "address": "House name",
609
+ "landmark_area": "Near Mobile Tower",
610
+ "city": "Thrissur",
611
+ "state": "Kerala"
612
+ }
613
+ }
614
+ ]
615
+ }
616
+ response = @client.whatsapp.send_whatsapp_interactive_message(
617
+ originator='971563XXXXXX',
618
+ recipient='991999999XXXX',
619
+ interactive_type= "address_message",
620
+ header_type= "text",
621
+ header_text= "Payment$ for D7 Whatsapp Service",
622
+ header_link=nil, header_file_name=nil,
623
+ body_text= "Direct7 Networks is a messaging service provider that specializes in helping organizations efficiently communicate with their customers.",
624
+ footer_text= "Thank You",
625
+ parameters= parameters
626
+ )
627
+ puts response
628
+ end
629
+
547
630
  # Interactive : list
548
631
  def test_send_whatsapp_interactive_message
549
632
  sections = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: direct7
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Direct7 Networks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-28 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json