Skip to content

Commit

Permalink
Merge pull request #225 from plivo/ns-add-new-param-mdr
Browse files Browse the repository at this point in the history
SMS-6066 - adding new params on mdr object
  • Loading branch information
renoldthomas-plivo authored Aug 25, 2023
2 parents 1190383 + bfe260f commit 730507a
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 25 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Change Log
## [4.48.0](https://github.com/plivo/plivo-ruby/tree/v4.48.0) (2023-08-25)
**Feature - Added New Param 'carrier_fees', 'carrier_fees_rate', 'destination_network' in Get Message and List Message APIs**
- Added new params on message get and list response

## [4.47.0](https://github.com/plivo/plivo-ruby/tree/v4.47.0) (2023-08-03)
**Feature - DLT parameters**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
Add this line to your application's Gemfile:

```ruby
gem 'plivo', '>= 4.47.0'
gem 'plivo', '>= 4.48.0'
```

And then execute:
Expand Down
5 changes: 4 additions & 1 deletion lib/plivo/resources/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def to_s
replaced_sender: @replaced_sender,
dlt_entity_id: @dlt_entity_id,
dlt_template_id: @dlt_template_id,
dlt_template_category: @dlt_template_category
dlt_template_category: @dlt_template_category,
destination_network: @destination_network,
carrier_fees_rate: @carrier_fees_rate,
carrier_fees: @carrier_fees
}.to_s
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/plivo/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Plivo
VERSION = "4.47.0".freeze
VERSION = "4.48.0".freeze
end
5 changes: 4 additions & 1 deletion spec/mocks/messageGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"is_domestic": false,
"dlt_entity_id": "1234",
"dlt_template_id": "5678",
"dlt_template_category": "service_implicit"
"dlt_template_category": "service_implicit",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
}
100 changes: 80 additions & 20 deletions spec/mocks/messageListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"is_domestic": false,
"dlt_entity_id": "1245",
"dlt_template_id": "9585",
"dlt_template_category": "promotional"
"dlt_template_category": "promotional",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -43,7 +46,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -62,7 +68,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -81,7 +90,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -100,7 +112,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -119,7 +134,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -138,7 +156,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -157,7 +178,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -176,7 +200,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -195,7 +222,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -214,7 +244,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -233,7 +266,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -252,7 +288,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -271,7 +310,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -290,7 +332,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": null,
Expand All @@ -309,7 +354,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -328,7 +376,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -347,7 +398,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -366,7 +420,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
},
{
"error_code": "000",
Expand All @@ -385,7 +442,10 @@
"is_domestic": false,
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"destination_network": "Verizon",
"carrier_fees_rate": "0.420",
"carrier_fees": "0.001"
}
]
}
6 changes: 5 additions & 1 deletion spec/resource_messages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def to_json(message)
is_domestic: message.is_domestic,
dlt_entity_id: message.dlt_entity_id,
dlt_template_id: message.dlt_template_id,
dlt_template_category: message.dlt_template_category
dlt_template_category: message.dlt_template_category,
destination_network: message.destination_network,
carrier_fees_rate: message.carrier_fees_rate,
carrier_fees: message.carrier_fees
}.to_json
end

Expand Down Expand Up @@ -81,6 +84,7 @@ def to_json_list(list_object)
expect(response.requester_ip).to eql("192.168.1.1")
expect(response.dlt_entity_id).to eql("1234")
expect(response.dlt_template_id).to eql("5678")
expect(response.destination_network).to eql("Verizon")
expect(response.dlt_template_category).to eql("service_implicit")
end

Expand Down

0 comments on commit 730507a

Please sign in to comment.