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

com.stripe.model.SubscriptionScheduleRevisionCollection Maven / Gradle / Ivy

There is a newer version: 28.2.0
Show newest version
// Generated by com.stripe.generator.entity.SdkBuilder

package com.stripe.model;

import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.stripe.param.SubscriptionScheduleRevisionCollectionListParams;
import com.stripe.param.SubscriptionScheduleRevisionCollectionRetrieveParams;
import java.util.Map;

public class SubscriptionScheduleRevisionCollection
    extends StripeCollection {
  /** Retrieves the list of subscription schedule revisions for a subscription schedule. */
  public SubscriptionScheduleRevisionCollection list(Map params)
      throws StripeException {
    return list(params, (RequestOptions) null);
  }

  /** Retrieves the list of subscription schedule revisions for a subscription schedule. */
  public SubscriptionScheduleRevisionCollection list(
      Map params, RequestOptions options) throws StripeException {
    String url = String.format("%s%s", Stripe.getApiBase(), this.getUrl());
    return ApiResource.requestCollection(
        url, params, SubscriptionScheduleRevisionCollection.class, options);
  }

  /** Retrieves the list of subscription schedule revisions for a subscription schedule. */
  public SubscriptionScheduleRevisionCollection list(
      SubscriptionScheduleRevisionCollectionListParams params) throws StripeException {
    return list(params, (RequestOptions) null);
  }

  /** Retrieves the list of subscription schedule revisions for a subscription schedule. */
  public SubscriptionScheduleRevisionCollection list(
      SubscriptionScheduleRevisionCollectionListParams params, RequestOptions options)
      throws StripeException {
    String url = String.format("%s%s", Stripe.getApiBase(), this.getUrl());
    return ApiResource.requestCollection(
        url, params, SubscriptionScheduleRevisionCollection.class, options);
  }

  /**
   * Retrieves the details of an existing subscription schedule revision. You only need to supply
   * the unique subscription schedule revision identifier that was returned upon subscription
   * schedule creation or retrieval.
   */
  public SubscriptionScheduleRevision retrieve(String id) throws StripeException {
    return retrieve(id, (Map) null, (RequestOptions) null);
  }

  /**
   * Retrieves the details of an existing subscription schedule revision. You only need to supply
   * the unique subscription schedule revision identifier that was returned upon subscription
   * schedule creation or retrieval.
   */
  public SubscriptionScheduleRevision retrieve(String id, RequestOptions options)
      throws StripeException {
    return retrieve(id, (Map) null, options);
  }

  /**
   * Retrieves the details of an existing subscription schedule revision. You only need to supply
   * the unique subscription schedule revision identifier that was returned upon subscription
   * schedule creation or retrieval.
   */
  public SubscriptionScheduleRevision retrieve(
      String id, Map params, RequestOptions options) throws StripeException {
    String url =
        String.format(
            "%s%s",
            Stripe.getApiBase(),
            String.format("%s/%s", this.getUrl(), ApiResource.urlEncodeId(id)));
    return ApiResource.request(
        ApiResource.RequestMethod.GET, url, params, SubscriptionScheduleRevision.class, options);
  }

  /**
   * Retrieves the details of an existing subscription schedule revision. You only need to supply
   * the unique subscription schedule revision identifier that was returned upon subscription
   * schedule creation or retrieval.
   */
  public SubscriptionScheduleRevision retrieve(
      String id,
      SubscriptionScheduleRevisionCollectionRetrieveParams params,
      RequestOptions options)
      throws StripeException {
    String url =
        String.format(
            "%s%s",
            Stripe.getApiBase(),
            String.format("%s/%s", this.getUrl(), ApiResource.urlEncodeId(id)));
    return ApiResource.request(
        ApiResource.RequestMethod.GET, url, params, SubscriptionScheduleRevision.class, options);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy