Skip to content

Commit

Permalink
Merge pull request #189 from plivo/campaign_creation_addition_param
Browse files Browse the repository at this point in the history
adding more attributes to campaign creation request
  • Loading branch information
narayana-plivo authored Sep 28, 2022
2 parents a370282 + 62daeca commit b5d6a3b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 14 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Change Log

## [4.30.1](https://github.com/plivo/plivo-go/tree/v4.30.1) (2022-09-20)
## [4.30.2](https://github.com/plivo/plivo-ruby/tree/v4.30.2) (2022-09-28)
**10DLC: Campaign request**
- Added more attributes to create campaign request

## [4.30.1](https://github.com/plivo/plivo-ruby/tree/v4.30.1) (2022-09-20)
**stability - faraday upgrade**
- faraday version upgrade

## [4.30.0](https://github.com/plivo/plivo-go/tree/v4.30.0) (2022-08-26)

## [4.30.0](https://github.com/plivo/plivo-ruby/tree/v4.30.0) (2022-08-26)
**Feature - 10DLC APIs**
- Added new 10DLC APIs

## [4.29.0](https://github.com/plivo/plivo-go/tree/v4.29.0) (2022-08-01)
## [4.29.0](https://github.com/plivo/plivo-ruby/tree/v4.29.0) (2022-08-01)
**Feature - Token Creation**
- `JWT Token Creation API` added functionality to create a new JWT token.

## [4.28.0](https://github.com/plivo/plivo-go/tree/v4.28.0) (2022-07-11)
## [4.28.0](https://github.com/plivo/plivo-ruby/tree/v4.28.0) (2022-07-11)
**Feature - STIR Attestation**
- Add stir attestation param as part of Get CDR and Get live call APIs Response

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.30.1'
gem 'plivo', '>= 4.30.2'
```

And then execute:
Expand Down
9 changes: 9 additions & 0 deletions lib/plivo/resources/campaign.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ def create(options=nil)
if not options[:usecase]
raise_invalid_request("usecase must be provided")
end
if not options[:message_flow]
raise_invalid_request("message_flow must be provided")
end
if not options[:help_message]
raise_invalid_request("help_message must be provided")
end
if not options[:optout_message]
raise_invalid_request("optout_message must be provided")
end
perform_create(options)
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.30.1".freeze
VERSION = "4.30.2".freeze
end
22 changes: 14 additions & 8 deletions spec/resource_campaign_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,27 @@ def to_json_get_numbers(obj)
"CUSTOMER_CARE",
"2FA"
],
description: "sample description text",
description: "sample description text should be 40 character",
embedded_link: false,
embedded_phone: false,
age_gated: false,
direct_lending: false,
subscriber_optin: true,
subscriber_optout: true,
subscriber_help: true,
sample1: "test 1",
sample2: "test 2",
sample1: "sample message 1 should be 20 minimum character",
sample2: "sample message 2 should be 20 minimum character",
sample3: "test 3",
sample4: "test 4",
sample5: "test 5",
url: "http://example.com/test",
method: "POST",
subaccount_id: "109878667",
affiliate_marketing: false,
reseller_id: "98766"
reseller_id: "98766",
message_flow: "message_flow should be minimum 40 character",
help_message: "hel_message should be minimum 20 character",
optout_message: "optoutmessage should be mandatory"
}
))

Expand All @@ -151,24 +154,27 @@ def to_json_get_numbers(obj)
"CUSTOMER_CARE",
"2FA"
],
description: "sample description text",
description: "sample description text should be 40 character",
embedded_link: false,
embedded_phone: false,
age_gated: false,
direct_lending: false,
subscriber_optin: true,
subscriber_optout: true,
subscriber_help: true,
sample1: "test 1",
sample2: "test 2",
sample1: "sample message 1 should be 20 minimum character",
sample2: "sample message 2 should be 20 minimum character",
sample3: "test 3",
sample4: "test 4",
sample5: "test 5",
url: "http://example.com/test",
method: "POST",
subaccount_id: "109878667",
affiliate_marketing: false,
reseller_id: "98766"
reseller_id: "98766",
message_flow: "message_flow should be minimum 40 character",
help_message: "hel_message should be minimum 20 character",
optout_message: "optoutmessage should be mandatory"
})
end
it 'number_link campaign' do
Expand Down

0 comments on commit b5d6a3b

Please sign in to comment.