Class: Stripe::SubscriptionListParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/subscription_list_params.rb

Defined Under Namespace

Classes: AutomaticTax, Created, CurrentPeriodEnd, CurrentPeriodStart

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(automatic_tax: nil, collection_method: nil, created: nil, current_period_end: nil, current_period_start: nil, customer: nil, ending_before: nil, expand: nil, limit: nil, plan: nil, price: nil, starting_after: nil, status: nil, test_clock: nil) ⇒ SubscriptionListParams

Returns a new instance of SubscriptionListParams.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/stripe/params/subscription_list_params.rb', line 97

def initialize(
  automatic_tax: nil,
  collection_method: nil,
  created: nil,
  current_period_end: nil,
  current_period_start: nil,
  customer: nil,
  ending_before: nil,
  expand: nil,
  limit: nil,
  plan: nil,
  price: nil,
  starting_after: nil,
  status: nil,
  test_clock: nil
)
  @automatic_tax = automatic_tax
  @collection_method = collection_method
  @created = created
  @current_period_end = current_period_end
  @current_period_start = current_period_start
  @customer = customer
  @ending_before = ending_before
  @expand = expand
  @limit = limit
  @plan = plan
  @price = price
  @starting_after = starting_after
  @status = status
  @test_clock = test_clock
end

Instance Attribute Details

#automatic_taxObject

Filter subscriptions by their automatic tax settings.



69
70
71
# File 'lib/stripe/params/subscription_list_params.rb', line 69

def automatic_tax
  @automatic_tax
end

#collection_methodObject

The collection method of the subscriptions to retrieve. Either ‘charge_automatically` or `send_invoice`.



71
72
73
# File 'lib/stripe/params/subscription_list_params.rb', line 71

def collection_method
  @collection_method
end

#createdObject

Only return subscriptions that were created during the given date interval.



73
74
75
# File 'lib/stripe/params/subscription_list_params.rb', line 73

def created
  @created
end

#current_period_endObject

Only return subscriptions whose minimum item current_period_end falls within the given date interval.



75
76
77
# File 'lib/stripe/params/subscription_list_params.rb', line 75

def current_period_end
  @current_period_end
end

#current_period_startObject

Only return subscriptions whose maximum item current_period_start falls within the given date interval.



77
78
79
# File 'lib/stripe/params/subscription_list_params.rb', line 77

def current_period_start
  @current_period_start
end

#customerObject

The ID of the customer whose subscriptions will be retrieved.



79
80
81
# File 'lib/stripe/params/subscription_list_params.rb', line 79

def customer
  @customer
end

#ending_beforeObject

A cursor for use in pagination. ‘ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.



81
82
83
# File 'lib/stripe/params/subscription_list_params.rb', line 81

def ending_before
  @ending_before
end

#expandObject

Specifies which fields in the response should be expanded.



83
84
85
# File 'lib/stripe/params/subscription_list_params.rb', line 83

def expand
  @expand
end

#limitObject

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.



85
86
87
# File 'lib/stripe/params/subscription_list_params.rb', line 85

def limit
  @limit
end

#planObject

The ID of the plan whose subscriptions will be retrieved.



87
88
89
# File 'lib/stripe/params/subscription_list_params.rb', line 87

def plan
  @plan
end

#priceObject

Filter for subscriptions that contain this recurring price ID.



89
90
91
# File 'lib/stripe/params/subscription_list_params.rb', line 89

def price
  @price
end

#starting_afterObject

A cursor for use in pagination. ‘starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.



91
92
93
# File 'lib/stripe/params/subscription_list_params.rb', line 91

def starting_after
  @starting_after
end

#statusObject

The status of the subscriptions to retrieve. Passing in a value of ‘canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.



93
94
95
# File 'lib/stripe/params/subscription_list_params.rb', line 93

def status
  @status
end

#test_clockObject

Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.



95
96
97
# File 'lib/stripe/params/subscription_list_params.rb', line 95

def test_clock
  @test_clock
end