Skip to content

Commit 59038dc

Browse files
authored
Merge pull request #15 from messente/travis
Release 2.3.0
2 parents 641a82b + de142ec commit 59038dc

12 files changed

Lines changed: 329 additions & 9 deletions

File tree

.github/workflows/rubygems.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Ruby
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
push:
10+
name: Push gem to RubyGems.org
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
15+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
16+
17+
steps:
18+
# Set up
19+
- uses: actions/checkout@v4
20+
- name: Set up Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
bundler-cache: true
24+
ruby-version: ruby
25+
26+
# Release
27+
- uses: rubygems/release-gem@v1

.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ docs/WhatsAppLanguage.md
7474
docs/WhatsAppMedia.md
7575
docs/WhatsAppParameter.md
7676
docs/WhatsAppTemplate.md
77+
docs/WhatsAppText.md
7778
git_push.sh
7879
lib/messente_api.rb
7980
lib/messente_api/api/blacklist_api.rb
@@ -146,6 +147,7 @@ lib/messente_api/models/whats_app_language.rb
146147
lib/messente_api/models/whats_app_media.rb
147148
lib/messente_api/models/whats_app_parameter.rb
148149
lib/messente_api/models/whats_app_template.rb
150+
lib/messente_api/models/whats_app_text.rb
149151
lib/messente_api/version.rb
150152
messente_api.gemspec
151153
spec/spec_helper.rb

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ script:
88
- bundle install --path vendor/bundle
99
- bundle exec rspec
1010
- gem build messente_api.gemspec
11-
- gem install ./messente_api-2.2.0.gem
11+
- gem install ./messente_api-2.3.0.gem

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Messente API Library
22

33
- Messente API version: 2.0.0
4-
- Ruby gem version: 2.2.0
4+
- Ruby gem version: 2.3.0
55

66
[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
77

docs/WhatsApp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
| **validity** | **Integer** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] |
99
| **ttl** | **Integer** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. | [optional] |
1010
| **template** | [**WhatsAppTemplate**](WhatsAppTemplate.md) | | [optional] |
11+
| **text** | [**WhatsAppText**](WhatsAppText.md) | | [optional] |
1112
| **channel** | **String** | The channel used to deliver the message | [optional][default to 'whatsapp'] |
1213

1314
## Example
@@ -20,6 +21,7 @@ instance = MessenteApi::WhatsApp.new(
2021
validity: 360,
2122
ttl: 21600,
2223
template: null,
24+
text: null,
2325
channel: null
2426
)
2527
```

docs/WhatsAppParameter.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
| **image** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
1212
| **document** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
1313
| **video** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
14+
| **coupon_code** | **String** | A coupon code. | [optional] |
15+
| **payload** | **String** | A payload. | [optional] |
1416

1517
## Example
1618

@@ -24,7 +26,9 @@ instance = MessenteApi::WhatsAppParameter.new(
2426
date_time: null,
2527
image: null,
2628
document: null,
27-
video: null
29+
video: null,
30+
coupon_code: null,
31+
payload: null
2832
)
2933
```
3034

docs/WhatsAppText.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# MessenteApi::WhatsAppText
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **preview_url** | **Boolean** | Whether to display link preview if the message contains a hyperlink | [optional][default to true] |
8+
| **body** | **String** | Plaintext content for WhatsApp, can contain URLs, emojis and formatting | |
9+
10+
## Example
11+
12+
```ruby
13+
require 'messente_api'
14+
15+
instance = MessenteApi::WhatsAppText.new(
16+
preview_url: null,
17+
body: null
18+
)
19+
```
20+

lib/messente_api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
require 'messente_api/models/whats_app_media'
7777
require 'messente_api/models/whats_app_parameter'
7878
require 'messente_api/models/whats_app_template'
79+
require 'messente_api/models/whats_app_text'
7980

8081
# APIs
8182
require 'messente_api/api/blacklist_api'

lib/messente_api/models/whats_app.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class WhatsApp
2727

2828
attr_accessor :template
2929

