All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kohsuke.github.GHMarketplacePlan Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha-2
Show newest version
package org.kohsuke.github;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.net.URL;
import java.util.Collections;
import java.util.List;

// TODO: Auto-generated Javadoc
/**
 * A Github Marketplace plan.
 *
 * @author Paulo Miguel Almeida
 * @see GitHub#listMarketplacePlans()
 */
public class GHMarketplacePlan extends GitHubInteractiveObject {
    private String url;
    private String accountsUrl;
    private long id;
    private long number;
    private String name;
    private String description;
    private long monthlyPriceInCents;
    private long yearlyPriceInCents;
    private GHMarketplacePriceModel priceModel;
    @JsonProperty("has_free_trial")
    private boolean freeTrial; // JavaBeans Spec 1.01 section 8.3.2 forces us to have is
    private String unitName;
    private String state;
    private List bullets;

    /**
     * Gets url.
     *
     * @return the url
     */
    public URL getUrl() {
        return GitHubClient.parseURL(url);
    }

    /**
     * Gets accounts url.
     *
     * @return the accounts url
     */
    public String getAccountsUrl() {
        return accountsUrl;
    }

    /**
     * Gets id.
     *
     * @return the id
     */
    public long getId() {
        return id;
    }

    /**
     * Gets number.
     *
     * @return the number
     */
    public long getNumber() {
        return number;
    }

    /**
     * Gets name.
     *
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Gets description.
     *
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * Gets monthly price in cents.
     *
     * @return the monthly price in cents
     */
    public long getMonthlyPriceInCents() {
        return monthlyPriceInCents;
    }

    /**
     * Gets yearly price in cents.
     *
     * @return the yearly price in cents
     */
    public long getYearlyPriceInCents() {
        return yearlyPriceInCents;
    }

    /**
     * Gets price model.
     *
     * @return the price model
     */
    public GHMarketplacePriceModel getPriceModel() {
        return priceModel;
    }

    /**
     * Is free trial boolean.
     *
     * @return the boolean
     */
    public boolean isFreeTrial() {
        return freeTrial;
    }

    /**
     * Gets unit name.
     *
     * @return the unit name
     */
    public String getUnitName() {
        return unitName;
    }

    /**
     * Gets state.
     *
     * @return the state
     */
    public String getState() {
        return state;
    }

    /**
     * Gets bullets.
     *
     * @return the bullets
     */
    public List getBullets() {
        return Collections.unmodifiableList(bullets);
    }

    /**
     * Starts a builder that list any accounts associated with a plan, including free plans. For per-seat pricing, you
     * see the list of accounts that have purchased the plan, including the number of seats purchased. When someone
     * submits a plan change that won't be processed until the end of their billing cycle, you will also see the
     * upcoming pending change.
     *
     * 

* You use the returned builder to set various properties, then call * {@link GHMarketplaceListAccountBuilder#createRequest()} to finally list the accounts related to this plan. * *

* GitHub Apps must use a JWT to access this endpoint. *

* OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint. * * @return a GHMarketplaceListAccountBuilder instance * @see List * all GitHub accounts (user or organization) on a specific plan */ public GHMarketplaceListAccountBuilder listAccounts() { return new GHMarketplaceListAccountBuilder(root(), this.id); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy