pnap_invoicing_api 1.0.0
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +153 -0
- data/Rakefile +10 -0
- data/VERSION +1 -0
- data/docs/Error.md +20 -0
- data/docs/Invoice.md +32 -0
- data/docs/InvoicesApi.md +307 -0
- data/docs/PaginatedInvoices.md +24 -0
- data/docs/PaginatedResponse.md +22 -0
- data/lib/pnap_invoicing_api/api/invoices_api.rb +323 -0
- data/lib/pnap_invoicing_api/api_client.rb +397 -0
- data/lib/pnap_invoicing_api/api_error.rb +58 -0
- data/lib/pnap_invoicing_api/configuration.rb +298 -0
- data/lib/pnap_invoicing_api/models/error.rb +234 -0
- data/lib/pnap_invoicing_api/models/invoice.rb +341 -0
- data/lib/pnap_invoicing_api/models/paginated_invoices.rb +281 -0
- data/lib/pnap_invoicing_api/models/paginated_response.rb +256 -0
- data/lib/pnap_invoicing_api/version.rb +19 -0
- data/lib/pnap_invoicing_api.rb +44 -0
- data/pnap_invoicing_api.gemspec +39 -0
- data/spec/api/invoices_api_spec.rb +91 -0
- data/spec/models/error_spec.rb +42 -0
- data/spec/models/invoice_spec.rb +78 -0
- data/spec/models/paginated_invoices_spec.rb +54 -0
- data/spec/models/paginated_response_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +116 -0
@@ -0,0 +1,256 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module InvoicingApi
|
17
|
+
class PaginatedResponse
|
18
|
+
# Maximum number of items in the page (actual returned length can be less).
|
19
|
+
attr_accessor :limit
|
20
|
+
|
21
|
+
# The number of returned items skipped.
|
22
|
+
attr_accessor :offset
|
23
|
+
|
24
|
+
# The total number of records available for retrieval.
|
25
|
+
attr_accessor :total
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'limit' => :'limit',
|
31
|
+
:'offset' => :'offset',
|
32
|
+
:'total' => :'total'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'limit' => :'Integer',
|
45
|
+
:'offset' => :'Integer',
|
46
|
+
:'total' => :'Integer'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# List of attributes with nullable: true
|
51
|
+
def self.openapi_nullable
|
52
|
+
Set.new([
|
53
|
+
])
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `InvoicingApi::PaginatedResponse` initialize method"
|
61
|
+
end
|
62
|
+
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `InvoicingApi::PaginatedResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
|
+
end
|
68
|
+
h[k.to_sym] = v
|
69
|
+
}
|
70
|
+
|
71
|
+
if attributes.key?(:'limit')
|
72
|
+
self.limit = attributes[:'limit']
|
73
|
+
else
|
74
|
+
self.limit = nil
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'offset')
|
78
|
+
self.offset = attributes[:'offset']
|
79
|
+
else
|
80
|
+
self.offset = nil
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'total')
|
84
|
+
self.total = attributes[:'total']
|
85
|
+
else
|
86
|
+
self.total = nil
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
91
|
+
# @return Array for valid properties with the reasons
|
92
|
+
def list_invalid_properties
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
94
|
+
invalid_properties = Array.new
|
95
|
+
if @limit.nil?
|
96
|
+
invalid_properties.push('invalid value for "limit", limit cannot be nil.')
|
97
|
+
end
|
98
|
+
|
99
|
+
if @offset.nil?
|
100
|
+
invalid_properties.push('invalid value for "offset", offset cannot be nil.')
|
101
|
+
end
|
102
|
+
|
103
|
+
if @total.nil?
|
104
|
+
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
105
|
+
end
|
106
|
+
|
107
|
+
invalid_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Check to see if the all the properties in the model are valid
|
111
|
+
# @return true if the model is valid
|
112
|
+
def valid?
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
114
|
+
return false if @limit.nil?
|
115
|
+
return false if @offset.nil?
|
116
|
+
return false if @total.nil?
|
117
|
+
true
|
118
|
+
end
|
119
|
+
|
120
|
+
# Checks equality by comparing each attribute.
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def ==(o)
|
123
|
+
return true if self.equal?(o)
|
124
|
+
self.class == o.class &&
|
125
|
+
limit == o.limit &&
|
126
|
+
offset == o.offset &&
|
127
|
+
total == o.total
|
128
|
+
end
|
129
|
+
|
130
|
+
# @see the `==` method
|
131
|
+
# @param [Object] Object to be compared
|
132
|
+
def eql?(o)
|
133
|
+
self == o
|
134
|
+
end
|
135
|
+
|
136
|
+
# Calculates hash code according to all attributes.
|
137
|
+
# @return [Integer] Hash code
|
138
|
+
def hash
|
139
|
+
[limit, offset, total].hash
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def self.build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
transformed_hash = {}
|
149
|
+
openapi_types.each_pair do |key, type|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = nil
|
152
|
+
elsif type =~ /\AArray<(.*)>/i
|
153
|
+
# check to ensure the input is an array given that the attribute
|
154
|
+
# is documented as an array but the input is not
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
157
|
+
end
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
160
|
+
end
|
161
|
+
end
|
162
|
+
new(transformed_hash)
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def self._deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = InvoicingApi.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
def get_version()
|
14
|
+
return File.read(File.expand_path('../../../VERSION', __FILE__)).strip
|
15
|
+
end
|
16
|
+
|
17
|
+
module InvoicingApi
|
18
|
+
VERSION = get_version()
|
19
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'pnap_invoicing_api/api_client'
|
15
|
+
require 'pnap_invoicing_api/api_error'
|
16
|
+
require 'pnap_invoicing_api/version'
|
17
|
+
require 'pnap_invoicing_api/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'pnap_invoicing_api/models/error'
|
21
|
+
require 'pnap_invoicing_api/models/invoice'
|
22
|
+
require 'pnap_invoicing_api/models/paginated_invoices'
|
23
|
+
require 'pnap_invoicing_api/models/paginated_response'
|
24
|
+
|
25
|
+
# APIs
|
26
|
+
require 'pnap_invoicing_api/api/invoices_api'
|
27
|
+
|
28
|
+
module InvoicingApi
|
29
|
+
class << self
|
30
|
+
# Customize default settings for the SDK using block.
|
31
|
+
# InvoicingApi.configure do |config|
|
32
|
+
# config.username = "xxx"
|
33
|
+
# config.password = "xxx"
|
34
|
+
# end
|
35
|
+
# If no block given, return the default Configuration object.
|
36
|
+
def configure
|
37
|
+
if block_given?
|
38
|
+
yield(Configuration.default)
|
39
|
+
else
|
40
|
+
Configuration.default
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Invoicing API
|
5
|
+
|
6
|
+
#List, fetch and pay invoices with the Invoicing API.
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Contact: support@phoenixnap.com
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 7.2.0
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "pnap_invoicing_api/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "pnap_invoicing_api"
|
20
|
+
s.version = InvoicingApi::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["PhoenixNAP"]
|
23
|
+
s.email = ["support@phoenixnap.com"]
|
24
|
+
s.homepage = "https://phoenixnap.com/bare-metal-cloud"
|
25
|
+
s.summary = "Invoicing API Ruby Gem"
|
26
|
+
s.description = "Invoicing API Ruby Gem"
|
27
|
+
s.license = "MPL-2.0"
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
29
|
+
s.metadata = { "source_code_uri" => "https://github.com/phoenixnap/ruby-sdk-bmc" }
|
30
|
+
|
31
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
|
35
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
36
|
+
s.test_files = `find spec/*`.split("\n")
|
37
|
+
s.executables = []
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for InvoicingApi::InvoicesApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'InvoicesApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = InvoicingApi::InvoicesApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of InvoicesApi' do
|
30
|
+
it 'should create an instance of InvoicesApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(InvoicingApi::InvoicesApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for invoices_get
|
36
|
+
# List invoices.
|
37
|
+
# List invoices.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :number A user-friendly reference number assigned to the invoice.
|
40
|
+
# @option opts [String] :status Payment status of the invoice.
|
41
|
+
# @option opts [Time] :sent_on_from Minimum value to filter invoices by sent on date.
|
42
|
+
# @option opts [Time] :sent_on_to Maximum value to filter invoices by sent on date.
|
43
|
+
# @option opts [Integer] :limit The limit of the number of results returned. The number of records returned may be smaller than the limit.
|
44
|
+
# @option opts [Integer] :offset The number of items to skip in the results.
|
45
|
+
# @option opts [String] :sort_field If a sortField is requested, pagination will be done after sorting. Default sorting is by number.
|
46
|
+
# @option opts [String] :sort_direction Sort Given Field depending on the desired direction. Default sorting is descending.
|
47
|
+
# @return [PaginatedInvoices]
|
48
|
+
describe 'invoices_get test' do
|
49
|
+
it 'should work' do
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# unit tests for invoices_invoice_id_generate_pdf_post
|
55
|
+
# Generate invoice details as PDF.
|
56
|
+
# Generate invoice details as PDF.
|
57
|
+
# @param invoice_id The unique resource identifier of the Invoice.
|
58
|
+
# @param [Hash] opts the optional parameters
|
59
|
+
# @return [File]
|
60
|
+
describe 'invoices_invoice_id_generate_pdf_post test' do
|
61
|
+
it 'should work' do
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# unit tests for invoices_invoice_id_get
|
67
|
+
# Get invoice details.
|
68
|
+
# Get invoice details.
|
69
|
+
# @param invoice_id The unique resource identifier of the Invoice.
|
70
|
+
# @param [Hash] opts the optional parameters
|
71
|
+
# @return [Invoice]
|
72
|
+
describe 'invoices_invoice_id_get test' do
|
73
|
+
it 'should work' do
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# unit tests for invoices_invoice_id_pay_post
|
79
|
+
# Pay an invoice.
|
80
|
+
# Manually pay an invoice.
|
81
|
+
# @param invoice_id The unique resource identifier of the Invoice.
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @option opts [Object] :body
|
84
|
+
# @return [Object]
|
85
|
+
describe 'invoices_invoice_id_pay_post test' do
|
86
|
+
it 'should work' do
|
87
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for InvoicingApi::Error
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe InvoicingApi::Error do
|
21
|
+
let(:instance) { InvoicingApi::Error.new }
|
22
|
+
|
23
|
+
describe 'test an instance of Error' do
|
24
|
+
it 'should create an instance of Error' do
|
25
|
+
# uncomment below to test the instance creation
|
26
|
+
#expect(instance).to be_instance_of(InvoicingApi::Error)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test attribute "message"' do
|
31
|
+
it 'should work' do
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'test attribute "validation_errors"' do
|
37
|
+
it 'should work' do
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for InvoicingApi::Invoice
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe InvoicingApi::Invoice do
|
21
|
+
let(:instance) { InvoicingApi::Invoice.new }
|
22
|
+
|
23
|
+
describe 'test an instance of Invoice' do
|
24
|
+
it 'should create an instance of Invoice' do
|
25
|
+
# uncomment below to test the instance creation
|
26
|
+
#expect(instance).to be_instance_of(InvoicingApi::Invoice)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test attribute "id"' do
|
31
|
+
it 'should work' do
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'test attribute "number"' do
|
37
|
+
it 'should work' do
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'test attribute "currency"' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe 'test attribute "amount"' do
|
49
|
+
it 'should work' do
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'test attribute "outstanding_amount"' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe 'test attribute "status"' do
|
61
|
+
it 'should work' do
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe 'test attribute "sent_on"' do
|
67
|
+
it 'should work' do
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe 'test attribute "due_date"' do
|
73
|
+
it 'should work' do
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for InvoicingApi::PaginatedInvoices
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe InvoicingApi::PaginatedInvoices do
|
21
|
+
let(:instance) { InvoicingApi::PaginatedInvoices.new }
|
22
|
+
|
23
|
+
describe 'test an instance of PaginatedInvoices' do
|
24
|
+
it 'should create an instance of PaginatedInvoices' do
|
25
|
+
# uncomment below to test the instance creation
|
26
|
+
#expect(instance).to be_instance_of(InvoicingApi::PaginatedInvoices)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test attribute "results"' do
|
31
|
+
it 'should work' do
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'test attribute "limit"' do
|
37
|
+
it 'should work' do
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'test attribute "offset"' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe 'test attribute "total"' do
|
49
|
+
it 'should work' do
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
=begin
|
2
|
+
#Invoicing API
|
3
|
+
|
4
|
+
#List, fetch and pay invoices with the Invoicing API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for InvoicingApi::PaginatedResponse
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe InvoicingApi::PaginatedResponse do
|
21
|
+
let(:instance) { InvoicingApi::PaginatedResponse.new }
|
22
|
+
|
23
|
+
describe 'test an instance of PaginatedResponse' do
|
24
|
+
it 'should create an instance of PaginatedResponse' do
|
25
|
+
# uncomment below to test the instance creation
|
26
|
+
#expect(instance).to be_instance_of(InvoicingApi::PaginatedResponse)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test attribute "limit"' do
|
31
|
+
it 'should work' do
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'test attribute "offset"' do
|
37
|
+
it 'should work' do
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'test attribute "total"' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|