README.md in intercom-2.2.1 vs README.md in intercom-2.2.2

- old
+ new

@@ -17,11 +17,11 @@ gem install intercom Using bundler: - gem 'intercom', "~> 2.2.1" + gem 'intercom', "~> 2.2.2" ## Basic Usage ### Configure your access credentials @@ -42,11 +42,11 @@ https://api.intercom.io/events https://api.intercom.io/conversations https://api.intercom.io/messages https://api.intercom.io/counts https://api.intercom.io/subscriptions - + Additionally, the library can handle incoming webhooks from Intercom and convert to `Intercom::` models. ### Examples #### Users @@ -111,11 +111,11 @@ Intercom::Tag.find_all_for_user(:email => 'declan+declan@intercom.io') Intercom::Tag.find_all_for_user(:user_id => '3') # Tag companies tag = Intercom::Tag.tag_companies('red', ["42ea2f1b93891f6a99000427"]) # Untag companies -Intercom::Tag.untag_users('blue', ["42ea2f1b93891f6a99000427"]) +Intercom::Tag.untag_companies('blue', ["42ea2f1b93891f6a99000427"]) # Iterate over all tags for company Intercom::Tag.find_all_for_company(:id => '43357e2c3c77661e25000026') Intercom::Tag.find_all_for_company(:company_id => '6') ``` @@ -203,13 +203,14 @@ Intercom::User.count Intercom::Segment.count Intercom::Tag.count ``` -#### Full loading of and embedded entity +#### Full loading of an embedded entity ```ruby -# Given a converation with a partial user, load the full user. This can be done for any entity +# Given a conversation with a partial user, load the full user. This can be +# done for any entity conversation.user.load ``` #### Sending messages ```ruby @@ -221,11 +222,11 @@ :from => { :type => 'admin', :id => "1234" }, :to => { - :type => :user, + :type => "user", :id => "5678" } }) # Email message from admin to user @@ -269,20 +270,20 @@ Metadata Objects support a few simple types that Intercom can present on your behalf ```ruby Intercom::Event.create(:event_name => "placed-order", :email => current_user.email, - :created_at => 1403001013 + :created_at => 1403001013, :metadata => { - :order_date => Time.now.to_i, + :order_date => Time.now.to_i, :stripe_invoice => 'inv_3434343434', :order_number => { :value => '3434-3434', :url => 'https://example.org/orders/3434-3434' }, price: { - :currency => 'usd', + :currency => 'usd', :amount => 2999 } } ) ``` @@ -334,9 +335,10 @@ ```ruby Intercom::AuthenticationError Intercom::ServerError Intercom::ServiceUnavailableError +Intercom::ServiceConnectionError Intercom::ResourceNotFound Intercom::BadRequestError Intercom::RateLimitExceeded Intercom::AttributeNotSetError # Raised when you try to call a getter that does not exist on an object ```