Skip to content

Commit

Permalink
SendDate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimuska139 committed Jul 5, 2021
1 parent 447d88a commit a655924
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sendpulse/emails_address_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ type AddressBookEmailStatistics struct {

// CampaignEmailStatistics represents statistics of specific campaign
type CampaignEmailStatistics struct {
SentDate DateTimeType `json:"sent_date"`
SendDate DateTimeType `json:"send_date"`
GlobalStatus int `json:"global_status"`
GlobalStatusExplain string `json:"global_status_explain"`
DetailStatus int `json:"detail_status"`
Expand Down
2 changes: 1 addition & 1 deletion sendpulse/emails_address_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (suite *SendpulseTestSuite) TestEmailsService_AddressService_GetStatisticsB
suite.mux.HandleFunc("/campaigns/1/email/[email protected]", func(w http.ResponseWriter, r *http.Request) {
suite.Equal(http.MethodGet, r.Method)
fmt.Fprintf(w, `{
"sent_date": "2021-03-29 07:46:58",
"send_date": "2021-03-29 07:46:58",
"global_status": 1,
"global_status_explain": "Sent",
"detail_status": 3,
Expand Down
6 changes: 3 additions & 3 deletions sendpulse/viber_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type CreateViberCampaignParams struct {
MessageType int `json:"message_type,omitempty"`
SenderID int `json:"sender_id"`
MessageLiveTime int `json:"message_live_time"`
SentDate DateTimeType `json:"sent_date"`
SendDate DateTimeType `json:"send_date"`
MailingListID int `json:"address_book"`
Recipients []int `json:"recipients"`
Message string `json:"message"`
Expand Down Expand Up @@ -62,7 +62,7 @@ type UpdateViberCampaignParams struct {
AddressBookID int `json:"address_book,omitempty"`
SenderID int `json:"sender_id"`
MessageLiveTime int `json:"message_live_time"`
SentDate DateTimeType `json:"sent_date"`
SendDate DateTimeType `json:"send_date"`
}

func (service *ViberService) UpdateCampaign(params UpdateViberCampaignParams) error {
Expand Down Expand Up @@ -162,7 +162,7 @@ type ViberRecipient struct {
Phone int `json:"phone"`
AddressBookID int `json:"address_book_id"`
Status string `json:"status"`
SentDate DateTimeType `json:"sent_date"`
SendDate DateTimeType `json:"send_date"`
Price float32 `json:"price"`
Currency string `json:"currency"`
LastUpdate DateTimeType `json:"last_update"`
Expand Down
8 changes: 4 additions & 4 deletions sendpulse/viber_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (suite *SendpulseTestSuite) TestViberService_CreateCampaign() {
MessageType: 2,
SenderID: 2222,
MessageLiveTime: 1000,
SentDate: DateTimeType(time.Now()),
SendDate: DateTimeType(time.Now()),
MailingListID: 12345,
Recipients: []int{380931111111, 380931111112, 380931111113},
Message: "Ciao! Вас вітає офіційний viber-канал бренду Yamamay та нагадує, що Ви - найчарівніша.",
Expand Down Expand Up @@ -79,7 +79,7 @@ func (suite *SendpulseTestSuite) TestViberService_UpdateCampaign() {
AddressBookID: 12345,
SenderID: 222,
MessageLiveTime: 1000,
SentDate: DateTimeType(time.Now()),
SendDate: DateTimeType(time.Now()),
})
suite.NoError(err)
}
Expand Down Expand Up @@ -141,7 +141,7 @@ func (suite *SendpulseTestSuite) TestViberService_GetStatistics() {
"image_link": null,
"address_book": null,
"sender_name": "infoservice",
"sent_date": "2017-06-22 09:51:35",
"send_date": "2017-06-22 09:51:35",
"status": "send",
"statistic": {
"sent": 1,
Expand Down Expand Up @@ -222,7 +222,7 @@ func (suite *SendpulseTestSuite) TestViberService_GetRecipients() {
"phone": 380934760182,
"address_book_id": 850852,
"status": "send",
"sent_date": "2017-06-23 08:54:01",
"send_date": "2017-06-23 08:54:01",
"price": 0.74,
"currency": "RUR",
"last_update": "2017-06-23 08:53:38"
Expand Down

0 comments on commit a655924

Please sign in to comment.