Class: XTwitterScraper::Resources::Subscribe
- Inherits:
-
Object
- Object
- XTwitterScraper::Resources::Subscribe
- Defined in:
- lib/x_twitter_scraper/resources/subscribe.rb,
sig/x_twitter_scraper/resources/subscribe.rbs
Overview
Subscription, billing, and credits
Instance Method Summary collapse
-
#create(tier: nil, request_options: {}) ⇒ XTwitterScraper::Models::SubscribeCreateResponse
Create a subscription checkout or billing-management URL only after the user confirms.
-
#initialize(client:) ⇒ Subscribe
constructor
private
A new instance of Subscribe.
Constructor Details
#initialize(client:) ⇒ Subscribe
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Subscribe.
33 34 35 |
# File 'lib/x_twitter_scraper/resources/subscribe.rb', line 33 def initialize(client:) @client = client end |
Instance Method Details
#create(tier: nil, request_options: {}) ⇒ XTwitterScraper::Models::SubscribeCreateResponse
Create a subscription checkout or billing-management URL only after the user confirms. The request never completes payment by itself.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/x_twitter_scraper/resources/subscribe.rb', line 19 def create(params = {}) parsed, = XTwitterScraper::SubscribeCreateParams.dump_request(params) @client.request( method: :post, path: "subscribe", body: parsed, model: XTwitterScraper::Models::SubscribeCreateResponse, options: ) end |