intercom 3.9.5 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +483 -234
  3. data/Rakefile +1 -1
  4. data/changes.txt +37 -0
  5. data/lib/intercom/api_operations/archive.rb +2 -1
  6. data/lib/intercom/api_operations/delete.rb +16 -0
  7. data/lib/intercom/api_operations/find.rb +5 -2
  8. data/lib/intercom/api_operations/find_all.rb +4 -3
  9. data/lib/intercom/api_operations/list.rb +4 -1
  10. data/lib/intercom/api_operations/load.rb +4 -2
  11. data/lib/intercom/api_operations/nested_resource.rb +68 -0
  12. data/lib/intercom/api_operations/save.rb +6 -4
  13. data/lib/intercom/api_operations/scroll.rb +4 -5
  14. data/lib/intercom/api_operations/search.rb +3 -2
  15. data/lib/intercom/article.rb +7 -0
  16. data/lib/intercom/base_collection_proxy.rb +74 -0
  17. data/lib/intercom/client.rb +48 -25
  18. data/lib/intercom/client_collection_proxy.rb +17 -39
  19. data/lib/intercom/collection.rb +7 -0
  20. data/lib/intercom/company.rb +8 -0
  21. data/lib/intercom/contact.rb +23 -3
  22. data/lib/intercom/conversation.rb +5 -0
  23. data/lib/intercom/data_attribute.rb +7 -0
  24. data/lib/intercom/deprecated_leads_collection_proxy.rb +22 -0
  25. data/lib/intercom/deprecated_resources.rb +13 -0
  26. data/lib/intercom/errors.rb +6 -0
  27. data/lib/intercom/export_content.rb +7 -0
  28. data/lib/intercom/extended_api_operations/segments.rb +3 -1
  29. data/lib/intercom/extended_api_operations/tags.rb +3 -1
  30. data/lib/intercom/lead.rb +21 -0
  31. data/lib/intercom/lib/dynamic_accessors.rb +9 -10
  32. data/lib/intercom/lib/typed_json_deserializer.rb +45 -35
  33. data/lib/intercom/note.rb +4 -0
  34. data/lib/intercom/phone_call_redirect.rb +7 -0
  35. data/lib/intercom/request.rb +39 -33
  36. data/lib/intercom/scroll_collection_proxy.rb +38 -42
  37. data/lib/intercom/search_collection_proxy.rb +30 -65
  38. data/lib/intercom/section.rb +23 -0
  39. data/lib/intercom/segment.rb +4 -0
  40. data/lib/intercom/service/article.rb +20 -0
  41. data/lib/intercom/service/base_service.rb +7 -0
  42. data/lib/intercom/service/collection.rb +24 -0
  43. data/lib/intercom/service/company.rb +2 -12
  44. data/lib/intercom/service/contact.rb +35 -10
  45. data/lib/intercom/service/conversation.rb +16 -3
  46. data/lib/intercom/service/data_attribute.rb +20 -0
  47. data/lib/intercom/service/export_content.rb +30 -0
  48. data/lib/intercom/service/lead.rb +41 -0
  49. data/lib/intercom/service/note.rb +4 -8
  50. data/lib/intercom/service/phone_call_redirect.rb +15 -0
  51. data/lib/intercom/service/section.rb +7 -0
  52. data/lib/intercom/service/subscription.rb +2 -2
  53. data/lib/intercom/service/subscription_type.rb +18 -0
  54. data/lib/intercom/service/tag.rb +9 -9
  55. data/lib/intercom/service/visitor.rb +17 -8
  56. data/lib/intercom/subscription_type.rb +12 -0
  57. data/lib/intercom/tag.rb +4 -0
  58. data/lib/intercom/traits/api_resource.rb +44 -18
  59. data/lib/intercom/traits/dirty_tracking.rb +8 -1
  60. data/lib/intercom/user.rb +12 -3
  61. data/lib/intercom/utils.rb +19 -3
  62. data/lib/intercom/version.rb +1 -1
  63. data/lib/intercom/visitor.rb +0 -2
  64. data/lib/intercom.rb +39 -22
  65. data/spec/spec_helper.rb +843 -520
  66. data/spec/unit/intercom/admin_spec.rb +2 -2
  67. data/spec/unit/intercom/article_spec.rb +40 -0
  68. data/spec/unit/intercom/base_collection_proxy_spec.rb +52 -0
  69. data/spec/unit/intercom/client_collection_proxy_spec.rb +41 -41
  70. data/spec/unit/intercom/client_spec.rb +25 -26
  71. data/spec/unit/intercom/collection_spec.rb +32 -0
  72. data/spec/unit/intercom/company_spec.rb +19 -15
  73. data/spec/unit/intercom/contact_spec.rb +402 -33
  74. data/spec/unit/intercom/conversation_spec.rb +60 -7
  75. data/spec/unit/intercom/count_spec.rb +4 -4
  76. data/spec/unit/intercom/data_attribute_spec.rb +40 -0
  77. data/spec/unit/intercom/deprecated_leads_collection_proxy_spec.rb +17 -0
  78. data/spec/unit/intercom/event_spec.rb +16 -11
  79. data/spec/unit/intercom/export_content_spec.rb +28 -0
  80. data/spec/unit/intercom/job_spec.rb +24 -24
  81. data/spec/unit/intercom/lead_spec.rb +57 -0
  82. data/spec/unit/intercom/lib/flat_store_spec.rb +22 -20
  83. data/spec/unit/intercom/message_spec.rb +1 -1
  84. data/spec/unit/intercom/note_spec.rb +4 -10
  85. data/spec/unit/intercom/phone_call_redirect.rb +12 -0
  86. data/spec/unit/intercom/request_spec.rb +14 -1
  87. data/spec/unit/intercom/scroll_collection_proxy_spec.rb +40 -39
  88. data/spec/unit/intercom/search_collection_proxy_spec.rb +32 -28
  89. data/spec/unit/intercom/section_spec.rb +32 -0
  90. data/spec/unit/intercom/segment_spec.rb +2 -2
  91. data/spec/unit/intercom/subscription_spec.rb +5 -6
  92. data/spec/unit/intercom/tag_spec.rb +28 -14
  93. data/spec/unit/intercom/team_spec.rb +2 -2
  94. data/spec/unit/intercom/traits/api_resource_spec.rb +107 -52
  95. data/spec/unit/intercom/user_spec.rb +224 -226
  96. data/spec/unit/intercom/visitor_spec.rb +49 -0
  97. data/spec/unit/intercom_spec.rb +5 -3
  98. metadata +44 -8
  99. data/lib/intercom/customer.rb +0 -10
  100. data/lib/intercom/service/customer.rb +0 -14
  101. data/spec/unit/intercom/visitors_spec.rb +0 -61
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 204538ee7ce2d0d8b41b4c0b8ff4c6d80084570c410850ba02fc936a14292b8d
4
- data.tar.gz: 6704e411dcc92ae860d3d519bdd592e35ac2b931fb20e188b934bb4228232f12
3
+ metadata.gz: 8a680039a8ef799d52b227657866f60afa19bf4b292f9d70646c8f962eca11a0
4
+ data.tar.gz: 40317d4521715f294bec48805ed9edf6f83406260b5c74bde5e9cf96cdf9cb8c
5
5
  SHA512:
6
- metadata.gz: 496d153506de79e3527db4ba20176dd375a29ad37ab259121030f8b70ab5ba934db19fa917c28755d7205f092df2756f493742f47dbbc1eab895ac8ffa15a330
7
- data.tar.gz: 7248e5d8c2734a256c499b3145758965b2efd48b0b531a337e1337553724c40f156263b67f8db5612ed5bc2c92fb6a57b3d3068d2360647e412f8861c1a9f205
6
+ metadata.gz: df28a00dc009f9e7bd94fa497021312d4cbe005905eea6095d1efe1172f567d8f806a47750843e129cfae5af80db038aea355ba2f1a2b5122142893574d9d977
7
+ data.tar.gz: d57709458d73737890f1933264f10b23c486a08840bd3a561c8971dbfef3d2ad88b4ddb2d393154b4127cd78196a39a56c93c0f08c747c74bd303c729d01fc5f