hubspot-api-client 14.5.0 → 14.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9767c7c7c1e949bd93690f2c111d3e47141be1ca597f99091402eba1ca3f968e
4
- data.tar.gz: f435e7e0e1a4bff0d0f9e57a1dc284a9a48293e036bd8c1cfbf0e1b408825f9a
3
+ metadata.gz: 8a4cd52d4916355ef186e0e1c115027bbabc111b46c537eee81ee9eed1a4758e
4
+ data.tar.gz: 4915341310b70bd5ad5b5476b9a1a70d86fecb0f6f9b0a0a4581d68353b78a91
5
5
  SHA512:
6
- metadata.gz: b383cf4b93fb791e6869120c1b4c7952a2b6242a355c4d958c1de1523ccee00aeac3210c0949ea7e22065f2ff2c67304a31eaeb4c788dcbd0d5e95529f19755a
7
- data.tar.gz: 344aafe31b45ff09eec055504ab455a0548ed30c29bd51dba84ab33918c68390e4f442e4302eef20075cc6b1c802e846a7dc5008c266bfbdf7f84f4c4243ba53
6
+ metadata.gz: 989b451ae98b489c0df15533ab91ac351b11d864ce6a48b2f2d464cd1654234a14ae9ab4f828e93ae5e5fcf636f0948fd4f155dbf1ceec759afbef6094ddc1fd
7
+ data.tar.gz: 6050d81e977c5b24a5844eaf8087cdb78d846f592ad4cd6ea004653c81a05dec6f7b8f8e5051f99d55e7cfcaa2e9aeb9218389cad396092cca1272b38427ee70
data/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [14.5.2] - 2022-10-05
9
+ ### Fixed
10
+
11
+ - passing params with existing model
12
+
13
+ ## [14.5.1] - 2022-09-30
14
+ ### Changed
15
+
16
+ - with_http methods were added to the discovery classes
17
+
8
18
  ## [14.5.0] - 2022-09-30
9
19
  ### Changed
10
20
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubspot-api-client (14.5.0)
4
+ hubspot-api-client (14.5.2)
5
5
  json (~> 2.1, >= 2.1.0)
6
6
  require_all (~> 3.0.0)
7
7
  typhoeus (~> 1.4.0)
@@ -11,7 +11,10 @@ module Hubspot
11
11
  end
12
12
 
13
13
  def api_methods
14
- api.methods.grep(/with_http_info/).map {|elem| elem.to_s.gsub('_with_http_info', '').to_sym }
14
+ api.methods.grep(/with_http_info/).inject([]) do |methods, method|
15
+ methods << method
16
+ methods << method.to_s.gsub('_with_http_info', '').to_sym
17
+ end
15
18
  end
16
19
 
17
20
  def config
@@ -112,12 +115,14 @@ module Hubspot
112
115
  end
113
116
 
114
117
  params_to_pass = signature_params.map do |req, param|
115
- model_name = Hubspot::Helpers::CamelCase.new.format(param.to_s)
116
- Kernel.const_get("#{codegen_module_name}::#{model_name}").build_from_hash(params_with_defaults[:body])
118
+ if params_with_defaults[param].nil?
119
+ model_name = Hubspot::Helpers::CamelCase.new.format(param.to_s)
120
+ Kernel.const_get("#{codegen_module_name}::#{model_name}").build_from_hash(params_with_defaults[:body])
121
+ else
122
+ params_with_defaults[param]
123
+ end
117
124
  rescue NameError
118
- raise "Param #{param} is required for #{api.class}\##{api_method} method" if req == :req && params_with_defaults[param].nil?
119
-
120
- params_with_defaults[param]
125
+ raise "Param #{param} is required for #{api.class}\##{api_method} method" if req == :req
121
126
  end
122
127
 
123
128
  return call_api_with_retry(api_method, params_to_pass, params[:retry], &block) unless params[:retry].nil?
@@ -1,3 +1,3 @@
1
1
  module Hubspot
2
- VERSION = '14.5.0'
2
+ VERSION = '14.5.2'
3
3
  end
@@ -75,8 +75,8 @@ describe 'Hubspot::Discovery::BaseApiClient' do
75
75
 
76
76
  it { is_expected.to respond_to(:get) }
77
77
  it { is_expected.to respond_to(:update) }
78
- it { is_expected.not_to respond_to(:get_with_http_info) }
79
- it { is_expected.not_to respond_to(:update_with_http_info) }
78
+ it { is_expected.to respond_to(:get_with_http_info) }
79
+ it { is_expected.to respond_to(:update_with_http_info) }
80
80
 
81
81
  describe '#get' do
82
82
  subject(:get) { client.get(params) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubspot-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.5.0
4
+ version: 14.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - HubSpot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-30 00:00:00.000000000 Z
11
+ date: 2022-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus