Class: Stripe::Subscription::ListParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/subscription.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, customer_account: nil, ending_before: nil, expand: nil, limit: nil, plan: nil, price: nil, starting_after: nil, status: nil, test_clock: nil) ⇒ ListParams

Returns a new instance of ListParams.



1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
# File 'lib/stripe/resources/subscription.rb', line 1506

def initialize(
  automatic_tax: nil,
  collection_method: nil,
  created: nil,
  current_period_end: nil,
  current_period_start: nil,
  customer: nil,
  customer_account: 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
  @customer_account = 
  @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.



1476
1477
1478
# File 'lib/stripe/resources/subscription.rb', line 1476

def automatic_tax
  @automatic_tax
end

#collection_methodObject

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



1478
1479
1480
# File 'lib/stripe/resources/subscription.rb', line 1478

def collection_method
  @collection_method
end

#createdObject

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



1480
1481
1482
# File 'lib/stripe/resources/subscription.rb', line 1480

def created
  @created
end

#current_period_endObject

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



1482
1483
1484
# File 'lib/stripe/resources/subscription.rb', line 1482

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.



1484
1485
1486
# File 'lib/stripe/resources/subscription.rb', line 1484

def current_period_start
  @current_period_start
end

#customerObject

The ID of the customer whose subscriptions will be retrieved.



1486
1487
1488
# File 'lib/stripe/resources/subscription.rb', line 1486

def customer
  @customer
end

#customer_accountObject

The ID of the account whose subscriptions will be retrieved.



1488
1489
1490
# File 'lib/stripe/resources/subscription.rb', line 1488

def 
  @customer_account
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.



1490
1491
1492
# File 'lib/stripe/resources/subscription.rb', line 1490

def ending_before
  @ending_before
end

#expandObject

Specifies which fields in the response should be expanded.



1492
1493
1494
# File 'lib/stripe/resources/subscription.rb', line 1492

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.



1494
1495
1496
# File 'lib/stripe/resources/subscription.rb', line 1494

def limit
  @limit
end

#planObject

The ID of the plan whose subscriptions will be retrieved.



1496
1497
1498
# File 'lib/stripe/resources/subscription.rb', line 1496

def plan
  @plan
end

#priceObject

Filter for subscriptions that contain this recurring price ID.



1498
1499
1500
# File 'lib/stripe/resources/subscription.rb', line 1498

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.



1500
1501
1502
# File 'lib/stripe/resources/subscription.rb', line 1500

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.



1502
1503
1504
# File 'lib/stripe/resources/subscription.rb', line 1502

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.



1504
1505
1506
# File 'lib/stripe/resources/subscription.rb', line 1504

def test_clock
  @test_clock
end