merge_accounting_client 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -4
  3. data/docs/Account.md +2 -0
  4. data/docs/BalanceSheet.md +2 -0
  5. data/docs/CashFlowStatement.md +2 -0
  6. data/docs/CategoryTypeEnum.md +15 -0
  7. data/docs/IncomeStatement.md +2 -0
  8. data/docs/JournalEntry.md +2 -0
  9. data/docs/JournalEntryRequest.md +2 -0
  10. data/docs/RemoteResponse.md +3 -1
  11. data/docs/ResponseTypeEnum.md +15 -0
  12. data/docs/SyncStatus.md +2 -2
  13. data/docs/TrackingCategory.md +2 -0
  14. data/lib/merge_accounting_client/api_client.rb +3 -0
  15. data/lib/merge_accounting_client/models/account.rb +11 -1
  16. data/lib/merge_accounting_client/models/balance_sheet.rb +12 -1
  17. data/lib/merge_accounting_client/models/cash_flow_statement.rb +12 -1
  18. data/lib/merge_accounting_client/models/category_type_enum.rb +45 -0
  19. data/lib/merge_accounting_client/models/income_statement.rb +12 -1
  20. data/lib/merge_accounting_client/models/journal_entry.rb +12 -1
  21. data/lib/merge_accounting_client/models/journal_entry_request.rb +12 -1
  22. data/lib/merge_accounting_client/models/remote_data.rb +1 -1
  23. data/lib/merge_accounting_client/models/remote_response.rb +17 -11
  24. data/lib/merge_accounting_client/models/response_type_enum.rb +45 -0
  25. data/lib/merge_accounting_client/models/sync_status.rb +0 -10
  26. data/lib/merge_accounting_client/models/tracking_category.rb +12 -1
  27. data/lib/merge_accounting_client/models/transaction.rb +1 -0
  28. data/lib/merge_accounting_client/models/transaction_line_item.rb +1 -0
  29. data/lib/merge_accounting_client/version.rb +1 -1
  30. data/lib/merge_accounting_client.rb +2 -0
  31. data/spec/models/account_spec.rb +6 -0
  32. data/spec/models/balance_sheet_spec.rb +6 -0
  33. data/spec/models/cash_flow_statement_spec.rb +6 -0
  34. data/spec/models/category_type_enum_spec.rb +28 -0
  35. data/spec/models/income_statement_spec.rb +6 -0
  36. data/spec/models/journal_entry_request_spec.rb +6 -0
  37. data/spec/models/journal_entry_spec.rb +6 -0
  38. data/spec/models/remote_response_spec.rb +6 -0
  39. data/spec/models/response_type_enum_spec.rb +28 -0
  40. data/spec/models/tracking_category_spec.rb +6 -0
  41. metadata +116 -108
@@ -36,7 +36,7 @@ module MergeAccountingClient
36
36
  def self.openapi_types
37
37
  {
38
38
  :'path' => :'String',
39
- :'data' => :'Hash<String, Object>'
39
+ :'data' => :'Hash<String, AnyType>'
40
40
  }
41
41
  end
42
42
 
@@ -26,6 +26,8 @@ module MergeAccountingClient
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 MergeAccountingClient
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,8 +54,9 @@ module MergeAccountingClient
51
54
  :'method' => :'String',
52
55
  :'path' => :'String',
53
56
  :'status' => :'Integer',
54
- :'response' => :'Hash<String, Object>',
55
- :'response_headers' => :'Hash<String, Object>',
57
+ :'response' => :'AnyType',
58
+ :'response_headers' => :'Hash<String, AnyType>',
59
+ :'response_type' => :'ResponseTypeEnum',
56
60
  :'headers' => :'Hash<String, AnyType>'
57
61
  }
58
62
  end
@@ -60,6 +64,7 @@ module MergeAccountingClient
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 MergeAccountingClient
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 MergeAccountingClient
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 MergeAccountingClient
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 MergeAccountingClient
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 MergeAccountingClient
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 MergeAccountingClient
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
@@ -232,6 +235,9 @@ module MergeAccountingClient
232
235
  hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
233
236
  end
234
237
  end
238
+ when :AnyType
239
+ # Return AnyType response as Object directly
240
+ value
235
241
  else # model
236
242
  # models (e.g. Pet) or oneOf
237
243
  klass = MergeAccountingClient.const_get(type)
@@ -0,0 +1,45 @@
1
+ =begin
2
+ #Merge Accounting API
3
+
4
+ #The unified API for building rich integrations with multiple Accounting & Finance 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 MergeAccountingClient
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 MergeAccountingClient
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 MergeAccountingClient
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
@@ -29,6 +29,9 @@ module MergeAccountingClient
29
29
  # The tracking category's status.
30
30
  attr_accessor :status
31
31
 
32
+ # The tracking category’s type.
33
+ attr_accessor :category_type
34
+
32
35
  # Indicates whether or not this object has been deleted by third party webhooks.
33
36
  attr_accessor :remote_was_deleted
34
37
 
@@ -40,6 +43,7 @@ module MergeAccountingClient
40
43
  :'remote_data' => :'remote_data',
41
44
  :'name' => :'name',
42
45
  :'status' => :'status',
46
+ :'category_type' => :'category_type',
43
47
  :'remote_was_deleted' => :'remote_was_deleted'
44
48
  }
45
49
  end
@@ -57,6 +61,7 @@ module MergeAccountingClient
57
61
  :'remote_data' => :'Array<RemoteData>',
58
62
  :'name' => :'String',
59
63
  :'status' => :'Status7d1Enum',
64
+ :'category_type' => :'CategoryTypeEnum',
60
65
  :'remote_was_deleted' => :'Boolean'
61
66
  }
62
67
  end
