Class: Amocrm::Resources::ShortLinks
- Inherits:
-
Object
- Object
- Amocrm::Resources::ShortLinks
- Defined in:
- lib/amocrm/resources/short_links.rb
Instance Method Summary collapse
-
#create(url:, request_options: {}) ⇒ Amocrm::Models::ShortLinkCreateResponse::ShortLinkCreateResponse, Amocrm::Models::ShortLinkCreateResponse::Problem
Create short link.
-
#initialize(client:) ⇒ ShortLinks
constructor
private
A new instance of ShortLinks.
Constructor Details
#initialize(client:) ⇒ ShortLinks
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 ShortLinks.
30 31 32 |
# File 'lib/amocrm/resources/short_links.rb', line 30 def initialize(client:) @client = client end |
Instance Method Details
#create(url:, request_options: {}) ⇒ Amocrm::Models::ShortLinkCreateResponse::ShortLinkCreateResponse, Amocrm::Models::ShortLinkCreateResponse::Problem
Create short link.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/amocrm/resources/short_links.rb', line 16 def create(params) parsed, = Amocrm::ShortLinkCreateParams.dump_request(params) @client.request( method: :post, path: "api/v4/short_links", body: parsed, model: Amocrm::Models::ShortLinkCreateResponse, options: ) end |