Struct: FPatreonPledgeHistory

//  PatreonPledgeHistory.h : 14

struct NBPATREONAPICLIENT_API FPatreonPledgeHistory;

Reflection-enabled

Specifiers:

  • BlueprintType

Contains information about when a user changed their pledge status.


Properties

  • PledgeHistory

    public:
    TArray<FPatreonPledgeEvent> PledgeHistory;
    

    Reflection-enabled

    Specifiers:

    • EditAnywhere
    • BlueprintReadWrite
    • Category = NBPatreaonAPIClient|User Info

    Collection of pledge events for a single user. Expected to be sorted according to date.

Constructors

  • FPatreonPledgeHistory

    //  PatreonPledgeHistory.h : 19
    
    public:
    FPatreonPledgeHistory();
    
  • FPatreonPledgeHistory

    //  PatreonPledgeHistory.h : 31
    
    public:
    FPatreonPledgeHistory(
        const FString& json,
        const FDateTime& MinimumDate,
        bool DiscardUnpaid,
        const FString& CampaignID = TEXT("")
    );
    

    Construct FPatreonPledgeHistory from a JSON string. Populates any fields it can find in the provided JSON. If the provided JSON string cannot be parsed for any reason, the result will be uninitialized.


    Arguments

    • json

      const FString& json
      

      JSON string containing pledge history

    • MinimumDate

      const FDateTime& MinimumDate
      

      Entries in json with earlier dates will be discarded

    • DiscardUnpaid

      bool DiscardUnpaid
      

      If true, entries with invalid payment status (e.g. failed payments) will be discarded

    • CampaignID

      const FString& CampaignID = TEXT("")
      

      If not empty, entries which do not match the given campaign ID will be discarded


Methods

  • PledgedToTierAfter

    //  PatreonPledgeHistory.h : 55
    
    public:
    bool PledgedToTierAfter(
        const FString& tier,
        const FDateTime& date,
        bool byTierId
    ) const;
    

    Checks if the user was pledged to the specified tier at any time after a provided date.


    Arguments

    • tier

      const FString& tier
      

      The tier to search for

    • date

      const FDateTime& date
      

      The minimum date that should be considered

    • byTierId

      bool byTierId
      

      If true, tier will be interpreted as a Tier ID, otherwise as a Tier Title


    Returns

    • bool
      
  • PledgedToTierBefore

    //  PatreonPledgeHistory.h : 63
    
    public:
    bool PledgedToTierBefore(
        const FString& tier,
        const FDateTime& date,
        bool byTierId
    ) const;
    

    Checks in the user pledged to the specified tier at any time before a provided date.


    Arguments

    • tier

      const FString& tier
      

      The tier to search for

    • date

      const FDateTime& date
      

      The maximum date that should be considered

    • byTierId

      bool byTierId
      

      If true, tier will be interpreted as a Tier ID, otherwise as a Tier Title


    Returns

    • bool
      
  • PledgedToTiersAfter

    //  PatreonPledgeHistory.h : 42
    
    public:
    TArray<FString> PledgedToTiersAfter(
        const FDateTime& date
    ) const;
    

    Returns the titles of the tier(s) the user was pledged to after the given date.


    Arguments

    • date

      const FDateTime& date
      

    Returns

    • TArray<FString>
      
  • PledgedToTiersBefore

    //  PatreonPledgeHistory.h : 47
    
    public:
    TArray<FString> PledgedToTiersBefore(
        const FDateTime& date
    ) const;
    

    Returns the titles of the tier(s) the user was pledged to after the given date.


    Arguments

    • date

      const FDateTime& date
      

    Returns

    • TArray<FString>
      
  • PledgedToTiersDuring

    //  PatreonPledgeHistory.h : 37
    
    public:
    TArray<FString> PledgedToTiersDuring(
        const int32 year,
        const int32 month
    ) const;
    

    Returns the titles of the tier(s) the user was pledged to during the given month, if any. If the user did not have a subscription during the given month, returns an empty list.


    Arguments

    • year

      const int32 year
      
    • month

      const int32 month
      

    Returns

    • TArray<FString>
      






For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com