@@ -68,6 +73,7 @@ module MergeAccountingClient
68
73
  :'remote_data',
69
74
  :'name',
70
75
  :'status',
76
+ :'category_type',
71
77
  ])
72
78
  end
73
79
 
@@ -108,6 +114,10 @@ module MergeAccountingClient
108
114
  self.status = attributes[:'status']
109
115
  end
110
116
 
117
+ if attributes.key?(:'category_type')
118
+ self.category_type = attributes[:'category_type']
119
+ end
120
+
111
121
  if attributes.key?(:'remote_was_deleted')
112
122
  self.remote_was_deleted = attributes[:'remote_was_deleted']
113
123
  end
@@ -136,6 +146,7 @@ module MergeAccountingClient
136
146
  remote_data == o.remote_data &&
137
147
  name == o.name &&
138
148
  status == o.status &&
149
+ category_type == o.category_type &&
139
150
  remote_was_deleted == o.remote_was_deleted
140
151
  end
141
152
 
@@ -148,7 +159,7 @@ module MergeAccountingClient
148
159
  # Calculates hash code according to all attributes.
149
160
  # @return [Integer] Hash code
150
161
  def hash
151
- [id, remote_id, remote_data, name, status, remote_was_deleted].hash
162
+ [id, remote_id, remote_data, name, status, category_type, remote_was_deleted].hash
152
163
  end
153
164
 
154
165
  # Builds the object from hash
@@ -14,6 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
+ # # The Transaction Object ### Description The `Transaction` object is used to represent a company's transactions. ### Usage Example Fetch from the `GET Transaction` endpoint and view a company's transactions.
17
18
  class Transaction
18
19
  attr_accessor :id
19
20
 
@@ -14,6 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
+ # # The TransactionLineItem Object ### Description The `TransactionLineItem` object is used to represent a transaction's line items. ### Usage Example Fetch from the `GET TransactionLineItem` endpoint and view the transaction's line items.
17
18
  class TransactionLineItem
18
19
  # A memo attached to the line item.
19
20
  attr_accessor :memo
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.1.1
11
11
  =end
12
12
 
13
13
  module MergeAccountingClient
14
- VERSION = '1.0.2'
14
+ VERSION = '1.0.3'
15
15
  end
@@ -34,6 +34,7 @@ require 'merge_accounting_client/models/balance_sheet'
34
34
  require 'merge_accounting_client/models/cash_flow_statement'
35
35
  require 'merge_accounting_client/models/categories_enum'
36
36
  require 'merge_accounting_client/models/category_enum'
37
+ require 'merge_accounting_client/models/category_type_enum'
37
38
  require 'merge_accounting_client/models/classification_enum'
38
39
  require 'merge_accounting_client/models/company_info'
39
40
  require 'merge_accounting_client/models/contact'
@@ -105,6 +106,7 @@ require 'merge_accounting_client/models/remote_key_for_regeneration_request'
105
106
  require 'merge_accounting_client/models/remote_response'
106
107
  require 'merge_accounting_client/models/report_item'
107
108
  require 'merge_accounting_client/models/request_format_enum'
109
+ require 'merge_accounting_client/models/response_type_enum'
108
110
  require 'merge_accounting_client/models/state_enum'
109
111
  require 'merge_accounting_client/models/status7d1_enum'
110
112
  require 'merge_accounting_client/models/sync_status'
@@ -91,6 +91,12 @@ describe MergeAccountingClient::Account do
91
91
  end
92
92
  end
93
93
 
94
+ describe 'test attribute "parent_account"' 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
+
94
100
  describe 'test attribute "remote_was_deleted"' do
95
101
  it 'should work' do
96
102
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -49,6 +49,12 @@ describe MergeAccountingClient::BalanceSheet do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "currency"' 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
+
52
58
  describe 'test attribute "date"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -49,6 +49,12 @@ describe MergeAccountingClient::CashFlowStatement do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "currency"' 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
+
52
58
  describe 'test attribute "start_period"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Merge Accounting API
3
+
4
+ #The unified API for building rich integrations with multiple Accounting & Finance 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 MergeAccountingClient::CategoryTypeEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MergeAccountingClient::CategoryTypeEnum do
21
+ let(:instance) { MergeAccountingClient::CategoryTypeEnum.new }
22
+
23
+ describe 'test an instance of CategoryTypeEnum' do
24
+ it 'should create an instance of CategoryTypeEnum' do
25
+ expect(instance).to be_instance_of(MergeAccountingClient::CategoryTypeEnum)
26
+ end
27
+ end
28
+ end
@@ -49,6 +49,12 @@ describe MergeAccountingClient::IncomeStatement do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "currency"' 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
+
52
58
  describe 'test attribute "start_period"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -43,6 +43,12 @@ describe MergeAccountingClient::JournalEntryRequest do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "remote_updated_at"' 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
+
46
52
  describe 'test attribute "payments"' do
47
53
  it 'should work' do
48
54
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -55,6 +55,12 @@ describe MergeAccountingClient::JournalEntry do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "remote_updated_at"' 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 "payments"' do
59
65
  it 'should work' do
60
66
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -55,6 +55,12 @@ describe MergeAccountingClient::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 Accounting API
3
+
4
+ #The unified API for building rich integrations with multiple Accounting & Finance 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 MergeAccountingClient::ResponseTypeEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MergeAccountingClient::ResponseTypeEnum do
21
+ let(:instance) { MergeAccountingClient::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(MergeAccountingClient::ResponseTypeEnum)
26
+ end
27
+ end
28
+ end
@@ -55,6 +55,12 @@ describe MergeAccountingClient::TrackingCategory do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "category_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 "remote_was_deleted"' do
59
65
  it 'should work' do
60
66
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers