Skip to content

Commit

Permalink
Support country breakdown in AdsInsights type
Browse files Browse the repository at this point in the history
Summary:
[BizSDK][Java] Support country breakdown in AdsInsights type

To support country breakdown, temporarily add country to the AdsInsights.java file to unblock users. Will provide a long term solution afterwards.

Differential Revision: D48198927

fbshipit-source-id: 0ec098be590c958c79a01a2b72f70e04082a6e3f
  • Loading branch information
stcheng authored and facebook-github-bot committed Aug 9, 2023
1 parent aa9a8fc commit 2ee0f30
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.facebook.business.sdk</groupId>
<artifactId>facebook-java-business-sdk</artifactId>
<packaging>jar</packaging>
<version>17.0.2</version>
<version>17.0.3</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Facebook Business Solutions SDK for Java</description>
<url>https://developers.facebook.com/docs/marketing-api/sdks</url>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/facebook/ads/sdk/APIConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public class APIConfig {
public static final String DEFAULT_API_VERSION = "v17.0";
public static final String DEFAULT_API_BASE = "https://graph.facebook.com";
public static final String DEFAULT_VIDEO_API_BASE = "https://graph-video.facebook.com";
public static final String USER_AGENT = "fbbizsdk-java-v17.0.1";
public static final String USER_AGENT = "fbbizsdk-java-v17.0.3";
};
12 changes: 12 additions & 0 deletions src/main/java/com/facebook/ads/sdk/AdsInsights.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public class AdsInsights extends APINode {
private String mCostPerUniqueInlineLinkClick = null;
@SerializedName("cost_per_unique_outbound_click")
private List<AdsActionStats> mCostPerUniqueOutboundClick = null;
@SerializedName("country")
private String mCountry = null;
@SerializedName("cpc")
private String mCpc = null;
@SerializedName("cpm")
Expand Down Expand Up @@ -1049,6 +1051,15 @@ public AdsInsights setFieldCostPerUniqueOutboundClick(String value) {
this.mCostPerUniqueOutboundClick = AdsActionStats.getGson().fromJson(value, type);
return this;
}
public String getFieldCountry() {
return mCountry;
}

public AdsInsights setFieldCountry(String value) {
this.mCountry = value;
return this;
}

public String getFieldCpc() {
return mCpc;
}
Expand Down Expand Up @@ -2264,6 +2275,7 @@ public AdsInsights copyFrom(AdsInsights instance) {
this.mCostPerUniqueConversion = instance.mCostPerUniqueConversion;
this.mCostPerUniqueInlineLinkClick = instance.mCostPerUniqueInlineLinkClick;
this.mCostPerUniqueOutboundClick = instance.mCostPerUniqueOutboundClick;
this.mCountry = instance.mCountry;
this.mCpc = instance.mCpc;
this.mCpm = instance.mCpm;
this.mCpp = instance.mCpp;
Expand Down

0 comments on commit 2ee0f30

Please sign in to comment.