storecove 1.0.9 → 1.0.10
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 +4 -4
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/lib/storecove.rb +20 -1
- data/lib/storecove/api/invoice_submissions_api.rb +9 -4
- data/lib/storecove/api/legal_entities_api.rb +248 -0
- data/lib/storecove/api/peppol_identifiers_api.rb +156 -0
- data/lib/storecove/api/purchase_invoices_api.rb +133 -0
- data/lib/storecove/api/shop_account_requests_api.rb +24 -11
- data/lib/storecove/api/shop_accounts_api.rb +25 -12
- data/lib/storecove/api/shops_api.rb +2 -1
- data/lib/storecove/api_client.rb +39 -26
- data/lib/storecove/api_error.rb +1 -0
- data/lib/storecove/configuration.rb +7 -0
- data/lib/storecove/models/accounting_cost_code.rb +2 -1
- data/lib/storecove/models/accounting_customer_party.rb +2 -1
- data/lib/storecove/models/accounting_details.rb +219 -0
- data/lib/storecove/models/accounting_details_1.rb +219 -0
- data/lib/storecove/models/address.rb +2 -1
- data/lib/storecove/models/contact.rb +2 -6
- data/lib/storecove/models/country.rb +10 -0
- data/lib/storecove/models/currency_code.rb +10 -0
- data/lib/storecove/models/error_model.rb +2 -1
- data/lib/storecove/models/invoice.rb +16 -3
- data/lib/storecove/models/invoice_line.rb +251 -6
- data/lib/storecove/models/invoice_recipient.rb +24 -11
- data/lib/storecove/models/invoice_recipient_preflight.rb +21 -19
- data/lib/storecove/models/invoice_submission.rb +20 -9
- data/lib/storecove/models/invoice_submission_result.rb +2 -1
- data/lib/storecove/models/legal_entity.rb +164 -25
- data/lib/storecove/models/legal_entity_create.rb +417 -0
- data/lib/storecove/models/legal_entity_identifier.rb +2 -1
- data/lib/storecove/models/legal_entity_shop.rb +253 -0
- data/lib/storecove/models/legal_entity_update.rb +380 -0
- data/lib/storecove/models/logos.rb +2 -1
- data/lib/storecove/models/party.rb +7 -1
- data/lib/storecove/models/payment_means.rb +199 -0
- data/lib/storecove/models/peppol_identifier.rb +284 -0
- data/lib/storecove/models/peppol_identifier_create.rb +308 -0
- data/lib/storecove/models/preflight_invoice_recipient_result.rb +2 -1
- data/lib/storecove/models/public_identifier.rb +3 -2
- data/lib/storecove/models/public_identifiers.rb +2 -1
- data/lib/storecove/models/purchase_invoice.rb +463 -0
- data/lib/storecove/models/purchase_invoice_invoice_line.rb +247 -0
- data/lib/storecove/models/purchase_invoice_sender.rb +280 -0
- data/lib/storecove/models/purchase_invoice_sender_billing_contact.rb +209 -0
- data/lib/storecove/models/purchase_invoice_ubl.rb +209 -0
- data/lib/storecove/models/shop.rb +3 -2
- data/lib/storecove/models/shop_account_input.rb +2 -1
- data/lib/storecove/models/shop_account_request_input.rb +2 -1
- data/lib/storecove/models/shop_account_request_result.rb +2 -1
- data/lib/storecove/models/shop_account_request_update.rb +2 -1
- data/lib/storecove/models/shop_account_result.rb +2 -1
- data/lib/storecove/models/shop_account_update.rb +2 -1
- data/lib/storecove/models/tax.rb +2 -1
- data/lib/storecove/models/vat_details.rb +209 -0
- data/lib/storecove/models/widget_identification.rb +228 -0
- data/lib/storecove/version.rb +2 -1
- data/spec/api/invoice_submissions_api_spec.rb +9 -20
- data/spec/api/legal_entities_api_spec.rb +84 -0
- data/spec/api/peppol_identifiers_api_spec.rb +63 -0
- data/spec/api/purchase_invoices_api_spec.rb +59 -0
- data/spec/api/shop_account_requests_api_spec.rb +30 -41
- data/spec/api/shop_accounts_api_spec.rb +34 -45
- data/spec/api/shops_api_spec.rb +6 -17
- data/spec/api_client_spec.rb +2 -13
- data/spec/configuration_spec.rb +2 -13
- data/spec/models/accounting_cost_code_spec.rb +3 -14
- data/spec/models/accounting_customer_party_spec.rb +3 -14
- data/spec/models/accounting_details_1_spec.rb +60 -0
- data/spec/models/accounting_details_spec.rb +60 -0
- data/spec/models/{party_address_spec.rb → address_spec.rb} +8 -19
- data/spec/models/{party_contact_spec.rb → contact_spec.rb} +8 -19
- data/spec/models/country_spec.rb +3 -14
- data/spec/models/currency_code_spec.rb +3 -14
- data/spec/models/error_model_spec.rb +3 -14
- data/spec/models/invoice_line_spec.rb +69 -14
- data/spec/models/invoice_recipient_preflight_spec.rb +10 -15
- data/spec/models/invoice_recipient_spec.rb +15 -14
- data/spec/models/{invoice_submission_invoice_spec.rb → invoice_spec.rb} +20 -19
- data/spec/models/invoice_submission_result_spec.rb +4 -15
- data/spec/models/invoice_submission_spec.rb +4 -15
- data/spec/models/legal_entity_create_spec.rb +78 -0
- data/spec/models/legal_entity_identifier_spec.rb +3 -14
- data/spec/models/legal_entity_shop_spec.rb +84 -0
- data/spec/models/legal_entity_spec.rb +7 -18
- data/spec/models/legal_entity_update_spec.rb +78 -0
- data/spec/models/logos_spec.rb +3 -14
- data/spec/models/party_spec.rb +3 -14
- data/spec/models/payment_means_spec.rb +48 -0
- data/spec/models/peppol_identifier_create_spec.rb +54 -0
- data/spec/models/peppol_identifier_spec.rb +54 -0
- data/spec/models/preflight_invoice_recipient_result_spec.rb +3 -14
- data/spec/models/public_identifier_spec.rb +3 -14
- data/spec/models/public_identifiers_spec.rb +3 -14
- data/spec/models/purchase_invoice_invoice_line_spec.rb +78 -0
- data/spec/models/purchase_invoice_sender_billing_contact_spec.rb +54 -0
- data/spec/models/purchase_invoice_sender_spec.rb +96 -0
- data/spec/models/purchase_invoice_spec.rb +188 -0
- data/spec/models/purchase_invoice_ubl_spec.rb +54 -0
- data/spec/models/shop_account_input_spec.rb +3 -14
- data/spec/models/shop_account_request_input_spec.rb +3 -14
- data/spec/models/{shop_account_request_spec.rb → shop_account_request_result_spec.rb} +8 -19
- data/spec/models/shop_account_request_update_spec.rb +3 -14
- data/spec/models/shop_account_result_spec.rb +3 -14
- data/spec/models/shop_account_update_spec.rb +3 -14
- data/spec/models/shop_spec.rb +3 -14
- data/spec/models/{invoice_line_tax_spec.rb → tax_spec.rb} +8 -19
- data/spec/models/vat_details_spec.rb +54 -0
- data/spec/models/widget_identification_spec.rb +48 -0
- data/spec/spec_helper.rb +2 -13
- data/storecove.gemspec +10 -19
- metadata +83 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f37fb7a77eb76d7482d1016241af755820437099
|
4
|
+
data.tar.gz: 82f63c040625a1a3edd3ab78e57f0e77b5c265ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a771d345ef5d5343b58cbaadced22ed25db8d9c662f7224d8ccd5533a2f755861347753fedf7f36f2c6aac0c2b7c15124403a533cd4990aae14e9b04abe38f87
|
7
|
+
data.tar.gz: 17fc9ca9b7a6cc7e3709a6f5d8bd30bee878d7dad72c66f23ed6b3565bf4bce36e99bca6457e46c7601f91a20a2d70e7ffb5cfa8457d5574a4984432744868e1
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
storecove (1.0.10)
|
5
|
+
json (~> 2.1, >= 2.1.0)
|
6
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ZenTest (4.11.1)
|
12
|
+
addressable (2.5.2)
|
13
|
+
public_suffix (>= 2.0.2, < 4.0)
|
14
|
+
autotest (4.4.6)
|
15
|
+
ZenTest (>= 4.4.1)
|
16
|
+
autotest-fsevent (0.2.13)
|
17
|
+
sys-uname
|
18
|
+
autotest-growl (0.2.16)
|
19
|
+
autotest-rails-pure (4.1.2)
|
20
|
+
crack (0.4.3)
|
21
|
+
safe_yaml (~> 1.0.0)
|
22
|
+
diff-lcs (1.3)
|
23
|
+
ethon (0.11.0)
|
24
|
+
ffi (>= 1.3.0)
|
25
|
+
ffi (1.9.23)
|
26
|
+
hashdiff (0.3.7)
|
27
|
+
json (2.1.0)
|
28
|
+
public_suffix (3.0.2)
|
29
|
+
rake (12.0.0)
|
30
|
+
rspec (3.7.0)
|
31
|
+
rspec-core (~> 3.7.0)
|
32
|
+
rspec-expectations (~> 3.7.0)
|
33
|
+
rspec-mocks (~> 3.7.0)
|
34
|
+
rspec-core (3.7.1)
|
35
|
+
rspec-support (~> 3.7.0)
|
36
|
+
rspec-expectations (3.7.0)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.7.0)
|
39
|
+
rspec-mocks (3.7.0)
|
40
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
+
rspec-support (~> 3.7.0)
|
42
|
+
rspec-support (3.7.1)
|
43
|
+
safe_yaml (1.0.4)
|
44
|
+
sys-uname (1.0.3)
|
45
|
+
ffi (>= 1.0.0)
|
46
|
+
typhoeus (1.3.0)
|
47
|
+
ethon (>= 0.9.0)
|
48
|
+
vcr (3.0.3)
|
49
|
+
webmock (1.24.6)
|
50
|
+
addressable (>= 2.3.6)
|
51
|
+
crack (>= 0.3.2)
|
52
|
+
hashdiff
|
53
|
+
|
54
|
+
PLATFORMS
|
55
|
+
ruby
|
56
|
+
|
57
|
+
DEPENDENCIES
|
58
|
+
autotest (~> 4.4, >= 4.4.6)
|
59
|
+
autotest-fsevent (~> 0.2, >= 0.2.12)
|
60
|
+
autotest-growl (~> 0.2, >= 0.2.16)
|
61
|
+
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
62
|
+
rake (~> 12.0.0)
|
63
|
+
rspec (~> 3.6, >= 3.6.0)
|
64
|
+
storecove!
|
65
|
+
vcr (~> 3.0, >= 3.0.1)
|
66
|
+
webmock (~> 1.24, >= 1.24.3)
|
67
|
+
|
68
|
+
BUNDLED WITH
|
69
|
+
1.16.0
|
data/lib/storecove.rb
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -18,6 +19,8 @@ require 'storecove/configuration'
|
|
18
19
|
# Models
|
19
20
|
require 'storecove/models/accounting_cost_code'
|
20
21
|
require 'storecove/models/accounting_customer_party'
|
22
|
+
require 'storecove/models/accounting_details'
|
23
|
+
require 'storecove/models/accounting_details_1'
|
21
24
|
require 'storecove/models/address'
|
22
25
|
require 'storecove/models/contact'
|
23
26
|
require 'storecove/models/country'
|
@@ -29,13 +32,23 @@ require 'storecove/models/invoice_recipient'
|
|
29
32
|
require 'storecove/models/invoice_recipient_preflight'
|
30
33
|
require 'storecove/models/invoice_submission'
|
31
34
|
require 'storecove/models/invoice_submission_result'
|
32
|
-
require 'storecove/models/
|
35
|
+
require 'storecove/models/legal_entity_create'
|
33
36
|
require 'storecove/models/legal_entity_identifier'
|
37
|
+
require 'storecove/models/legal_entity_shop'
|
38
|
+
require 'storecove/models/legal_entity_update'
|
34
39
|
require 'storecove/models/logos'
|
35
40
|
require 'storecove/models/party'
|
41
|
+
require 'storecove/models/payment_means'
|
42
|
+
require 'storecove/models/peppol_identifier'
|
43
|
+
require 'storecove/models/peppol_identifier_create'
|
36
44
|
require 'storecove/models/preflight_invoice_recipient_result'
|
37
45
|
require 'storecove/models/public_identifier'
|
38
46
|
require 'storecove/models/public_identifiers'
|
47
|
+
require 'storecove/models/purchase_invoice'
|
48
|
+
require 'storecove/models/purchase_invoice_invoice_line'
|
49
|
+
require 'storecove/models/purchase_invoice_sender'
|
50
|
+
require 'storecove/models/purchase_invoice_sender_billing_contact'
|
51
|
+
require 'storecove/models/purchase_invoice_ubl'
|
39
52
|
require 'storecove/models/shop'
|
40
53
|
require 'storecove/models/shop_account_input'
|
41
54
|
require 'storecove/models/shop_account_request_input'
|
@@ -44,9 +57,15 @@ require 'storecove/models/shop_account_request_update'
|
|
44
57
|
require 'storecove/models/shop_account_result'
|
45
58
|
require 'storecove/models/shop_account_update'
|
46
59
|
require 'storecove/models/tax'
|
60
|
+
require 'storecove/models/vat_details'
|
61
|
+
require 'storecove/models/widget_identification'
|
62
|
+
require 'storecove/models/legal_entity'
|
47
63
|
|
48
64
|
# APIs
|
49
65
|
require 'storecove/api/invoice_submissions_api'
|
66
|
+
require 'storecove/api/legal_entities_api'
|
67
|
+
require 'storecove/api/peppol_identifiers_api'
|
68
|
+
require 'storecove/api/purchase_invoices_api'
|
50
69
|
require 'storecove/api/shop_account_requests_api'
|
51
70
|
require 'storecove/api/shop_accounts_api'
|
52
71
|
require 'storecove/api/shops_api'
|
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -39,9 +40,11 @@ module StorecoveApi
|
|
39
40
|
@api_client.config.logger.debug "Calling API: InvoiceSubmissionsApi.create_invoice_submission ..."
|
40
41
|
end
|
41
42
|
# verify the required parameter 'invoice_submission' is set
|
42
|
-
|
43
|
+
if @api_client.config.client_side_validation && invoice_submission.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'invoice_submission' when calling InvoiceSubmissionsApi.create_invoice_submission"
|
45
|
+
end
|
43
46
|
# resource path
|
44
|
-
local_var_path = "/invoice_submissions"
|
47
|
+
local_var_path = "/invoice_submissions"
|
45
48
|
|
46
49
|
# query parameters
|
47
50
|
query_params = {}
|
@@ -92,9 +95,11 @@ module StorecoveApi
|
|
92
95
|
@api_client.config.logger.debug "Calling API: InvoiceSubmissionsApi.preflight_invoice_recipient ..."
|
93
96
|
end
|
94
97
|
# verify the required parameter 'invoice_recipient_preflight' is set
|
95
|
-
|
98
|
+
if @api_client.config.client_side_validation && invoice_recipient_preflight.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'invoice_recipient_preflight' when calling InvoiceSubmissionsApi.preflight_invoice_recipient"
|
100
|
+
end
|
96
101
|
# resource path
|
97
|
-
local_var_path = "/invoice_submissions/preflight"
|
102
|
+
local_var_path = "/invoice_submissions/preflight"
|
98
103
|
|
99
104
|
# query parameters
|
100
105
|
query_params = {}
|
@@ -0,0 +1,248 @@
|
|
1
|
+
=begin
|
2
|
+
#Storecove API
|
3
|
+
|
4
|
+
#Storecove API
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.1
|
7
|
+
Contact: apisupport@storecove.nl
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module StorecoveApi
|
16
|
+
class LegalEntitiesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a new LegalEntity
|
24
|
+
# Create a new LegalEntity.
|
25
|
+
# @param legal_entity LegalEntity to create
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [LegalEntity]
|
28
|
+
def create_legal_entity(legal_entity, opts = {})
|
29
|
+
data, _status_code, _headers = create_legal_entity_with_http_info(legal_entity, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new LegalEntity
|
34
|
+
# Create a new LegalEntity.
|
35
|
+
# @param legal_entity LegalEntity to create
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(LegalEntity, Fixnum, Hash)>] LegalEntity data, response status code and response headers
|
38
|
+
def create_legal_entity_with_http_info(legal_entity, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: LegalEntitiesApi.create_legal_entity ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'legal_entity' is set
|
43
|
+
if @api_client.config.client_side_validation && legal_entity.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'legal_entity' when calling LegalEntitiesApi.create_legal_entity"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/legal_entities"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = @api_client.object_to_http_body(legal_entity)
|
64
|
+
auth_names = ['Bearer']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'LegalEntity')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: LegalEntitiesApi#create_legal_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Delete LegalEntity
|
79
|
+
# Delete a specific LegalEntity.
|
80
|
+
# @param id legal_entity id
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @return [nil]
|
83
|
+
def delete_legal_entity(id, opts = {})
|
84
|
+
delete_legal_entity_with_http_info(id, opts)
|
85
|
+
return nil
|
86
|
+
end
|
87
|
+
|
88
|
+
# Delete LegalEntity
|
89
|
+
# Delete a specific LegalEntity.
|
90
|
+
# @param id legal_entity id
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
93
|
+
def delete_legal_entity_with_http_info(id, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "Calling API: LegalEntitiesApi.delete_legal_entity ..."
|
96
|
+
end
|
97
|
+
# verify the required parameter 'id' is set
|
98
|
+
if @api_client.config.client_side_validation && id.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LegalEntitiesApi.delete_legal_entity"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = "/legal_entities/{id}".sub('{' + 'id' + '}', id.to_s)
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = nil
|
119
|
+
auth_names = ['Bearer']
|
120
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names)
|
126
|
+
if @api_client.config.debugging
|
127
|
+
@api_client.config.logger.debug "API called: LegalEntitiesApi#delete_legal_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
128
|
+
end
|
129
|
+
return data, status_code, headers
|
130
|
+
end
|
131
|
+
|
132
|
+
# Get LegalEntity
|
133
|
+
# Get a specific LegalEntity.
|
134
|
+
# @param id legal_entity id
|
135
|
+
# @param [Hash] opts the optional parameters
|
136
|
+
# @return [LegalEntity]
|
137
|
+
def get_legal_entity(id, opts = {})
|
138
|
+
data, _status_code, _headers = get_legal_entity_with_http_info(id, opts)
|
139
|
+
return data
|
140
|
+
end
|
141
|
+
|
142
|
+
# Get LegalEntity
|
143
|
+
# Get a specific LegalEntity.
|
144
|
+
# @param id legal_entity id
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @return [Array<(LegalEntity, Fixnum, Hash)>] LegalEntity data, response status code and response headers
|
147
|
+
def get_legal_entity_with_http_info(id, opts = {})
|
148
|
+
if @api_client.config.debugging
|
149
|
+
@api_client.config.logger.debug "Calling API: LegalEntitiesApi.get_legal_entity ..."
|
150
|
+
end
|
151
|
+
# verify the required parameter 'id' is set
|
152
|
+
if @api_client.config.client_side_validation && id.nil?
|
153
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LegalEntitiesApi.get_legal_entity"
|
154
|
+
end
|
155
|
+
# resource path
|
156
|
+
local_var_path = "/legal_entities/{id}".sub('{' + 'id' + '}', id.to_s)
|
157
|
+
|
158
|
+
# query parameters
|
159
|
+
query_params = {}
|
160
|
+
|
161
|
+
# header parameters
|
162
|
+
header_params = {}
|
163
|
+
# HTTP header 'Accept' (if needed)
|
164
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
165
|
+
# HTTP header 'Content-Type'
|
166
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
167
|
+
|
168
|
+
# form parameters
|
169
|
+
form_params = {}
|
170
|
+
|
171
|
+
# http body (model)
|
172
|
+
post_body = nil
|
173
|
+
auth_names = ['Bearer']
|
174
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
175
|
+
:header_params => header_params,
|
176
|
+
:query_params => query_params,
|
177
|
+
:form_params => form_params,
|
178
|
+
:body => post_body,
|
179
|
+
:auth_names => auth_names,
|
180
|
+
:return_type => 'LegalEntity')
|
181
|
+
if @api_client.config.debugging
|
182
|
+
@api_client.config.logger.debug "API called: LegalEntitiesApi#get_legal_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
183
|
+
end
|
184
|
+
return data, status_code, headers
|
185
|
+
end
|
186
|
+
|
187
|
+
# Update LegalEntity
|
188
|
+
# Update a specific LegalEntity.
|
189
|
+
# @param id legal_entity id
|
190
|
+
# @param legal_entity LegalEntity updates
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @return [LegalEntity]
|
193
|
+
def update_legal_entity(id, legal_entity, opts = {})
|
194
|
+
data, _status_code, _headers = update_legal_entity_with_http_info(id, legal_entity, opts)
|
195
|
+
return data
|
196
|
+
end
|
197
|
+
|
198
|
+
# Update LegalEntity
|
199
|
+
# Update a specific LegalEntity.
|
200
|
+
# @param id legal_entity id
|
201
|
+
# @param legal_entity LegalEntity updates
|
202
|
+
# @param [Hash] opts the optional parameters
|
203
|
+
# @return [Array<(LegalEntity, Fixnum, Hash)>] LegalEntity data, response status code and response headers
|
204
|
+
def update_legal_entity_with_http_info(id, legal_entity, opts = {})
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "Calling API: LegalEntitiesApi.update_legal_entity ..."
|
207
|
+
end
|
208
|
+
# verify the required parameter 'id' is set
|
209
|
+
if @api_client.config.client_side_validation && id.nil?
|
210
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LegalEntitiesApi.update_legal_entity"
|
211
|
+
end
|
212
|
+
# verify the required parameter 'legal_entity' is set
|
213
|
+
if @api_client.config.client_side_validation && legal_entity.nil?
|
214
|
+
fail ArgumentError, "Missing the required parameter 'legal_entity' when calling LegalEntitiesApi.update_legal_entity"
|
215
|
+
end
|
216
|
+
# resource path
|
217
|
+
local_var_path = "/legal_entities/{id}".sub('{' + 'id' + '}', id.to_s)
|
218
|
+
|
219
|
+
# query parameters
|
220
|
+
query_params = {}
|
221
|
+
|
222
|
+
# header parameters
|
223
|
+
header_params = {}
|
224
|
+
# HTTP header 'Accept' (if needed)
|
225
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
226
|
+
# HTTP header 'Content-Type'
|
227
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
228
|
+
|
229
|
+
# form parameters
|
230
|
+
form_params = {}
|
231
|
+
|
232
|
+
# http body (model)
|
233
|
+
post_body = @api_client.object_to_http_body(legal_entity)
|
234
|
+
auth_names = ['Bearer']
|
235
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
236
|
+
:header_params => header_params,
|
237
|
+
:query_params => query_params,
|
238
|
+
:form_params => form_params,
|
239
|
+
:body => post_body,
|
240
|
+
:auth_names => auth_names,
|
241
|
+
:return_type => 'LegalEntity')
|
242
|
+
if @api_client.config.debugging
|
243
|
+
@api_client.config.logger.debug "API called: LegalEntitiesApi#update_legal_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
244
|
+
end
|
245
|
+
return data, status_code, headers
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
@@ -0,0 +1,156 @@
|
|
1
|
+
=begin
|
2
|
+
#Storecove API
|
3
|
+
|
4
|
+
#Storecove API
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.1
|
7
|
+
Contact: apisupport@storecove.nl
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module StorecoveApi
|
16
|
+
class PeppolIdentifiersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a new PeppolIdentifier
|
24
|
+
# Create a new PeppolIdentifier.
|
25
|
+
# @param legal_entity_id The id of the LegalEntity for which to create the PeppolIdentifier
|
26
|
+
# @param peppol_identifier PeppolIdentifier to create
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [PeppolIdentifier]
|
29
|
+
def create_peppol_identifier(legal_entity_id, peppol_identifier, opts = {})
|
30
|
+
data, _status_code, _headers = create_peppol_identifier_with_http_info(legal_entity_id, peppol_identifier, opts)
|
31
|
+
return data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a new PeppolIdentifier
|
35
|
+
# Create a new PeppolIdentifier.
|
36
|
+
# @param legal_entity_id The id of the LegalEntity for which to create the PeppolIdentifier
|
37
|
+
# @param peppol_identifier PeppolIdentifier to create
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(PeppolIdentifier, Fixnum, Hash)>] PeppolIdentifier data, response status code and response headers
|
40
|
+
def create_peppol_identifier_with_http_info(legal_entity_id, peppol_identifier, opts = {})
|
41
|
+
if @api_client.config.debugging
|
42
|
+
@api_client.config.logger.debug "Calling API: PeppolIdentifiersApi.create_peppol_identifier ..."
|
43
|
+
end
|
44
|
+
# verify the required parameter 'legal_entity_id' is set
|
45
|
+
if @api_client.config.client_side_validation && legal_entity_id.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'legal_entity_id' when calling PeppolIdentifiersApi.create_peppol_identifier"
|
47
|
+
end
|
48
|
+
# verify the required parameter 'peppol_identifier' is set
|
49
|
+
if @api_client.config.client_side_validation && peppol_identifier.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'peppol_identifier' when calling PeppolIdentifiersApi.create_peppol_identifier"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = "/legal_entities/{legal_entity_id}/peppol_identifiers".sub('{' + 'legal_entity_id' + '}', legal_entity_id.to_s)
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
|
+
# HTTP header 'Content-Type'
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = @api_client.object_to_http_body(peppol_identifier)
|
70
|
+
auth_names = ['Bearer']
|
71
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => 'PeppolIdentifier')
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: PeppolIdentifiersApi#create_peppol_identifier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Delete PeppolIdentifier
|
85
|
+
# Delete a PeppolIdentifier.
|
86
|
+
# @param legal_entity_id The id of the LegalEntity this PeppolIdentifier belongs to
|
87
|
+
# @param superscheme The superscheme of the identifier. Should always be \"iso6523-actorid-upis\".
|
88
|
+
# @param scheme PEPPOL identifier scheme id, e.g. \"DE:VAT\". For a full list see <<_company>>.
|
89
|
+
# @param identifier PEPPOL identifier
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [nil]
|
92
|
+
def delete_peppol_identifier(legal_entity_id, superscheme, scheme, identifier, opts = {})
|
93
|
+
delete_peppol_identifier_with_http_info(legal_entity_id, superscheme, scheme, identifier, opts)
|
94
|
+
return nil
|
95
|
+
end
|
96
|
+
|
97
|
+
# Delete PeppolIdentifier
|
98
|
+
# Delete a PeppolIdentifier.
|
99
|
+
# @param legal_entity_id The id of the LegalEntity this PeppolIdentifier belongs to
|
100
|
+
# @param superscheme The superscheme of the identifier. Should always be \"iso6523-actorid-upis\".
|
101
|
+
# @param scheme PEPPOL identifier scheme id, e.g. \"DE:VAT\". For a full list see <<_company>>.
|
102
|
+
# @param identifier PEPPOL identifier
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
105
|
+
def delete_peppol_identifier_with_http_info(legal_entity_id, superscheme, scheme, identifier, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug "Calling API: PeppolIdentifiersApi.delete_peppol_identifier ..."
|
108
|
+
end
|
109
|
+
# verify the required parameter 'legal_entity_id' is set
|
110
|
+
if @api_client.config.client_side_validation && legal_entity_id.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'legal_entity_id' when calling PeppolIdentifiersApi.delete_peppol_identifier"
|
112
|
+
end
|
113
|
+
# verify the required parameter 'superscheme' is set
|
114
|
+
if @api_client.config.client_side_validation && superscheme.nil?
|
115
|
+
fail ArgumentError, "Missing the required parameter 'superscheme' when calling PeppolIdentifiersApi.delete_peppol_identifier"
|
116
|
+
end
|
117
|
+
# verify the required parameter 'scheme' is set
|
118
|
+
if @api_client.config.client_side_validation && scheme.nil?
|
119
|
+
fail ArgumentError, "Missing the required parameter 'scheme' when calling PeppolIdentifiersApi.delete_peppol_identifier"
|
120
|
+
end
|
121
|
+
# verify the required parameter 'identifier' is set
|
122
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling PeppolIdentifiersApi.delete_peppol_identifier"
|
124
|
+
end
|
125
|
+
# resource path
|
126
|
+
local_var_path = "/legal_entities/{legal_entity_id}/peppol_identifiers/{superscheme}/{scheme}/{identifier}".sub('{' + 'legal_entity_id' + '}', legal_entity_id.to_s).sub('{' + 'superscheme' + '}', superscheme.to_s).sub('{' + 'scheme' + '}', scheme.to_s).sub('{' + 'identifier' + '}', identifier.to_s)
|
127
|
+
|
128
|
+
# query parameters
|
129
|
+
query_params = {}
|
130
|
+
|
131
|
+
# header parameters
|
132
|
+
header_params = {}
|
133
|
+
# HTTP header 'Accept' (if needed)
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
135
|
+
# HTTP header 'Content-Type'
|
136
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
137
|
+
|
138
|
+
# form parameters
|
139
|
+
form_params = {}
|
140
|
+
|
141
|
+
# http body (model)
|
142
|
+
post_body = nil
|
143
|
+
auth_names = ['Bearer']
|
144
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
145
|
+
:header_params => header_params,
|
146
|
+
:query_params => query_params,
|
147
|
+
:form_params => form_params,
|
148
|
+
:body => post_body,
|
149
|
+
:auth_names => auth_names)
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: PeppolIdentifiersApi#delete_peppol_identifier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
return data, status_code, headers
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|