Method: Bitly::API::Organization#initialize

Defined in:
lib/bitly/api/organization.rb

#initialize(data:, client:, response: nil) ⇒ Bitly::API::Organization

Creates a new ‘Bitly::API::Organization` object

Examples:

organization = Bitly::API::Organization.new(data: org_data, client: client)

Parameters:

  • data (Hash<String, String|Boolean>)

    Data returned from the API about the organization

  • client (Bitly::API::Client)

    An authorized API client

  • response (Bitly::HTTP::Response) (defaults to: nil)

    The response object from an API call



80
81
82
83
84
# File 'lib/bitly/api/organization.rb', line 80

def initialize(data:, client:, response: nil)
  assign_attributes(data)
  @client = client
  @response = response
end