Passed
Push — main ( 241573...d9d9b7 )
by Acho
01:47
created

stubs.SmsLastMessage   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 2
c 0
b 0
f 0
rs 10
nop 0
1
package stubs
2
3
// SmsSendSingle is a dummy json response for the `/api/airtime/v2/` endpoint
4
func SmsSendSingle() []byte {
5
	return []byte(`
6
		{
7
			"message": "Message is queued for sending! Please check report for update",
8
			"success": true,
9
			"message_id": "11ec-832f-a6f3fcfe-9fea-02420a0002ab"
10
		}
11
`)
12
}
13
14
// SmsLastMessage is a dummy JSON response for the `/last/message` endpoint
15
func SmsLastMessage() []byte {
16
	return []byte(`
17
		{
18
			"id": 302050741,
19
			"_id": "11ec-8330-c25f5870-a614-02420a0002ab",
20
			"campaign_id": null,
21
			"user_id": 342847,
22
			"sender_id": "SMSto",
23
			"message": "This is a test message",
24
			"to": "+35799999999999",
25
			"status": "REJECTED",
26
			"client_cost": 0,
27
			"callback_url": "https://example.com/callback/handler",
28
			"scheduled_for": null,
29
			"timezone": null,
30
			"created_at": "2022-02-01T07:29:59.000000Z",
31
			"updated_at": "2022-02-01T07:30:07.000000Z",
32
			"sent_at": "2022-02-01 07:30:07",
33
			"message_id": null,
34
			"sms_count": 1,
35
			"final_callback_sent": 0,
36
			"is_api": 1,
37
			"a2_code": null,
38
			"optout": null,
39
			"failed_reason": "Invalid Number",
40
			"campaign": null,
41
			"provider": null
42
		}
43
`)
44
}
45