Skip to content

Commit

Permalink
Merge pull request #4 from OneSignal/api
Browse files Browse the repository at this point in the history
Dependency Update
  • Loading branch information
brismithers committed Jun 9, 2022
2 parents 68a554f + 097f1ec commit b61c816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/Player.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Name | Type | Description | Notes
**Sdk** | **string** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional]
**SessionCount** | **int** | Number of times the user has played the game, defaults to 1 | [optional]
**Tags** | **Object** | Custom tags for the player. Only support string and integer key value pairs. Does not support arrays or other nested objects. Setting a tag value to null or an empty string will remove the tag. Example: {\"foo\":\"bar\",\"this\":\"that\"} Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of data Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM | [optional]
**AmountSpent** | **string** | Amount the user has spent in USD, up to two decimal places | [optional]
**AmountSpent** | **decimal** | Amount the user has spent in USD, up to two decimal places | [optional]
**CreatedAt** | **long** | Unixtime when the player joined the game | [optional]
**Playtime** | **long** | Seconds player was running your app. | [optional]
**BadgeCount** | **int** | Current iOS badge count displayed on the app icon NOTE: Not supported for apps created after June 2018, since badge count for apps created after this date are handled on the client. | [optional]
Expand Down
12 changes: 4 additions & 8 deletions src/OneSignalApi/Model/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected Player() { }
/// <param name="_long">Longitude of the device, used for geotagging to segment on..</param>
/// <param name="lat">Latitude of the device, used for geotagging to segment on..</param>
/// <param name="country">Country code in the ISO 3166-1 Alpha 2 format.</param>
public Player(string appId = default(string), int deviceType = default(int), string externalUserId = default(string), string externalUserIdAuthHash = default(string), string emailAuthHash = default(string), string identifier = default(string), string language = default(string), int? timezone = default(int?), string gameVersion = default(string), string deviceModel = default(string), string deviceOs = default(string), string adId = default(string), string sdk = default(string), int sessionCount = default(int), Object tags = default(Object), string amountSpent = default(string), long createdAt = default(long), long playtime = default(long), int badgeCount = default(int), int lastActive = default(int), int notificationTypes = default(int), int? testType = default(int?), decimal _long = default(decimal), decimal lat = default(decimal), string country = default(string))
public Player(string appId = default(string), int deviceType = default(int), string externalUserId = default(string), string externalUserIdAuthHash = default(string), string emailAuthHash = default(string), string identifier = default(string), string language = default(string), int? timezone = default(int?), string gameVersion = default(string), string deviceModel = default(string), string deviceOs = default(string), string adId = default(string), string sdk = default(string), int sessionCount = default(int), Object tags = default(Object), decimal amountSpent = default(decimal), long createdAt = default(long), long playtime = default(long), int badgeCount = default(int), int lastActive = default(int), int notificationTypes = default(int), int? testType = default(int?), decimal _long = default(decimal), decimal lat = default(decimal), string country = default(string))
{
this.DeviceType = deviceType;
this.AppId = appId;
Expand Down Expand Up @@ -233,7 +233,7 @@ public bool ShouldSerializeInvalidIdentifier()
/// </summary>
/// <value>Amount the user has spent in USD, up to two decimal places</value>
[DataMember(Name = "amount_spent", EmitDefaultValue = false)]
public string AmountSpent { get; set; }
public decimal AmountSpent { get; set; }

/// <summary>
/// Unixtime when the player joined the game
Expand Down Expand Up @@ -452,8 +452,7 @@ public bool Equals(Player input)
) &&
(
this.AmountSpent == input.AmountSpent ||
(this.AmountSpent != null &&
this.AmountSpent.Equals(input.AmountSpent))
this.AmountSpent.Equals(input.AmountSpent)
) &&
(
this.CreatedAt == input.CreatedAt ||
Expand Down Expand Up @@ -563,10 +562,7 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.Tags.GetHashCode();
}
if (this.AmountSpent != null)
{
hashCode = (hashCode * 59) + this.AmountSpent.GetHashCode();
}
hashCode = (hashCode * 59) + this.AmountSpent.GetHashCode();
hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode();
hashCode = (hashCode * 59) + this.Playtime.GetHashCode();
hashCode = (hashCode * 59) + this.BadgeCount.GetHashCode();
Expand Down

0 comments on commit b61c816

Please sign in to comment.