terasms 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/terasms.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7540b6cb9be341136c012c9a1e445288e06cf459f0ad0922f1f1fbafb8599ed7
|
4
|
+
data.tar.gz: 1ec575acca46aade82b20ea2f537a1bc31a8407c8d4828aaa823e80a6849bf14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8dcd832c189d8c3e5df0ef1489aff776d46b0c7835588f9bbb051665f86e8309e12d88ca369a2207ed182c50f0ca60b751fadf86e3fcb072e6a8a8ded528453
|
7
|
+
data.tar.gz: 16fa0dffa06ee489ce0e6d6061989d081f96bc663ecb488913717f9e1fc0f15702987d412c3bcdb9adeaa865d80f88163c7cd5e66b3d83e14b6dd92beb5be4d4
|
data/lib/terasms.rb
CHANGED
@@ -109,6 +109,7 @@ module Terasms
|
|
109
109
|
-130 => 'Некорректно задано временное окно отправки',
|
110
110
|
-140 => 'Передан некорректный ID рассылки',
|
111
111
|
-160 => 'Превышен дневной лимит рассылки (Вы можете установить максимальную сумму ежедневной рассылки после согласования с Вашим менеджером)',
|
112
|
+
-999 => 'Ошибка обработки ответа API'
|
112
113
|
}
|
113
114
|
|
114
115
|
def error code
|
@@ -116,15 +117,15 @@ module Terasms
|
|
116
117
|
end
|
117
118
|
|
118
119
|
def main_status result
|
119
|
-
result["result"]["status"] rescue
|
120
|
+
result["result"]["status"] rescue -999
|
120
121
|
end
|
121
122
|
|
122
123
|
def message_status result
|
123
|
-
result["result"]["message_infos"].last["status"] rescue
|
124
|
+
result["result"]["message_infos"].last["status"] rescue -999
|
124
125
|
end
|
125
126
|
|
126
127
|
def message_id result
|
127
|
-
result["result"]["message_infos"].last["id"] rescue
|
128
|
+
result["result"]["message_infos"].last["id"] rescue -999
|
128
129
|
end
|
129
130
|
|
130
131
|
# target, sender, message,
|