30+
attr_accessor :text
31+
3032
# The channel used to deliver the message
3133
attr_accessor :channel
3234

@@ -59,6 +61,7 @@ def self.attribute_map
5961
:'validity' => :'validity',
6062
:'ttl' => :'ttl',
6163
:'template' => :'template',
64+
:'text' => :'text',
6265
:'channel' => :'channel'
6366
}
6467
end
@@ -75,6 +78,7 @@ def self.openapi_types
7578
:'validity' => :'Integer',
7679
:'ttl' => :'Integer',
7780
:'template' => :'WhatsAppTemplate',
81+
:'text' => :'WhatsAppText',
7882
:'channel' => :'String'
7983
}
8084
end
@@ -116,6 +120,10 @@ def initialize(attributes = {})
116120
self.template = attributes[:'template']
117121
end
118122

123+
if attributes.key?(:'text')
124+
self.text = attributes[:'text']
125+
end
126+
119127
if attributes.key?(:'channel')
120128
self.channel = attributes[:'channel']
121129
else
@@ -159,6 +167,7 @@ def ==(o)
159167
validity == o.validity &&
160168
ttl == o.ttl &&
161169
template == o.template &&
170+
text == o.text &&
162171
channel == o.channel
163172
end
164173

@@ -171,7 +180,7 @@ def eql?(o)
171180
# Calculates hash code according to all attributes.
172181
# @return [Integer] Hash code
173182
def hash
174-
[sender, validity, ttl, template, channel].hash
183+
[sender, validity, ttl, template, text, channel].hash
175184
end
176185

177186
# Builds the object from hash

lib/messente_api/models/whats_app_parameter.rb

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ class WhatsAppParameter
3232

3333
attr_accessor :video
3434

35+
# A coupon code.
36+
attr_accessor :coupon_code
37+
38+
# A payload.
39+
attr_accessor :payload
40+
3541
# Attribute mapping from ruby-style variable name to JSON key.
3642
def self.attribute_map
3743
{
@@ -41,7 +47,9 @@ def self.attribute_map
4147
:'date_time' => :'date_time',
4248
:'image' => :'image',
4349
:'document' => :'document',
44-
:'video' => :'video'
50+
:'video' => :'video',
51+
:'coupon_code' => :'coupon_code',
52+
:'payload' => :'payload'
4553
}
4654
end
4755

@@ -59,7 +67,9 @@ def self.openapi_types
5967
:'date_time' => :'WhatsAppDatetime',
6068
:'image' => :'WhatsAppMedia',
6169
:'document' => :'WhatsAppMedia',
62-
:'video' => :'WhatsAppMedia'
70+
:'video' => :'WhatsAppMedia',
71+
:'coupon_code' => :'String',
72+
:'payload' => :'String'
6373
}
6474
end
6575

@@ -113,6 +123,14 @@ def initialize(attributes = {})
113123
if attributes.key?(:'video')
114124
self.video = attributes[:'video']
115125
end
126+
127+
if attributes.key?(:'coupon_code')
128+
self.coupon_code = attributes[:'coupon_code']
129+
end
130+
131+
if attributes.key?(:'payload')
132+
self.payload = attributes[:'payload']
133+
end
116134
end
117135

118136
# Show invalid properties with the reasons. Usually used together with valid?
@@ -146,7 +164,9 @@ def ==(o)
146164
date_time == o.date_time &&
147165
image == o.image &&
148166
document == o.document &&
149-
video == o.video
167+
video == o.video &&
168+
coupon_code == o.coupon_code &&
169+
payload == o.payload
150170
end
151171

152172
# @see the `==` method
@@ -158,7 +178,7 @@ def eql?(o)
158178
# Calculates hash code according to all attributes.
159179
# @return [Integer] Hash code
160180
def hash
161-
[type, text, currency, date_time, image, document, video].hash
181+
[type, text, currency, date_time, image, document, video, coupon_code, payload].hash
162182
end
163183

164184
# Builds the object from hash

0 commit comments

Comments
 (0)