hubspot-api-client 4.0.0 → 7.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -1
  3. data/lib/hubspot-api-client.rb +8 -0
  4. data/lib/hubspot/codegen/cms/audit-logs/api/default_api.rb +1 -1
  5. data/lib/hubspot/codegen/cms/performance/configuration.rb +0 -7
  6. data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +4 -2
  7. data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +2 -2
  8. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +20 -12
  9. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +40 -24
  10. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +10 -6
  11. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +20 -20
  12. data/lib/hubspot/codegen/crm/companies/models/batch_response_simple_public_object.rb +29 -38
  13. data/lib/hubspot/codegen/crm/companies/models/batch_response_simple_public_object_with_errors.rb +333 -0
  14. data/lib/hubspot/codegen/crm/companies/models/filter.rb +15 -15
  15. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +18 -18
  16. data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +2 -2
  17. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +20 -12
  18. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +40 -24
  19. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +10 -6
  20. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +20 -20
  21. data/lib/hubspot/codegen/crm/contacts/models/batch_response_simple_public_object.rb +29 -38
  22. data/lib/hubspot/codegen/crm/contacts/models/batch_response_simple_public_object_with_errors.rb +333 -0
  23. data/lib/hubspot/codegen/crm/contacts/models/filter.rb +15 -15
  24. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +18 -18
  25. data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +2 -2
  26. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +20 -12
  27. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +40 -24
  28. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +10 -6
  29. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +20 -20
  30. data/lib/hubspot/codegen/crm/deals/models/batch_response_simple_public_object.rb +29 -38
  31. data/lib/hubspot/codegen/crm/deals/models/batch_response_simple_public_object_with_errors.rb +333 -0
  32. data/lib/hubspot/codegen/crm/deals/models/filter.rb +15 -15
  33. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +18 -18
  34. data/lib/hubspot/codegen/crm/extensions/cards/configuration.rb +0 -7
  35. data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +2 -2
  36. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +20 -12
  37. data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +40 -24
  38. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +10 -6
  39. data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +20 -20
  40. data/lib/hubspot/codegen/crm/line_items/models/batch_response_simple_public_object.rb +29 -38
  41. data/lib/hubspot/codegen/crm/line_items/models/batch_response_simple_public_object_with_errors.rb +333 -0
  42. data/lib/hubspot/codegen/crm/line_items/models/filter.rb +15 -15
  43. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_batch_input.rb +18 -18
  44. data/lib/hubspot/codegen/crm/owners/api/default_api.rb +0 -2
  45. data/lib/hubspot/codegen/crm/products/api/associations_api.rb +2 -2
  46. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +20 -12
  47. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +40 -24
  48. data/lib/hubspot/codegen/crm/products/api/search_api.rb +10 -6
  49. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +20 -20
  50. data/lib/hubspot/codegen/crm/products/models/batch_response_simple_public_object.rb +29 -38
  51. data/lib/hubspot/codegen/crm/products/models/batch_response_simple_public_object_with_errors.rb +333 -0
  52. data/lib/hubspot/codegen/crm/products/models/filter.rb +15 -15
  53. data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input.rb +18 -18
  54. data/lib/hubspot/codegen/crm/properties/api/batch_api.rb +30 -18
  55. data/lib/hubspot/codegen/crm/properties/api/core_api.rb +20 -12
  56. data/lib/hubspot/codegen/crm/properties/api/groups_api.rb +20 -12
  57. data/lib/hubspot/codegen/crm/properties/models/batch_read_input_property_name.rb +18 -18
  58. data/lib/hubspot/codegen/crm/properties/models/batch_response_property.rb +29 -23
  59. data/lib/hubspot/codegen/crm/properties/models/property_create.rb +14 -4
  60. data/lib/hubspot/codegen/crm/properties/models/property_update.rb +14 -4
  61. data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +1 -157
  62. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +2 -190
  63. data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +11 -187
  64. data/lib/hubspot/codegen/crm/quotes/api/default_api.rb +426 -0
  65. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +11 -7
  66. data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +20 -20
  67. data/lib/hubspot/codegen/crm/quotes/models/batch_response_simple_public_object.rb +29 -38
  68. data/lib/hubspot/codegen/crm/quotes/models/batch_response_simple_public_object_with_errors.rb +333 -0
  69. data/lib/hubspot/codegen/crm/quotes/models/filter.rb +15 -15
  70. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_batch_input.rb +18 -18
  71. data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +2 -2
  72. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +20 -12
  73. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +40 -24
  74. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +10 -6
  75. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +20 -20
  76. data/lib/hubspot/codegen/crm/tickets/models/batch_response_simple_public_object.rb +29 -38
  77. data/lib/hubspot/codegen/crm/tickets/models/batch_response_simple_public_object_with_errors.rb +333 -0
  78. data/lib/hubspot/codegen/crm/tickets/models/filter.rb +15 -15
  79. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +18 -18
  80. data/lib/hubspot/codegen/oauth/configuration.rb +0 -14
  81. data/lib/hubspot/codegen/webhooks/api/subscriptions_api.rb +16 -12
  82. data/lib/hubspot/codegen/webhooks/configuration.rb +0 -7
  83. data/lib/hubspot/codegen/webhooks/models/batch_response_subscription_response.rb +1 -21
  84. data/lib/hubspot/codegen/webhooks/models/batch_response_subscription_response_with_errors.rb +331 -0
  85. data/lib/hubspot/codegen/webhooks/models/settings_response.rb +28 -28
  86. data/lib/hubspot/codegen/webhooks/models/subscription_create_request.rb +16 -13
  87. data/lib/hubspot/codegen/webhooks/models/subscription_patch_request.rb +7 -7
  88. data/lib/hubspot/codegen/webhooks/models/subscription_response.rb +45 -39
  89. data/lib/hubspot/version.rb +1 -1
  90. data/sample-apps/companies-app/Gemfile.lock +2 -2
  91. data/sample-apps/companies-app/app/lib/services/hubspot/associations/create.rb +1 -1
  92. data/sample-apps/companies-app/app/lib/services/hubspot/associations/delete.rb +1 -1
  93. data/sample-apps/companies-app/app/lib/services/hubspot/associations/get_by_id.rb +2 -2
  94. data/sample-apps/companies-app/app/lib/services/hubspot/companies/create.rb +1 -1
  95. data/sample-apps/companies-app/app/lib/services/hubspot/companies/search.rb +1 -1
  96. data/sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb +1 -2
  97. data/sample-apps/companies-app/app/lib/services/hubspot/contacts/search.rb +1 -1
  98. data/sample-apps/contacts-app/Gemfile.lock +2 -2
  99. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/create.rb +1 -1
  100. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/search.rb +1 -1
  101. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb +1 -2
  102. data/sample-apps/contacts-app/app/lib/services/hubspot/properties/create.rb +1 -2
  103. data/sample-apps/contacts-app/app/lib/services/hubspot/properties/update.rb +1 -2
  104. data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/archive_batch.rb +1 -1
  105. data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/create_batch.rb +1 -1
  106. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/create.rb +1 -1
  107. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/search.rb +1 -1
  108. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb +1 -2
  109. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/archive_batch.rb +1 -1
  110. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/create_batch.rb +1 -1
  111. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/contacts/search.rb +1 -1
  112. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/properties/create.rb +1 -2
  113. data/sample-apps/trello-integration-app/.env.template +7 -0
  114. data/sample-apps/trello-integration-app/.gitignore +35 -0
  115. data/sample-apps/trello-integration-app/.rspec +1 -0
  116. data/sample-apps/trello-integration-app/.ruby-version +1 -0
  117. data/sample-apps/trello-integration-app/Dockerfile +22 -0
  118. data/sample-apps/trello-integration-app/Gemfile +38 -0
  119. data/sample-apps/trello-integration-app/Gemfile.lock +314 -0
  120. data/sample-apps/trello-integration-app/README.md +31 -0
  121. data/sample-apps/trello-integration-app/Rakefile +6 -0
  122. data/sample-apps/trello-integration-app/app/assets/config/manifest.js +3 -0
  123. data/sample-apps/trello-integration-app/app/assets/images/.keep +0 -0
  124. data/sample-apps/trello-integration-app/app/assets/images/right-arrow.png +0 -0
  125. data/sample-apps/trello-integration-app/app/assets/javascripts/application.js +22 -0
  126. data/sample-apps/trello-integration-app/app/assets/javascripts/cable.js +13 -0
  127. data/sample-apps/trello-integration-app/app/assets/javascripts/channels/.keep +0 -0
  128. data/sample-apps/trello-integration-app/app/assets/javascripts/jquery-spinner.min.js +11071 -0
  129. data/sample-apps/trello-integration-app/app/assets/javascripts/lodash.js +15972 -0
  130. data/sample-apps/trello-integration-app/app/assets/javascripts/mappings.js +78 -0
  131. data/sample-apps/trello-integration-app/app/assets/javascripts/typeahead.bundle.min.js +8 -0
  132. data/sample-apps/trello-integration-app/app/assets/stylesheets/application.css +46 -0
  133. data/sample-apps/trello-integration-app/app/assets/stylesheets/authorization.scss +34 -0
  134. data/sample-apps/trello-integration-app/app/assets/stylesheets/jquery-spinner.css +33 -0
  135. data/sample-apps/trello-integration-app/app/assets/stylesheets/mappings.scss +55 -0
  136. data/sample-apps/trello-integration-app/app/assets/stylesheets/navigation.scss +43 -0
  137. data/sample-apps/trello-integration-app/app/assets/stylesheets/search_frame.scss +81 -0
  138. data/sample-apps/trello-integration-app/app/controllers/application_controller.rb +38 -0
  139. data/sample-apps/trello-integration-app/app/controllers/concerns/.keep +0 -0
  140. data/sample-apps/trello-integration-app/app/controllers/concerns/exception_handler.rb +12 -0
  141. data/sample-apps/trello-integration-app/app/controllers/home_controller.rb +20 -0
  142. data/sample-apps/trello-integration-app/app/controllers/mappings_controller.rb +64 -0
  143. data/sample-apps/trello-integration-app/app/controllers/oauth/authorization_controller.rb +28 -0
  144. data/sample-apps/trello-integration-app/app/controllers/trello/cards_controller.rb +94 -0
  145. data/sample-apps/trello-integration-app/app/controllers/trello/webhooks_controller.rb +30 -0
  146. data/sample-apps/trello-integration-app/app/helpers/application_helper.rb +2 -0
  147. data/sample-apps/trello-integration-app/app/helpers/oauth/authorization_helper.rb +11 -0
  148. data/sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/authorize.rb +17 -0
  149. data/sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/get_authorization_uri.rb +35 -0
  150. data/sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb +21 -0
  151. data/sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/generate.rb +28 -0
  152. data/sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/refresh.rb +35 -0
  153. data/sample-apps/trello-integration-app/app/lib/services/hubspot/deals/get_by_id.rb +15 -0
  154. data/sample-apps/trello-integration-app/app/lib/services/hubspot/deals/update.rb +17 -0
  155. data/sample-apps/trello-integration-app/app/lib/services/hubspot/extensions_cards/create.rb +82 -0
  156. data/sample-apps/trello-integration-app/app/lib/services/hubspot/pipelines/get_all.rb +11 -0
  157. data/sample-apps/trello-integration-app/app/lib/services/hubspot/pipelines/get_by_id.rb +15 -0
  158. data/sample-apps/trello-integration-app/app/lib/services/trello/authorization/authorize.rb +20 -0
  159. data/sample-apps/trello-integration-app/app/lib/services/trello/boards/get_all.rb +11 -0
  160. data/sample-apps/trello-integration-app/app/lib/services/trello/boards/get_by_id.rb +19 -0
  161. data/sample-apps/trello-integration-app/app/lib/services/trello/cards/format.rb +78 -0
  162. data/sample-apps/trello-integration-app/app/lib/services/trello/cards/get_by_id.rb +15 -0
  163. data/sample-apps/trello-integration-app/app/lib/services/trello/cards/search.rb +15 -0
  164. data/sample-apps/trello-integration-app/app/lib/services/trello/webhooks/create.rb +31 -0
  165. data/sample-apps/trello-integration-app/app/lib/services/trello/webhooks/delete.rb +17 -0
  166. data/sample-apps/trello-integration-app/app/lib/services/trello/webhooks/update.rb +19 -0
  167. data/sample-apps/trello-integration-app/app/models/application_record.rb +3 -0
  168. data/sample-apps/trello-integration-app/app/models/concerns/.keep +0 -0
  169. data/sample-apps/trello-integration-app/app/models/deal_association.rb +2 -0
  170. data/sample-apps/trello-integration-app/app/models/extension_card.rb +4 -0
  171. data/sample-apps/trello-integration-app/app/models/hubspot_token.rb +19 -0
  172. data/sample-apps/trello-integration-app/app/models/mapping.rb +2 -0
  173. data/sample-apps/trello-integration-app/app/models/trello_token.rb +19 -0
  174. data/sample-apps/trello-integration-app/app/models/webhook.rb +2 -0
  175. data/sample-apps/trello-integration-app/app/views/home/index.html.erb +23 -0
  176. data/sample-apps/trello-integration-app/app/views/home/success.html.erb +11 -0
  177. data/sample-apps/trello-integration-app/app/views/layouts/application.html.erb +23 -0
  178. data/sample-apps/trello-integration-app/app/views/mappings/_mapping.html.erb +13 -0
  179. data/sample-apps/trello-integration-app/app/views/mappings/index.html.erb +44 -0
  180. data/sample-apps/trello-integration-app/app/views/oauth/authorization/login.html.erb +42 -0
  181. data/sample-apps/trello-integration-app/app/views/shared/_header.html.erb +15 -0
  182. data/sample-apps/trello-integration-app/app/views/trello/cards/search_frame.html.erb +69 -0
  183. data/sample-apps/trello-integration-app/app/views/trello/cards/search_frame_success.html.erb +7 -0
  184. data/sample-apps/trello-integration-app/bin/bundle +3 -0
  185. data/sample-apps/trello-integration-app/bin/rails +9 -0
  186. data/sample-apps/trello-integration-app/bin/rake +9 -0
  187. data/sample-apps/trello-integration-app/bin/setup +36 -0
  188. data/sample-apps/trello-integration-app/bin/spring +17 -0
  189. data/sample-apps/trello-integration-app/bin/update +31 -0
  190. data/sample-apps/trello-integration-app/bin/yarn +11 -0
  191. data/sample-apps/trello-integration-app/config.ru +5 -0
  192. data/sample-apps/trello-integration-app/config/application.rb +20 -0
  193. data/sample-apps/trello-integration-app/config/boot.rb +3 -0
  194. data/sample-apps/trello-integration-app/config/cable.yml +10 -0
  195. data/sample-apps/trello-integration-app/config/database.yml +16 -0
  196. data/sample-apps/trello-integration-app/config/environment.rb +5 -0
  197. data/sample-apps/trello-integration-app/config/environments/development.rb +61 -0
  198. data/sample-apps/trello-integration-app/config/environments/production.rb +94 -0
  199. data/sample-apps/trello-integration-app/config/environments/test.rb +46 -0
  200. data/sample-apps/trello-integration-app/config/initializers/assets.rb +14 -0
  201. data/sample-apps/trello-integration-app/config/initializers/filter_parameter_logging.rb +4 -0
  202. data/sample-apps/trello-integration-app/config/initializers/hubspot-api-client.rb +3 -0
  203. data/sample-apps/trello-integration-app/config/initializers/mime_types.rb +1 -0
  204. data/sample-apps/trello-integration-app/config/initializers/omniauth.rb +11 -0
  205. data/sample-apps/trello-integration-app/config/initializers/trello.rb +1 -0
  206. data/sample-apps/trello-integration-app/config/initializers/wrap_parameters.rb +14 -0
  207. data/sample-apps/trello-integration-app/config/locales/en.yml +33 -0
  208. data/sample-apps/trello-integration-app/config/puma.rb +34 -0
  209. data/sample-apps/trello-integration-app/config/routes.rb +29 -0
  210. data/sample-apps/trello-integration-app/config/spring.rb +6 -0
  211. data/sample-apps/trello-integration-app/config/storage.yml +34 -0
  212. data/sample-apps/trello-integration-app/db/migrate/20200624132327_create_hubspot_tokens.rb +10 -0
  213. data/sample-apps/trello-integration-app/db/migrate/20200624132336_create_trello_tokens.rb +8 -0
  214. data/sample-apps/trello-integration-app/db/migrate/20200624132337_create_deal_associations.rb +8 -0
  215. data/sample-apps/trello-integration-app/db/migrate/20200702130530_create_extension_cards.rb +8 -0
  216. data/sample-apps/trello-integration-app/db/migrate/20200715143913_create_mappings.rb +12 -0
  217. data/sample-apps/trello-integration-app/db/migrate/20200727083656_create_webhooks.rb +9 -0
  218. data/sample-apps/trello-integration-app/db/schema.rb +52 -0
  219. data/sample-apps/trello-integration-app/db/seeds.rb +7 -0
  220. data/sample-apps/trello-integration-app/docker-compose.yml +41 -0
  221. data/sample-apps/trello-integration-app/docker-entrypoint.sh +8 -0
  222. data/sample-apps/trello-integration-app/lib/assets/.keep +0 -0
  223. data/sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb +18 -0
  224. data/sample-apps/trello-integration-app/lib/tasks/.keep +0 -0
  225. data/sample-apps/trello-integration-app/log/.keep +0 -0
  226. data/sample-apps/trello-integration-app/package.json +5 -0
  227. data/sample-apps/trello-integration-app/public/404.html +67 -0
  228. data/sample-apps/trello-integration-app/public/422.html +67 -0
  229. data/sample-apps/trello-integration-app/public/500.html +66 -0
  230. data/sample-apps/trello-integration-app/public/favicon.ico +0 -0
  231. data/sample-apps/trello-integration-app/public/robots.txt +1 -0
  232. data/sample-apps/trello-integration-app/tmp/.keep +0 -0
  233. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/contacts/get_batch.rb +1 -4
  234. metadata +277 -2
@@ -8,7 +8,7 @@ module Services
8
8
  end
9
9
 
10
10
  def call
11
- ::Hubspot::Crm::Associations::BatchApi.new.create_batch(
11
+ ::Hubspot::Crm::Associations::BatchApi.new.create(
12
12
  'companies',
13
13
  'contacts',
14
14
  batch_input_public_association: association,
@@ -8,7 +8,7 @@ module Services
8
8
  end
9
9
 
10
10
  def call
11
- ::Hubspot::Crm::Associations::BatchApi.new.archive_batch(
11
+ ::Hubspot::Crm::Associations::BatchApi.new.archive(
12
12
  'companies',
13
13
  'contacts',
14
14
  batch_input_public_association: association,
@@ -9,7 +9,7 @@ module Services
9
9
  def call
10
10
  return unless associated_contacts_id_object.present?
11
11
 
12
- contacts_list = ::Hubspot::Crm::Contacts::BatchApi.new.read_batch(
12
+ contacts_list = ::Hubspot::Crm::Contacts::BatchApi.new.read(
13
13
  body: associated_contacts_id_object,
14
14
  auth_names: 'oauth2'
15
15
  ).results
@@ -18,7 +18,7 @@ module Services
18
18
  private
19
19
 
20
20
  def associated_contacts_id_object
21
- id_objects = ::Hubspot::Crm::Associations::BatchApi.new.read_batch(
21
+ id_objects = ::Hubspot::Crm::Associations::BatchApi.new.read(
22
22
  'companies',
23
23
  'contacts',
24
24
  body: company_id_object,
@@ -8,7 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  basic_api = ::Hubspot::Crm::Companies::BasicApi.new
11
- basic_api.create(auth_names: 'oauth2', body: company)
11
+ basic_api.create(company, auth_names: 'oauth2')
12
12
  end
13
13
 
14
14
  private
@@ -8,7 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  search_api = ::Hubspot::Crm::Companies::SearchApi.new
11
- search_api.do_search(body: search_request, auth_names: 'oauth2').results
11
+ search_api.do_search(search_request, auth_names: 'oauth2').results
12
12
  end
13
13
 
14
14
  private
@@ -9,8 +9,7 @@ module Services
9
9
 
10
10
  def call
11
11
  basic_api = ::Hubspot::Crm::Companies::BasicApi.new
12
- params = { auth_names: 'oauth2', body: company }
13
- basic_api.update(@id, params)
12
+ basic_api.update(@id, company, auth_names: 'oauth2')
14
13
  end
15
14
 
16
15
  private
@@ -8,7 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  search_api = ::Hubspot::Crm::Contacts::SearchApi.new
11
- search_api.do_search(body: search_request, auth_names: 'oauth2').results
11
+ search_api.do_search(search_request, auth_names: 'oauth2').results
12
12
  end
13
13
 
14
14
  private
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- hubspot-api-client (2.0.0)
4
+ hubspot-api-client (7.1.0)
5
5
  faraday (>= 0.14.0)
6
6
  json (~> 2.1, >= 2.1.0)
7
7
 
@@ -98,7 +98,7 @@ GEM
98
98
  io-like (0.3.0)
99
99
  jbuilder (2.9.1)
100
100
  activesupport (>= 4.2.0)
101
- json (2.3.0)
101
+ json (2.3.1)
102
102
  listen (3.1.5)
103
103
  rb-fsevent (~> 0.9, >= 0.9.4)
104
104
  rb-inotify (~> 0.9, >= 0.9.7)
@@ -8,7 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  create_api = ::Hubspot::Crm::Contacts::BasicApi.new
11
- create_api.create(body: contact_input, auth_names: 'oauth2')
11
+ create_api.create(contact_input, auth_names: 'oauth2')
12
12
  end
13
13
 
14
14
  private
@@ -8,7 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  search_api = ::Hubspot::Crm::Contacts::SearchApi.new
11
- results = search_api.do_search(body: search_request, auth_names: 'oauth2').results
11
+ results = search_api.do_search(search_request, auth_names: 'oauth2').results
12
12
  results = add_fullnames(results)
13
13
  results
14
14
  end
@@ -9,8 +9,7 @@ module Services
9
9
 
10
10
  def call
11
11
  basic_api = ::Hubspot::Crm::Contacts::BasicApi.new
12
- params = { auth_names: 'oauth2', body: contact_input }
13
- basic_api.update(@id, params)
12
+ basic_api.update(@id, contact_input, auth_names: 'oauth2')
14
13
  end
15
14
 
16
15
  private
@@ -8,8 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  core_api = ::Hubspot::Crm::Properties::CoreApi.new
11
- params = { auth_names: 'oauth2', body: property_create }
12
- core_api.create('contact',params)
11
+ core_api.create('contact', property_create, auth_names: 'oauth2')
13
12
  end
14
13
 
15
14
  private
@@ -9,8 +9,7 @@ module Services
9
9
 
10
10
  def call
11
11
  core_api = ::Hubspot::Crm::Properties::CoreApi.new
12
- params = { auth_names: 'oauth2', body: property_update }
13
- core_api.update('contact', @name, params)
12
+ core_api.update('contact', @name, property_update, auth_names: 'oauth2')
14
13
  end
15
14
 
16
15
  private
@@ -11,7 +11,7 @@ module Services
11
11
  ids_object = ::Hubspot::Crm::Contacts::BatchInputSimplePublicObjectId.new(
12
12
  inputs: @ids
13
13
  )
14
- batch_api.archive(body: ids_object , auth_names: 'oauth2')
14
+ batch_api.archive(ids_object, auth_names: 'oauth2')
15
15
  end
16
16
 
17
17
  private
@@ -11,7 +11,7 @@ module Services
11
11
  contacts_object = ::Hubspot::Crm::Contacts::BatchInputSimplePublicObjectInput.new(
12
12
  inputs: contacts
13
13
  )
14
- batch_api.create(body: contacts_object, auth_names: 'oauth2')
14
+ batch_api.create(contacts_object, auth_names: 'oauth2')
15
15
  end
16
16
 
17
17
  private
@@ -8,7 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  create_api = ::Hubspot::Crm::Contacts::BasicApi.new
11
- create_api.create(body: contact_input, auth_names: 'oauth2')
11
+ create_api.create(contact_input, auth_names: 'oauth2')
12
12
  end
13
13
 
14
14
  private
@@ -8,7 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  search_api = ::Hubspot::Crm::Contacts::SearchApi.new
11
- results = search_api.do_search(body: search_request, auth_names: 'oauth2').results
11
+ results = search_api.do_search(search_request, auth_names: 'oauth2').results
12
12
  results = add_fullnames(results)
13
13
  results
14
14
  end
@@ -9,8 +9,7 @@ module Services
9
9
 
10
10
  def call
11
11
  basic_api = ::Hubspot::Crm::Contacts::BasicApi.new
12
- params = { auth_names: 'oauth2', body: contact_input }
13
- basic_api.update(@id, params)
12
+ basic_api.update(@id, contact_input, auth_names: 'oauth2')
14
13
  end
15
14
 
16
15
  private
@@ -11,7 +11,7 @@ module Services
11
11
  ids_object = ::Hubspot::Crm::Contacts::BatchInputSimplePublicObjectId.new(
12
12
  inputs: @ids
13
13
  )
14
- batch_api.archive(body: ids_object , auth_names: 'oauth2')
14
+ batch_api.archive(ids_object , auth_names: 'oauth2')
15
15
  end
16
16
 
17
17
  private
@@ -11,7 +11,7 @@ module Services
11
11
  contacts_object = ::Hubspot::Crm::Contacts::BatchInputSimplePublicObjectInput.new(
12
12
  inputs: contacts
13
13
  )
14
- batch_api.create(body: contacts_object, auth_names: 'oauth2')
14
+ batch_api.create(contacts_object, auth_names: 'oauth2')
15
15
  end
16
16
 
17
17
  private
@@ -10,7 +10,7 @@ module Services
10
10
  end
11
11
 
12
12
  def call
13
- @search_api.do_search(body: search_request, auth_names: 'oauth2').results
13
+ @search_api.do_search(search_request, auth_names: 'oauth2').results
14
14
  end
15
15
 
16
16
  private
@@ -8,8 +8,7 @@ module Services
8
8
 
9
9
  def call
10
10
  core_api = ::Hubspot::Crm::Properties::CoreApi.new
11
- params = { auth_names: 'oauth2', body: property_create }
12
- core_api.create('contact',params)
11
+ core_api.create('contact', property_create, auth_names: 'oauth2')
13
12
  end
14
13
 
15
14
  private
@@ -0,0 +1,7 @@
1
+ HUBSPOT_CLIENT_ID=
2
+ HUBSPOT_CLIENT_SECRET=
3
+ HUBSPOT_DEVELOPER_API_KEY=
4
+ HUBSPOT_APPLICATION_ID=
5
+
6
+ TRELLO_KEY=
7
+ TRELLO_SECRET=
@@ -0,0 +1,35 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ /tmp/*
17
+ !/log/.keep
18
+ !/tmp/.keep
19
+
20
+ # Ignore uploaded files in development
21
+ /storage/*
22
+ !/storage/.keep
23
+
24
+ /node_modules
25
+ /yarn-error.log
26
+
27
+ /public/assets
28
+ .byebug_history
29
+
30
+ # Ignore master key for decrypting credentials and more.
31
+ /config/master.key
32
+
33
+ .rubocop.yml
34
+ .env
35
+ .env.test
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1,22 @@
1
+ FROM ruby:2.6.3
2
+ RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
3
+ RUN mkdir /hubspot-api-client
4
+
5
+ COPY ./lib /hubspot-api-client/lib
6
+ COPY ./sample-apps /hubspot-api-client/sample-apps
7
+ COPY ./spec /hubspot-api-client/spec
8
+ COPY ./Gemfile /hubspot-api-client/Gemfile
9
+ COPY ./Gemfile.lock /hubspot-api-client/Gemfile.lock
10
+ COPY ./hubspot-api-client.gemspec /hubspot-api-client/hubspot-api-client.gemspec
11
+
12
+ WORKDIR /hubspot-api-client/sample-apps/trello-integration-app
13
+ RUN bundle install
14
+
15
+ # Add a script to be executed every time the container starts.
16
+ COPY ./sample-apps/trello-integration-app/docker-entrypoint.sh /usr/bin/
17
+ RUN chmod +x /usr/bin/docker-entrypoint.sh
18
+ ENTRYPOINT ["docker-entrypoint.sh"]
19
+ EXPOSE 3000
20
+
21
+ # Start the main process.
22
+ CMD ["rails", "server", "-b", "0.0.0.0"]
@@ -0,0 +1,38 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ ruby '2.6.3'
5
+
6
+ gem 'rails', '~> 5.2.3'
7
+ gem 'sqlite3'
8
+ gem 'puma', '~> 4.3'
9
+ gem 'sass-rails', '~> 5.0'
10
+ gem 'uglifier', '>= 1.3.0'
11
+ gem 'turbolinks', '~> 5'
12
+ gem 'jbuilder', '~> 2.5'
13
+ gem 'ruby-trello'
14
+ gem 'omniauth-trello'
15
+ gem 'mysql2', '~> 0.5.2'
16
+ gem 'jquery-rails'
17
+ gem 'httparty', '0.17.3'
18
+
19
+ gem 'hubspot-api-client', path: '../../'
20
+
21
+ group :development, :test do
22
+ gem 'dotenv-rails', require: 'dotenv/rails-now'
23
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
24
+ gem 'rspec-rails', '~> 3.5'
25
+ gem 'capybara'
26
+ gem 'capybara-mechanize', '~> 1.11'
27
+ gem 'selenium-webdriver', '3.4.3'
28
+ gem 'geckodriver-helper'
29
+ gem 'pry'
30
+ gem 'pry-byebug'
31
+ end
32
+
33
+ group :development do
34
+ gem 'web-console', '>= 3.3.0'
35
+ gem 'listen', '>= 3.0.5', '< 3.2'
36
+ end
37
+
38
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
@@ -0,0 +1,314 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ hubspot-api-client (7.0.0)
5
+ faraday (>= 0.14.0)
6
+ json (~> 2.1, >= 2.1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.2.3)
12
+ actionpack (= 5.2.3)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailer (5.2.3)
16
+ actionpack (= 5.2.3)
17
+ actionview (= 5.2.3)
18
+ activejob (= 5.2.3)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.2.3)
22
+ actionview (= 5.2.3)
23
+ activesupport (= 5.2.3)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.2.3)
29
+ activesupport (= 5.2.3)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.2.3)
35
+ activesupport (= 5.2.3)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.2.3)
38
+ activesupport (= 5.2.3)
39
+ activerecord (5.2.3)
40
+ activemodel (= 5.2.3)
41
+ activesupport (= 5.2.3)
42
+ arel (>= 9.0)
43
+ activestorage (5.2.3)
44
+ actionpack (= 5.2.3)
45
+ activerecord (= 5.2.3)
46
+ marcel (~> 0.3.1)
47
+ activesupport (5.2.3)
48
+ concurrent-ruby (~> 1.0, >= 1.0.2)
49
+ i18n (>= 0.7, < 2)
50
+ minitest (~> 5.1)
51
+ tzinfo (~> 1.1)
52
+ addressable (2.7.0)
53
+ public_suffix (>= 2.0.2, < 5.0)
54
+ archive-zip (0.12.0)
55
+ io-like (~> 0.3.0)
56
+ arel (9.0.0)
57
+ bindex (0.8.1)
58
+ builder (3.2.3)
59
+ byebug (11.0.1)
60
+ capybara (3.29.0)
61
+ addressable
62
+ mini_mime (>= 0.1.3)
63
+ nokogiri (~> 1.8)
64
+ rack (>= 1.6.0)
65
+ rack-test (>= 0.6.3)
66
+ regexp_parser (~> 1.5)
67
+ xpath (~> 3.2)
68
+ capybara-mechanize (1.11.0)
69
+ capybara (>= 2.4.4, < 4)
70
+ mechanize (~> 2.7.0)
71
+ childprocess (0.9.0)
72
+ ffi (~> 1.0, >= 1.0.11)
73
+ coderay (1.1.2)
74
+ concurrent-ruby (1.1.5)
75
+ connection_pool (2.2.2)
76
+ crass (1.0.5)
77
+ diff-lcs (1.3)
78
+ domain_name (0.5.20190701)
79
+ unf (>= 0.0.5, < 1.0.0)
80
+ dotenv (2.7.5)
81
+ dotenv-rails (2.7.5)
82
+ dotenv (= 2.7.5)
83
+ railties (>= 3.2, < 6.1)
84
+ erubi (1.9.0)
85
+ execjs (2.7.0)
86
+ faraday (1.0.1)
87
+ multipart-post (>= 1.2, < 3)
88
+ ffi (1.11.1)
89
+ geckodriver-helper (0.24.0)
90
+ archive-zip (~> 0.7)
91
+ globalid (0.4.2)
92
+ activesupport (>= 4.2.0)
93
+ hashie (4.1.0)
94
+ http-accept (1.7.0)
95
+ http-cookie (1.0.3)
96
+ domain_name (~> 0.5)
97
+ httparty (0.17.3)
98
+ mime-types (~> 3.0)
99
+ multi_xml (>= 0.5.2)
100
+ i18n (1.7.0)
101
+ concurrent-ruby (~> 1.0)
102
+ io-like (0.3.0)
103
+ jbuilder (2.9.1)
104
+ activesupport (>= 4.2.0)
105
+ jquery-rails (4.4.0)
106
+ rails-dom-testing (>= 1, < 3)
107
+ railties (>= 4.2.0)
108
+ thor (>= 0.14, < 2.0)
109
+ json (2.3.0)
110
+ listen (3.1.5)
111
+ rb-fsevent (~> 0.9, >= 0.9.4)
112
+ rb-inotify (~> 0.9, >= 0.9.7)
113
+ ruby_dep (~> 1.2)
114
+ loofah (2.3.1)
115
+ crass (~> 1.0.2)
116
+ nokogiri (>= 1.5.9)
117
+ mail (2.7.1)
118
+ mini_mime (>= 0.1.1)
119
+ marcel (0.3.3)
120
+ mimemagic (~> 0.3.2)
121
+ mechanize (2.7.6)
122
+ domain_name (~> 0.5, >= 0.5.1)
123
+ http-cookie (~> 1.0)
124
+ mime-types (>= 1.17.2)
125
+ net-http-digest_auth (~> 1.1, >= 1.1.1)
126
+ net-http-persistent (>= 2.5.2)
127
+ nokogiri (~> 1.6)
128
+ ntlm-http (~> 0.1, >= 0.1.1)
129
+ webrobots (>= 0.0.9, < 0.2)
130
+ method_source (0.9.2)
131
+ mime-types (3.3)
132
+ mime-types-data (~> 3.2015)
133
+ mime-types-data (3.2019.1009)
134
+ mimemagic (0.3.3)
135
+ mini_mime (1.0.2)
136
+ mini_portile2 (2.4.0)
137
+ minitest (5.13.0)
138
+ multi_json (1.14.1)
139
+ multi_xml (0.6.0)
140
+ multipart-post (2.1.1)
141
+ mysql2 (0.5.3)
142
+ net-http-digest_auth (1.4.1)
143
+ net-http-persistent (3.1.0)
144
+ connection_pool (~> 2.2)
145
+ netrc (0.11.0)
146
+ nio4r (2.5.2)
147
+ nokogiri (1.10.5)
148
+ mini_portile2 (~> 2.4.0)
149
+ ntlm-http (0.1.1)
150
+ oauth (0.5.4)
151
+ omniauth (1.9.1)
152
+ hashie (>= 3.4.6)
153
+ rack (>= 1.6.2, < 3)
154
+ omniauth-oauth (1.1.0)
155
+ oauth
156
+ omniauth (~> 1.0)
157
+ omniauth-trello (0.0.4)
158
+ multi_json (~> 1.5)
159
+ oauth (~> 0.4)
160
+ omniauth (~> 1.0)
161
+ omniauth-oauth (~> 1.0)
162
+ pry (0.12.2)
163
+ coderay (~> 1.1.0)
164
+ method_source (~> 0.9.0)
165
+ pry-byebug (3.7.0)
166
+ byebug (~> 11.0)
167
+ pry (~> 0.10)
168
+ public_suffix (4.0.1)
169
+ puma (4.3.1)
170
+ nio4r (~> 2.0)
171
+ rack (2.2.2)
172
+ rack-test (1.1.0)
173
+ rack (>= 1.0, < 3)
174
+ rails (5.2.3)
175
+ actioncable (= 5.2.3)
176
+ actionmailer (= 5.2.3)
177
+ actionpack (= 5.2.3)
178
+ actionview (= 5.2.3)
179
+ activejob (= 5.2.3)
180
+ activemodel (= 5.2.3)
181
+ activerecord (= 5.2.3)
182
+ activestorage (= 5.2.3)
183
+ activesupport (= 5.2.3)
184
+ bundler (>= 1.3.0)
185
+ railties (= 5.2.3)
186
+ sprockets-rails (>= 2.0.0)
187
+ rails-dom-testing (2.0.3)
188
+ activesupport (>= 4.2.0)
189
+ nokogiri (>= 1.6)
190
+ rails-html-sanitizer (1.3.0)
191
+ loofah (~> 2.3)
192
+ railties (5.2.3)
193
+ actionpack (= 5.2.3)
194
+ activesupport (= 5.2.3)
195
+ method_source
196
+ rake (>= 0.8.7)
197
+ thor (>= 0.19.0, < 2.0)
198
+ rake (13.0.0)
199
+ rb-fsevent (0.10.3)
200
+ rb-inotify (0.10.0)
201
+ ffi (~> 1.0)
202
+ regexp_parser (1.6.0)
203
+ rest-client (2.1.0)
204
+ http-accept (>= 1.7.0, < 2.0)
205
+ http-cookie (>= 1.0.2, < 2.0)
206
+ mime-types (>= 1.16, < 4.0)
207
+ netrc (~> 0.8)
208
+ rspec-core (3.9.0)
209
+ rspec-support (~> 3.9.0)
210
+ rspec-expectations (3.9.0)
211
+ diff-lcs (>= 1.2.0, < 2.0)
212
+ rspec-support (~> 3.9.0)
213
+ rspec-mocks (3.9.0)
214
+ diff-lcs (>= 1.2.0, < 2.0)
215
+ rspec-support (~> 3.9.0)
216
+ rspec-rails (3.9.0)
217
+ actionpack (>= 3.0)
218
+ activesupport (>= 3.0)
219
+ railties (>= 3.0)
220
+ rspec-core (~> 3.9.0)
221
+ rspec-expectations (~> 3.9.0)
222
+ rspec-mocks (~> 3.9.0)
223
+ rspec-support (~> 3.9.0)
224
+ rspec-support (3.9.0)
225
+ ruby-trello (2.3.0)
226
+ activemodel (>= 3.2.0)
227
+ addressable (~> 2.3)
228
+ json (>= 2.3.0)
229
+ oauth (>= 0.4.5)
230
+ rest-client (>= 1.8.0)
231
+ ruby_dep (1.5.0)
232
+ rubyzip (1.3.0)
233
+ sass (3.7.4)
234
+ sass-listen (~> 4.0.0)
235
+ sass-listen (4.0.0)
236
+ rb-fsevent (~> 0.9, >= 0.9.4)
237
+ rb-inotify (~> 0.9, >= 0.9.7)
238
+ sass-rails (5.1.0)
239
+ railties (>= 5.2.0)
240
+ sass (~> 3.1)
241
+ sprockets (>= 2.8, < 4.0)
242
+ sprockets-rails (>= 2.0, < 4.0)
243
+ tilt (>= 1.1, < 3)
244
+ selenium-webdriver (3.4.3)
245
+ childprocess (~> 0.5)
246
+ rubyzip (~> 1.0)
247
+ sprockets (3.7.2)
248
+ concurrent-ruby (~> 1.0)
249
+ rack (> 1, < 3)
250
+ sprockets-rails (3.2.1)
251
+ actionpack (>= 4.0)
252
+ activesupport (>= 4.0)
253
+ sprockets (>= 3.0.0)
254
+ sqlite3 (1.4.1)
255
+ thor (0.20.3)
256
+ thread_safe (0.3.6)
257
+ tilt (2.0.10)
258
+ turbolinks (5.2.1)
259
+ turbolinks-source (~> 5.2)
260
+ turbolinks-source (5.2.0)
261
+ tzinfo (1.2.5)
262
+ thread_safe (~> 0.1)
263
+ uglifier (4.2.0)
264
+ execjs (>= 0.3.0, < 3)
265
+ unf (0.1.4)
266
+ unf_ext
267
+ unf_ext (0.0.7.6)
268
+ web-console (3.7.0)
269
+ actionview (>= 5.0)
270
+ activemodel (>= 5.0)
271
+ bindex (>= 0.4.0)
272
+ railties (>= 5.0)
273
+ webrobots (0.1.2)
274
+ websocket-driver (0.7.1)
275
+ websocket-extensions (>= 0.1.0)
276
+ websocket-extensions (0.1.4)
277
+ xpath (3.2.0)
278
+ nokogiri (~> 1.8)
279
+
280
+ PLATFORMS
281
+ ruby
282
+
283
+ DEPENDENCIES
284
+ byebug
285
+ capybara
286
+ capybara-mechanize (~> 1.11)
287
+ dotenv-rails
288
+ geckodriver-helper
289
+ httparty (= 0.17.3)
290
+ hubspot-api-client!
291
+ jbuilder (~> 2.5)
292
+ jquery-rails
293
+ listen (>= 3.0.5, < 3.2)
294
+ mysql2 (~> 0.5.2)
295
+ omniauth-trello
296
+ pry
297
+ pry-byebug
298
+ puma (~> 4.3)
299
+ rails (~> 5.2.3)
300
+ rspec-rails (~> 3.5)
301
+ ruby-trello
302
+ sass-rails (~> 5.0)
303
+ selenium-webdriver (= 3.4.3)
304
+ sqlite3
305
+ turbolinks (~> 5)
306
+ tzinfo-data
307
+ uglifier (>= 1.3.0)
308
+ web-console (>= 3.3.0)
309
+
310
+ RUBY VERSION
311
+ ruby 2.6.3p62
312
+
313
+ BUNDLED WITH
314
+ 1.17.3