Class: Onlyfans::Resources::SmartLinkPostbacks
- Inherits:
-
Object
- Object
- Onlyfans::Resources::SmartLinkPostbacks
- Defined in:
- lib/onlyfans/resources/smart_link_postbacks.rb
Overview
APIs for managing Smart Link postback destinations
Instance Method Summary collapse
-
#create(conversion_types:, smart_link_scope:, url:, smart_link_ids: nil, request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackCreateResponse
Some parameter documentations has been truncated, see Models::SmartLinkPostbackCreateParams for more details.
-
#delete(postback_id, request_options: {}) ⇒ Hash{Symbol=>Object}?
Delete a Smart Link postback.
-
#initialize(client:) ⇒ SmartLinkPostbacks
constructor
private
A new instance of SmartLinkPostbacks.
-
#list(request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackListResponse
List all Smart Link postbacks configured for your Team.
-
#retrieve(postback_id, request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackRetrieveResponse
Retrieve a Smart Link postback by ID.
-
#update(postback_id, conversion_types:, smart_link_scope:, url:, smart_link_ids: nil, request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackUpdateResponse
Update a Smart Link postback configuration.
Constructor Details
#initialize(client:) ⇒ SmartLinkPostbacks
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 SmartLinkPostbacks.
129 130 131 |
# File 'lib/onlyfans/resources/smart_link_postbacks.rb', line 129 def initialize(client:) @client = client end |
Instance Method Details
#create(conversion_types:, smart_link_scope:, url:, smart_link_ids: nil, request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackCreateResponse
Some parameter documentations has been truncated, see Models::SmartLinkPostbackCreateParams for more details.
Create a postback that fires for selected Smart Link conversion types
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/onlyfans/resources/smart_link_postbacks.rb', line 27 def create(params) parsed, = Onlyfans::SmartLinkPostbackCreateParams.dump_request(params) @client.request( method: :post, path: "api/smart-link-postbacks", body: parsed, model: Onlyfans::Models::SmartLinkPostbackCreateResponse, options: ) end |
#delete(postback_id, request_options: {}) ⇒ Hash{Symbol=>Object}?
Delete a Smart Link postback
117 118 119 120 121 122 123 124 |
# File 'lib/onlyfans/resources/smart_link_postbacks.rb', line 117 def delete(postback_id, params = {}) @client.request( method: :delete, path: ["api/smart-link-postbacks/%1$s", postback_id], model: Onlyfans::Internal::Type::HashOf[Onlyfans::Internal::Type::Unknown], options: params[:request_options] ) end |
#list(request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackListResponse
List all Smart Link postbacks configured for your Team
97 98 99 100 101 102 103 104 |
# File 'lib/onlyfans/resources/smart_link_postbacks.rb', line 97 def list(params = {}) @client.request( method: :get, path: "api/smart-link-postbacks", model: Onlyfans::Models::SmartLinkPostbackListResponse, options: params[:request_options] ) end |
#retrieve(postback_id, request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackRetrieveResponse
Retrieve a Smart Link postback by ID
49 50 51 52 53 54 55 56 |
# File 'lib/onlyfans/resources/smart_link_postbacks.rb', line 49 def retrieve(postback_id, params = {}) @client.request( method: :get, path: ["api/smart-link-postbacks/%1$s", postback_id], model: Onlyfans::Models::SmartLinkPostbackRetrieveResponse, options: params[:request_options] ) end |
#update(postback_id, conversion_types:, smart_link_scope:, url:, smart_link_ids: nil, request_options: {}) ⇒ Onlyfans::Models::SmartLinkPostbackUpdateResponse
Update a Smart Link postback configuration
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/onlyfans/resources/smart_link_postbacks.rb', line 77 def update(postback_id, params) parsed, = Onlyfans::SmartLinkPostbackUpdateParams.dump_request(params) @client.request( method: :patch, path: ["api/smart-link-postbacks/%1$s", postback_id], body: parsed, model: Onlyfans::Models::SmartLinkPostbackUpdateResponse, options: ) end |