forked from Bindambc/whatsapp-business-java-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix send template messages bug ((Bindambc#100) The parameter template…
…['language']['code'] is required.)
- Loading branch information
Showing
3 changed files
with
46 additions
and
19 deletions.
There are no files selected for viewing
22 changes: 3 additions & 19 deletions
22
src/main/java/com/whatsapp/api/domain/messages/Language.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,12 @@ | ||
package com.whatsapp.api.domain.messages; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.whatsapp.api.domain.templates.type.LanguageType; | ||
|
||
/** | ||
* The type Language. | ||
* @param code Language code. See {@link LanguageType} | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public record Language(LanguageType code) { | ||
/** | ||
* Instantiates a new Language. | ||
* | ||
* @param code the code | ||
*/ | ||
public Language { | ||
} | ||
|
||
/** | ||
* Gets code. | ||
* | ||
* @return the code | ||
*/ | ||
@Override | ||
public LanguageType code() { | ||
return code; | ||
} | ||
public record Language(@JsonProperty("code") LanguageType code) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,5 +34,7 @@ public static void main(String[] args) { | |
); | ||
|
||
whatsappBusinessCloudApi.sendMessage(PHONE_NUMBER_ID, message); | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters