merge_crm_client 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -4
  3. data/docs/Contact.md +3 -3
  4. data/docs/ContactRequest.md +6 -0
  5. data/docs/OpportunitiesApi.md +154 -0
  6. data/docs/PatchedOpportunityEndpointRequest.md +18 -0
  7. data/docs/PatchedOpportunityRequest.md +40 -0
  8. data/docs/RemoteResponse.md +3 -1
  9. data/docs/ResponseTypeEnum.md +15 -0
  10. data/docs/SyncStatus.md +2 -2
  11. data/lib/merge_crm_client/api/opportunities_api.rb +148 -0
  12. data/lib/merge_crm_client/models/account_request.rb +2 -2
  13. data/lib/merge_crm_client/models/contact_request.rb +36 -3
  14. data/lib/merge_crm_client/models/data_passthrough_request.rb +1 -1
  15. data/lib/merge_crm_client/models/engagement_request.rb +2 -2
  16. data/lib/merge_crm_client/models/issue.rb +1 -1
  17. data/lib/merge_crm_client/models/issue_status_enum.rb +1 -1
  18. data/lib/merge_crm_client/models/lead_request.rb +2 -2
  19. data/lib/merge_crm_client/models/meta_response.rb +1 -1
  20. data/lib/merge_crm_client/models/note_request.rb +2 -2
  21. data/lib/merge_crm_client/models/opportunity_request.rb +2 -2
  22. data/lib/merge_crm_client/models/patched_opportunity_endpoint_request.rb +223 -0
  23. data/lib/merge_crm_client/models/patched_opportunity_request.rb +365 -0
  24. data/lib/merge_crm_client/models/remote_response.rb +14 -11
  25. data/lib/merge_crm_client/models/response_type_enum.rb +45 -0
  26. data/lib/merge_crm_client/models/sync_status.rb +0 -10
  27. data/lib/merge_crm_client/version.rb +1 -1
  28. data/lib/merge_crm_client.rb +3 -0
  29. data/spec/api/contacts_api_spec.rb +1 -13
  30. data/spec/api/opportunities_api_spec.rb +26 -0
  31. data/spec/models/contact_request_spec.rb +18 -0
  32. data/spec/models/issue_status_enum_spec.rb +0 -7
  33. data/spec/models/patched_opportunity_endpoint_request_spec.rb +34 -0
  34. data/spec/models/patched_opportunity_request_spec.rb +100 -0
  35. data/spec/models/remote_response_spec.rb +6 -0
  36. data/spec/models/response_type_enum_spec.rb +28 -0
  37. metadata +100 -88
@@ -26,6 +26,8 @@ module MergeCRMClient
26
26
 
27
27
  attr_accessor :response_headers
28
28
 
29
+ attr_accessor :response_type
30
+
29
31
  attr_accessor :headers
30
32
 
31
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,6 +38,7 @@ module MergeCRMClient
36
38
  :'status' => :'status',
37
39
  :'response' => :'response',
38
40
  :'response_headers' => :'response_headers',
41
+ :'response_type' => :'response_type',
39
42
  :'headers' => :'headers'
40
43
  }
41
44
  end
@@ -51,15 +54,17 @@ module MergeCRMClient
51
54
  :'method' => :'String',
52
55
  :'path' => :'String',
53
56
  :'status' => :'Integer',
54
- :'response' => :'Hash<String, Object>',
57
+ :'response' => :'Object',
55
58
  :'response_headers' => :'Hash<String, Object>',
56
- :'headers' => :'Hash<String, AnyType>'
59
+ :'response_type' => :'ResponseTypeEnum',
60
+ :'headers' => :'Hash<String, Object>'
57
61
  }
58
62
  end
59
63
 
60
64
  # List of attributes with nullable: true
61
65
  def self.openapi_nullable
62
66
  Set.new([
67
+ :'response',
63
68
  ])
64
69
  end
65
70
 
@@ -91,9 +96,7 @@ module MergeCRMClient
91
96
  end
92
97
 
93
98
  if attributes.key?(:'response')
94
- if (value = attributes[:'response']).is_a?(Hash)
95
- self.response = value
96
- end
99
+ self.response = attributes[:'response']
97
100
  end
98
101
 
99
102
  if attributes.key?(:'response_headers')
@@ -102,6 +105,10 @@ module MergeCRMClient
102
105
  end
103
106
  end
104
107
 
108
+ if attributes.key?(:'response_type')
109
+ self.response_type = attributes[:'response_type']
110
+ end
111
+
105
112
  if attributes.key?(:'headers')
106
113
  if (value = attributes[:'headers']).is_a?(Hash)
107
114
  self.headers = value
@@ -125,10 +132,6 @@ module MergeCRMClient
125
132
  invalid_properties.push('invalid value for "status", status cannot be nil.')
126
133
  end
127
134
 
128
- if @response.nil?
129
- invalid_properties.push('invalid value for "response", response cannot be nil.')
130
- end
131
-
132
135
  invalid_properties
133
136
  end
134
137
 
@@ -138,7 +141,6 @@ module MergeCRMClient
138
141
  return false if @method.nil?
139
142
  return false if @path.nil?
140
143
  return false if @status.nil?
141
- return false if @response.nil?
142
144
  true
143
145
  end
144
146
 
@@ -152,6 +154,7 @@ module MergeCRMClient
152
154
  status == o.status &&
153
155
  response == o.response &&
154
156
  response_headers == o.response_headers &&
157
+ response_type == o.response_type &&
155
158
  headers == o.headers
156
159
  end
157
160
 
@@ -164,7 +167,7 @@ module MergeCRMClient
164
167
  # Calculates hash code according to all attributes.
165
168
  # @return [Integer] Hash code
166
169
  def hash
167
- [method, path, status, response, response_headers, headers].hash
170
+ [method, path, status, response, response_headers, response_type, headers].hash
168
171
  end
169
172
 
170
173
  # Builds the object from hash
@@ -0,0 +1,45 @@
1
+ =begin
2
+ #Merge CRM API
3
+
4
+ #The unified API for building rich integrations with multiple CRM platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeCRMClient
17
+ class ResponseTypeEnum
18
+ JSON = "JSON".freeze
19
+ BASE64_GZIP = "BASE64_GZIP".freeze
20
+
21
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
22
+
23
+ attr_accessor :value
24
+ attr_accessor :raw_value
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def build_from_hash(value)
30
+ @raw_value = value
31
+ if ["JSON", "BASE64_GZIP", ].include? value
32
+ @value = value
33
+ else
34
+ @value = MERGE_NONSTANDARD_VALUE
35
+ end
36
+
37
+ self
38
+ end
39
+
40
+ def self.build_from_hash(value)
41
+ IssueStatusEnum.new.build_from_hash(value)
42
+ end
43
+ end
44
+
45
+ end
@@ -115,14 +115,6 @@ module MergeCRMClient
115
115
  invalid_properties.push('invalid value for "model_id", model_id cannot be nil.')
116
116
  end
117
117
 
118
- if @last_sync_start.nil?
119
- invalid_properties.push('invalid value for "last_sync_start", last_sync_start cannot be nil.')
120
- end
121
-
122
- if @next_sync_start.nil?
123
- invalid_properties.push('invalid value for "next_sync_start", next_sync_start cannot be nil.')
124
- end
125
-
126
118
  if @status.nil?
127
119
  invalid_properties.push('invalid value for "status", status cannot be nil.')
128
120
  end
@@ -139,8 +131,6 @@ module MergeCRMClient
139
131
  def valid?
140
132
  return false if @model_name.nil?
141
133
  return false if @model_id.nil?
142
- return false if @last_sync_start.nil?
143
- return false if @next_sync_start.nil?
144
134
  return false if @status.nil?
145
135
  return false if @is_initial_sync.nil?
146
136
  true
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.1.1
11
11
  =end
12
12
 
13
13
  module MergeCRMClient
14
- VERSION = '1.0.0'
14
+ VERSION = '1.0.1'
15
15
  end
@@ -88,6 +88,8 @@ require 'merge_crm_client/models/paginated_stage_list'
88
88
  require 'merge_crm_client/models/paginated_sync_status_list'
89
89
  require 'merge_crm_client/models/paginated_task_list'
90
90
  require 'merge_crm_client/models/paginated_user_list'
91
+ require 'merge_crm_client/models/patched_opportunity_endpoint_request'
92
+ require 'merge_crm_client/models/patched_opportunity_request'
91
93
  require 'merge_crm_client/models/phone_number'
92
94
  require 'merge_crm_client/models/phone_number_request'
93
95
  require 'merge_crm_client/models/remote_data'
@@ -95,6 +97,7 @@ require 'merge_crm_client/models/remote_key'
95
97
  require 'merge_crm_client/models/remote_key_for_regeneration_request'
96
98
  require 'merge_crm_client/models/remote_response'
97
99
  require 'merge_crm_client/models/request_format_enum'
100
+ require 'merge_crm_client/models/response_type_enum'
98
101
  require 'merge_crm_client/models/stage'
99
102
  require 'merge_crm_client/models/sync_status'
100
103
  require 'merge_crm_client/models/sync_status_status_enum'
@@ -64,19 +64,7 @@ describe 'ContactsApi' do
64
64
  # @return [PaginatedContactList]
65
65
  describe 'contacts_list test' do
66
66
  it 'should work' do
67
- apiKey = "REDACTED"
68
-
69
- acctToken = "REDACTED"
70
-
71
- # Setup authorization
72
- MergeCRMClient.configure do |config|
73
- config.api_key['tokenAuth'] = apiKey
74
- config.api_key_prefix['tokenAuth'] = 'Bearer'
75
- end
76
-
77
- api_instance = MergeCRMClient::ContactsApi.new
78
-
79
- puts api_instance.contacts_list(acctToken)
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
68
  end
81
69
  end
82
70
 
@@ -72,6 +72,18 @@ describe 'OpportunitiesApi' do
72
72
  end
73
73
  end
74
74
 
75
+ # unit tests for opportunities_meta_patch_retrieve
76
+ # Returns metadata for &#x60;Opportunity&#x60; PATCHs.
77
+ # @param x_account_token Token identifying the end user.
78
+ # @param id
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [MetaResponse]
81
+ describe 'opportunities_meta_patch_retrieve test' do
82
+ it 'should work' do
83
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
84
+ end
85
+ end
86
+
75
87
  # unit tests for opportunities_meta_post_retrieve
76
88
  # Returns metadata for &#x60;Opportunity&#x60; POSTs.
77
89
  # @param x_account_token Token identifying the end user.
@@ -83,6 +95,20 @@ describe 'OpportunitiesApi' do
83
95
  end
84
96
  end
85
97
 
98
+ # unit tests for opportunities_partial_update
99
+ # @param x_account_token Token identifying the end user.
100
+ # @param id
101
+ # @param patched_opportunity_endpoint_request
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [Boolean] :is_debug_mode Whether to include debug fields (such as log file links) in the response.
104
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
105
+ # @return [OpportunityResponse]
106
+ describe 'opportunities_partial_update test' do
107
+ it 'should work' do
108
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
109
+ end
110
+ end
111
+
86
112
  # unit tests for opportunities_retrieve
87
113
  # Returns an &#x60;Opportunity&#x60; object with the given &#x60;id&#x60;.
88
114
  # @param x_account_token Token identifying the end user.
@@ -49,6 +49,24 @@ describe MergeCRMClient::ContactRequest do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "addresses"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "email_addresses"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "phone_numbers"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
52
70
  describe 'test attribute "last_activity_at"' do
53
71
  it 'should work' do
54
72
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -24,12 +24,5 @@ describe MergeCRMClient::IssueStatusEnum do
24
24
  it 'should create an instance of IssueStatusEnum' do
25
25
  expect(instance).to be_instance_of(MergeCRMClient::IssueStatusEnum)
26
26
  end
27
-
28
- it 'should allow dynamic value on deserialize helper' do
29
- deserialized = MergeCRMClient::IssueStatusEnum.build_from_hash("DYNAMIC")
30
-
31
- expect(deserialized.value).to be(MergeCRMClient::IssueStatusEnum::MERGE_NONSTANDARD_VALUE)
32
- expect(deserialized.raw_value).to eq("DYNAMIC")
33
- end
34
27
  end
35
28
  end
@@ -0,0 +1,34 @@
1
+ =begin
2
+ #Merge CRM API
3
+
4
+ #The unified API for building rich integrations with multiple CRM platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for MergeCRMClient::PatchedOpportunityEndpointRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MergeCRMClient::PatchedOpportunityEndpointRequest do
21
+ let(:instance) { MergeCRMClient::PatchedOpportunityEndpointRequest.new }
22
+
23
+ describe 'test an instance of PatchedOpportunityEndpointRequest' do
24
+ it 'should create an instance of PatchedOpportunityEndpointRequest' do
25
+ expect(instance).to be_instance_of(MergeCRMClient::PatchedOpportunityEndpointRequest)
26
+ end
27
+ end
28
+ describe 'test attribute "model"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
@@ -0,0 +1,100 @@
1
+ =begin
2
+ #Merge CRM API
3
+
4
+ #The unified API for building rich integrations with multiple CRM platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for MergeCRMClient::PatchedOpportunityRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MergeCRMClient::PatchedOpportunityRequest do
21
+ let(:instance) { MergeCRMClient::PatchedOpportunityRequest.new }
22
+
23
+ describe 'test an instance of PatchedOpportunityRequest' do
24
+ it 'should create an instance of PatchedOpportunityRequest' do
25
+ expect(instance).to be_instance_of(MergeCRMClient::PatchedOpportunityRequest)
26
+ end
27
+ end
28
+ describe 'test attribute "name"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "description"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "amount"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "owner"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "account"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "stage"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "status"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ describe 'test attribute "last_activity_at"' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
+ end
74
+ end
75
+
76
+ describe 'test attribute "close_date"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ end
80
+ end
81
+
82
+ describe 'test attribute "remote_created_at"' do
83
+ it 'should work' do
84
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
85
+ end
86
+ end
87
+
88
+ describe 'test attribute "integration_params"' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
+ end
92
+ end
93
+
94
+ describe 'test attribute "linked_account_params"' do
95
+ it 'should work' do
96
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
97
+ end
98
+ end
99
+
100
+ end
@@ -55,6 +55,12 @@ describe MergeCRMClient::RemoteResponse do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "response_type"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
58
64
  describe 'test attribute "headers"' do
59
65
  it 'should work' do
60
66
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Merge CRM API
3
+
4
+ #The unified API for building rich integrations with multiple CRM platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for MergeCRMClient::ResponseTypeEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MergeCRMClient::ResponseTypeEnum do
21
+ let(:instance) { MergeCRMClient::ResponseTypeEnum.new }
22
+
23
+ describe 'test an instance of ResponseTypeEnum' do
24
+ it 'should create an instance of ResponseTypeEnum' do
25
+ expect(instance).to be_instance_of(MergeCRMClient::ResponseTypeEnum)
26
+ end
27
+ end
28
+ end