Class: Pinnacle::Client
- Inherits:
-
Object
- Object
- Pinnacle::Client
- Defined in:
- lib/pinnacle/pinnacle_client.rb,
lib/pinnacle/client.rb
Overview
Reopen the Client class to add custom methods for webhook processing and file uploads.
Instance Method Summary collapse
- #audiences ⇒ Pinnacle::Audiences::Client
- #brands ⇒ Pinnacle::Brands::Client
- #campaigns ⇒ Pinnacle::Campaigns::Client
- #contacts ⇒ Pinnacle::Contacts::Client
- #conversations ⇒ Pinnacle::Conversations::Client
- #initialize(api_key:, base_url: nil) ⇒ void constructor
-
#messages ⇒ Pinnacle::Wrapper::Messages::Client
Returns an enhanced messages client with webhook processing support.
- #phone_numbers ⇒ Pinnacle::PhoneNumbers::Client
- #rcs ⇒ Pinnacle::Rcs::Client
- #status ⇒ Pinnacle::Status::Client
-
#tools ⇒ Pinnacle::Wrapper::Tools::Client
Returns an enhanced tools client with file upload helper.
- #webhooks ⇒ Pinnacle::Webhooks::Client
Constructor Details
#initialize(api_key:, base_url: nil) ⇒ void
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pinnacle/client.rb', line 9 def initialize(api_key:, base_url: nil) @raw_client = Pinnacle::Internal::Http::RawClient.new( base_url: base_url || Pinnacle::Environment::DEFAULT, headers: { "User-Agent" => "rcs/2.0.6-rc.1", "X-Fern-Language" => "Ruby", "PINNACLE-API-KEY" => api_key.to_s } ) end |
Instance Method Details
#audiences ⇒ Pinnacle::Audiences::Client
26 27 28 |
# File 'lib/pinnacle/client.rb', line 26 def audiences @audiences ||= Pinnacle::Audiences::Client.new(client: @raw_client) end |
#brands ⇒ Pinnacle::Brands::Client
21 22 23 |
# File 'lib/pinnacle/client.rb', line 21 def brands @brands ||= Pinnacle::Brands::Client.new(client: @raw_client) end |
#campaigns ⇒ Pinnacle::Campaigns::Client
61 62 63 |
# File 'lib/pinnacle/client.rb', line 61 def campaigns @campaigns ||= Pinnacle::Campaigns::Client.new(client: @raw_client) end |
#contacts ⇒ Pinnacle::Contacts::Client
31 32 33 |
# File 'lib/pinnacle/client.rb', line 31 def contacts @contacts ||= Pinnacle::Contacts::Client.new(client: @raw_client) end |
#conversations ⇒ Pinnacle::Conversations::Client
36 37 38 |
# File 'lib/pinnacle/client.rb', line 36 def conversations @conversations ||= Pinnacle::Conversations::Client.new(client: @raw_client) end |
#messages ⇒ Pinnacle::Wrapper::Messages::Client
Returns an enhanced messages client with webhook processing support.
41 42 43 |
# File 'lib/pinnacle/client.rb', line 41 def @messages ||= Pinnacle::Messages::Client.new(client: @raw_client) end |
#phone_numbers ⇒ Pinnacle::PhoneNumbers::Client
46 47 48 |
# File 'lib/pinnacle/client.rb', line 46 def phone_numbers @phone_numbers ||= Pinnacle::PhoneNumbers::Client.new(client: @raw_client) end |
#rcs ⇒ Pinnacle::Rcs::Client
51 52 53 |
# File 'lib/pinnacle/client.rb', line 51 def rcs @rcs ||= Pinnacle::Rcs::Client.new(client: @raw_client) end |
#status ⇒ Pinnacle::Status::Client
66 67 68 |
# File 'lib/pinnacle/client.rb', line 66 def status @status ||= Pinnacle::Status::Client.new(client: @raw_client) end |
#tools ⇒ Pinnacle::Wrapper::Tools::Client
Returns an enhanced tools client with file upload helper.
71 72 73 |
# File 'lib/pinnacle/client.rb', line 71 def tools @tools ||= Pinnacle::Tools::Client.new(client: @raw_client) end |
#webhooks ⇒ Pinnacle::Webhooks::Client
56 57 58 |
# File 'lib/pinnacle/client.rb', line 56 def webhooks @webhooks ||= Pinnacle::Webhooks::Client.new(client: @raw_client) end |