billabear 1.0.0 → 1.1.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.
Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +509 -364
  3. data/billabear.gemspec +4 -4
  4. data/docs/Address.md +1 -1
  5. data/docs/BillingAdmin.md +1 -1
  6. data/docs/CheckoutApi.md +6 -6
  7. data/docs/CheckoutBody.md +1 -1
  8. data/docs/CheckoutItems.md +1 -1
  9. data/docs/CheckoutSubscriptions.md +1 -1
  10. data/docs/Cost.md +8 -0
  11. data/docs/Customer.md +3 -1
  12. data/docs/CustomerIdUasgelimitBody.md +8 -0
  13. data/docs/CustomersApi.md +319 -101
  14. data/docs/Error.md +1 -1
  15. data/docs/Event.md +11 -0
  16. data/docs/Feature.md +1 -1
  17. data/docs/FrontendToken.md +1 -1
  18. data/docs/InlineResponse200.md +1 -1
  19. data/docs/InlineResponse2001.md +3 -4
  20. data/docs/InlineResponse20010.md +2 -2
  21. data/docs/InlineResponse20011.md +4 -2
  22. data/docs/InlineResponse20012.md +4 -3
  23. data/docs/InlineResponse20013.md +7 -0
  24. data/docs/InlineResponse20014.md +8 -0
  25. data/docs/InlineResponse2002.md +4 -4
  26. data/docs/InlineResponse2003.md +2 -2
  27. data/docs/InlineResponse2004.md +2 -2
  28. data/docs/InlineResponse2005.md +2 -2
  29. data/docs/InlineResponse2006.md +2 -2
  30. data/docs/InlineResponse2007.md +2 -2
  31. data/docs/InlineResponse2008.md +2 -2
  32. data/docs/InlineResponse2009.md +2 -2
  33. data/docs/{InlineResponse2007Data.md → InlineResponse2009Data.md} +2 -2
  34. data/docs/{InlineResponse2007Receipts.md → InlineResponse2009Receipts.md} +1 -1
  35. data/docs/InlineResponse201.md +1 -1
  36. data/docs/InlineResponse201Lines.md +1 -1
  37. data/docs/InlineResponse400.md +1 -1
  38. data/docs/Invoice.md +1 -1
  39. data/docs/InvoiceLines.md +1 -1
  40. data/docs/InvoicesApi.md +17 -17
  41. data/docs/IssueRefundPayment.md +1 -1
  42. data/docs/Limit.md +1 -1
  43. data/docs/Metric.md +12 -0
  44. data/docs/MetricCost.md +10 -0
  45. data/docs/MetricFilter.md +11 -0
  46. data/docs/PaymentDetails.md +1 -1
  47. data/docs/PaymentDetailsApi.md +48 -52
  48. data/docs/PaymentsApi.md +41 -42
  49. data/docs/Price.md +2 -1
  50. data/docs/PricesApi.md +15 -16
  51. data/docs/Product.md +1 -1
  52. data/docs/ProductTaxType.md +1 -1
  53. data/docs/ProductsApi.md +23 -24
  54. data/docs/ReceiptApi.md +5 -5
  55. data/docs/Refund.md +1 -1
  56. data/docs/RefundsApi.md +17 -17
  57. data/docs/SeatsAddBody.md +1 -1
  58. data/docs/SeatsRemoveBody.md +1 -1
  59. data/docs/Subscription.md +2 -1
  60. data/docs/SubscriptionIdCancelBody.md +1 -1
  61. data/docs/SubscriptionIdExtendBody.md +1 -1
  62. data/docs/SubscriptionIdPlanBody.md +2 -2
  63. data/docs/SubscriptionIdPriceBody.md +1 -1
  64. data/docs/SubscriptionPlan.md +1 -1
  65. data/docs/SubscriptionStartBody.md +2 -1
  66. data/docs/SubscriptionTrialBody.md +1 -1
  67. data/docs/SubscriptionsApi.md +78 -79
  68. data/docs/UsageApi.md +279 -0
  69. data/docs/UsageLimit.md +9 -0
  70. data/docs/VoucherCode.md +1 -1
  71. data/git_push.sh +2 -2
  72. data/lib/{swagger_client → billabear}/api/checkout_api.rb +3 -3
  73. data/lib/{swagger_client → billabear}/api/customers_api.rb +284 -45
  74. data/lib/{swagger_client → billabear}/api/invoices_api.rb +9 -9
  75. data/lib/{swagger_client → billabear}/api/payment_details_api.rb +26 -26
  76. data/lib/{swagger_client → billabear}/api/payments_api.rb +20 -20
  77. data/lib/{swagger_client → billabear}/api/prices_api.rb +11 -11
  78. data/lib/{swagger_client → billabear}/api/products_api.rb +11 -11
  79. data/lib/{swagger_client → billabear}/api/receipt_api.rb +3 -3
  80. data/lib/{swagger_client → billabear}/api/refunds_api.rb +9 -9
  81. data/lib/{swagger_client → billabear}/api/subscriptions_api.rb +29 -29
  82. data/lib/billabear/api/usage_api.rb +314 -0
  83. data/lib/{swagger_client → billabear}/api_client.rb +4 -4
  84. data/lib/{swagger_client → billabear}/api_error.rb +3 -3
  85. data/lib/{swagger_client → billabear}/configuration.rb +3 -3
  86. data/lib/{swagger_client → billabear}/models/address.rb +6 -6
  87. data/lib/{swagger_client → billabear}/models/billing_admin.rb +6 -6
  88. data/lib/{swagger_client → billabear}/models/checkout_body.rb +6 -6
  89. data/lib/{swagger_client → billabear}/models/checkout_items.rb +6 -6
  90. data/lib/{swagger_client → billabear}/models/checkout_subscriptions.rb +6 -6
  91. data/lib/billabear/models/cost.rb +215 -0
  92. data/lib/{swagger_client → billabear}/models/customer.rb +45 -11
  93. data/lib/billabear/models/customer_id_uasgelimit_body.rb +259 -0
  94. data/lib/{swagger_client → billabear}/models/error.rb +6 -6
  95. data/lib/billabear/models/event.rb +262 -0
  96. data/lib/{swagger_client → billabear}/models/feature.rb +6 -6
  97. data/lib/{swagger_client → billabear}/models/frontend_token.rb +6 -6
  98. data/lib/{swagger_client → billabear}/models/inline_response_200.rb +6 -6
  99. data/lib/billabear/models/inline_response_200_1.rb +217 -0
  100. data/lib/{swagger_client → billabear}/models/inline_response_200_10.rb +6 -6
  101. data/lib/{swagger_client/models/inline_response_200_2.rb → billabear/models/inline_response_200_11.rb} +7 -7
  102. data/lib/billabear/models/inline_response_200_12.rb +226 -0
  103. data/lib/{swagger_client/models/inline_response_200_11.rb → billabear/models/inline_response_200_13.rb} +7 -7
  104. data/lib/{swagger_client/models/inline_response_200_12.rb → billabear/models/inline_response_200_14.rb} +7 -7
  105. data/lib/{swagger_client/models/inline_response_200_1.rb → billabear/models/inline_response_200_2.rb} +7 -7
  106. data/lib/{swagger_client → billabear}/models/inline_response_200_3.rb +6 -6
  107. data/lib/{swagger_client → billabear}/models/inline_response_200_4.rb +6 -6
  108. data/lib/{swagger_client → billabear}/models/inline_response_200_5.rb +6 -6
  109. data/lib/{swagger_client → billabear}/models/inline_response_200_6.rb +6 -6
  110. data/lib/{swagger_client → billabear}/models/inline_response_200_7.rb +6 -6
  111. data/lib/{swagger_client → billabear}/models/inline_response_200_8.rb +6 -6
  112. data/lib/{swagger_client → billabear}/models/inline_response_200_9.rb +6 -6
  113. data/lib/{swagger_client/models/inline_response_200_7_data.rb → billabear/models/inline_response_200_9_data.rb} +7 -7
  114. data/lib/{swagger_client/models/inline_response_200_7_receipts.rb → billabear/models/inline_response_200_9_receipts.rb} +7 -7
  115. data/lib/{swagger_client → billabear}/models/inline_response_201.rb +6 -6
  116. data/lib/{swagger_client → billabear}/models/inline_response_201_lines.rb +6 -6
  117. data/lib/{swagger_client → billabear}/models/inline_response_400.rb +6 -6
  118. data/lib/{swagger_client → billabear}/models/invoice.rb +6 -6
  119. data/lib/{swagger_client → billabear}/models/invoice_lines.rb +6 -6
  120. data/lib/{swagger_client → billabear}/models/issue_refund_payment.rb +6 -6
  121. data/lib/{swagger_client → billabear}/models/limit.rb +6 -6
  122. data/lib/billabear/models/metric.rb +288 -0
  123. data/lib/billabear/models/metric_cost.rb +234 -0
  124. data/lib/billabear/models/metric_filter.rb +276 -0
  125. data/lib/{swagger_client → billabear}/models/payment_details.rb +6 -6
  126. data/lib/{swagger_client → billabear}/models/price.rb +20 -11
  127. data/lib/{swagger_client → billabear}/models/product.rb +6 -6
  128. data/lib/{swagger_client → billabear}/models/product_tax_type.rb +6 -6
  129. data/lib/{swagger_client → billabear}/models/refund.rb +6 -6
  130. data/lib/{swagger_client → billabear}/models/seats_add_body.rb +6 -6
  131. data/lib/{swagger_client → billabear}/models/seats_remove_body.rb +6 -6
  132. data/lib/{swagger_client → billabear}/models/subscription.rb +16 -7
  133. data/lib/{swagger_client → billabear}/models/subscription_id_cancel_body.rb +6 -6
  134. data/lib/{swagger_client → billabear}/models/subscription_id_extend_body.rb +6 -6
  135. data/lib/{swagger_client → billabear}/models/subscription_id_plan_body.rb +11 -6
  136. data/lib/{swagger_client → billabear}/models/subscription_id_price_body.rb +6 -6
  137. data/lib/{swagger_client → billabear}/models/subscription_plan.rb +6 -6
  138. data/lib/{swagger_client → billabear}/models/subscription_start_body.rb +20 -10
  139. data/lib/{swagger_client → billabear}/models/subscription_trial_body.rb +6 -6
  140. data/lib/billabear/models/usage_limit.rb +258 -0
  141. data/lib/{swagger_client → billabear}/models/voucher_code.rb +6 -6
  142. data/lib/{swagger_client → billabear}/version.rb +4 -4
  143. data/lib/billabear.rb +105 -0
  144. data/spec/api/checkout_api_spec.rb +5 -5
  145. data/spec/api/customers_api_spec.rb +68 -17
  146. data/spec/api/invoices_api_spec.rb +7 -7
  147. data/spec/api/payment_details_api_spec.rb +10 -10
  148. data/spec/api/payments_api_spec.rb +10 -10
  149. data/spec/api/prices_api_spec.rb +7 -7
  150. data/spec/api/products_api_spec.rb +7 -7
  151. data/spec/api/receipt_api_spec.rb +5 -5
  152. data/spec/api/refunds_api_spec.rb +7 -7
  153. data/spec/api/subscriptions_api_spec.rb +13 -13
  154. data/spec/api/usage_api_spec.rb +96 -0
  155. data/spec/api_client_spec.rb +31 -31
  156. data/spec/configuration_spec.rb +5 -5
  157. data/spec/models/address_spec.rb +5 -5
  158. data/spec/models/billing_admin_spec.rb +5 -5
  159. data/spec/models/checkout_body_spec.rb +5 -5
  160. data/spec/models/checkout_items_spec.rb +5 -5
  161. data/spec/models/checkout_subscriptions_spec.rb +5 -5
  162. data/spec/models/cost_spec.rb +46 -0
  163. data/spec/models/customer_id_uasgelimit_body_spec.rb +50 -0
  164. data/spec/models/customer_spec.rb +21 -5
  165. data/spec/models/error_spec.rb +5 -5
  166. data/spec/models/event_spec.rb +64 -0
  167. data/spec/models/feature_spec.rb +5 -5
  168. data/spec/models/frontend_token_spec.rb +5 -5
  169. data/spec/models/inline_response_200_10_spec.rb +5 -5
  170. data/spec/models/inline_response_200_11_spec.rb +18 -6
  171. data/spec/models/inline_response_200_12_spec.rb +13 -11
  172. data/spec/models/inline_response_200_13_spec.rb +40 -0
  173. data/spec/models/inline_response_200_14_spec.rb +50 -0
  174. data/spec/models/inline_response_200_1_spec.rb +7 -13
  175. data/spec/models/inline_response_200_2_spec.rb +8 -8
  176. data/spec/models/inline_response_200_3_spec.rb +5 -5
  177. data/spec/models/inline_response_200_4_spec.rb +5 -5
  178. data/spec/models/inline_response_200_5_spec.rb +5 -5
  179. data/spec/models/inline_response_200_6_spec.rb +5 -5
  180. data/spec/models/inline_response_200_7_spec.rb +5 -5
  181. data/spec/models/inline_response_200_8_spec.rb +5 -5
  182. data/spec/models/{inline_response_200_7_data_spec.rb → inline_response_200_9_data_spec.rb} +8 -8
  183. data/spec/models/{inline_response_200_7_receipts_spec.rb → inline_response_200_9_receipts_spec.rb} +8 -8
  184. data/spec/models/inline_response_200_9_spec.rb +5 -5
  185. data/spec/models/inline_response_200_spec.rb +5 -5
  186. data/spec/models/inline_response_201_lines_spec.rb +5 -5
  187. data/spec/models/inline_response_201_spec.rb +5 -5
  188. data/spec/models/inline_response_400_spec.rb +5 -5
  189. data/spec/models/invoice_lines_spec.rb +5 -5
  190. data/spec/models/invoice_spec.rb +5 -5
  191. data/spec/models/issue_refund_payment_spec.rb +5 -5
  192. data/spec/models/limit_spec.rb +5 -5
  193. data/spec/models/metric_cost_spec.rb +58 -0
  194. data/spec/models/metric_filter_spec.rb +68 -0
  195. data/spec/models/metric_spec.rb +74 -0
  196. data/spec/models/payment_details_spec.rb +5 -5
  197. data/spec/models/price_spec.rb +11 -5
  198. data/spec/models/product_spec.rb +5 -5
  199. data/spec/models/product_tax_type_spec.rb +5 -5
  200. data/spec/models/refund_spec.rb +5 -5
  201. data/spec/models/seats_add_body_spec.rb +5 -5
  202. data/spec/models/seats_remove_body_spec.rb +5 -5
  203. data/spec/models/subscription_id_cancel_body_spec.rb +5 -5
  204. data/spec/models/subscription_id_extend_body_spec.rb +5 -5
  205. data/spec/models/subscription_id_plan_body_spec.rb +5 -5
  206. data/spec/models/subscription_id_price_body_spec.rb +5 -5
  207. data/spec/models/subscription_plan_spec.rb +5 -5
  208. data/spec/models/subscription_spec.rb +11 -5
  209. data/spec/models/subscription_start_body_spec.rb +11 -5
  210. data/spec/models/subscription_trial_body_spec.rb +5 -5
  211. data/spec/models/usage_limit_spec.rb +56 -0
  212. data/spec/models/voucher_code_spec.rb +5 -5
  213. data/spec/spec_helper.rb +3 -3
  214. metadata +110 -70
  215. data/lib/swagger_client.rb +0 -95
@@ -0,0 +1,276 @@
1
+ =begin
2
+ #BillaBear
3
+
4
+ #The REST API provided by BillaBear
5
+
6
+ OpenAPI spec version: 1.1.0
7
+ Contact: support@billabear.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.66
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module Billabear
15
+ class MetricFilter
16
+ attr_accessor :id
17
+
18
+ attr_accessor :name
19
+
20
+ attr_accessor :code
21
+
22
+ attr_accessor :value
23
+
24
+ attr_accessor :type
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'name' => :'name',
53
+ :'code' => :'code',
54
+ :'value' => :'value',
55
+ :'type' => :'type'
56
+ }
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'id' => :'Object',
63
+ :'name' => :'Object',
64
+ :'code' => :'Object',
65
+ :'value' => :'Object',
66
+ :'type' => :'Object'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::MetricFilter` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::MetricFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'id')
92
+ self.id = attributes[:'id']
93
+ end
94
+
95
+ if attributes.key?(:'name')
96
+ self.name = attributes[:'name']
97
+ end
98
+
99
+ if attributes.key?(:'code')
100
+ self.code = attributes[:'code']
101
+ end
102
+
103
+ if attributes.key?(:'value')
104
+ self.value = attributes[:'value']
105
+ end
106
+
107
+ if attributes.key?(:'type')
108
+ self.type = attributes[:'type']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ invalid_properties = Array.new
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ type_validator = EnumAttributeValidator.new('Object', ['inclusive', 'exclusive'])
123
+ return false unless type_validator.valid?(@type)
124
+ true
125
+ end
126
+
127
+ # Custom attribute writer method checking allowed values (enum).
128
+ # @param [Object] type Object to be assigned
129
+ def type=(type)
130
+ validator = EnumAttributeValidator.new('Object', ['inclusive', 'exclusive'])
131
+ unless validator.valid?(type)
132
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
133
+ end
134
+ @type = type
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ id == o.id &&
143
+ name == o.name &&
144
+ code == o.code &&
145
+ value == o.value &&
146
+ type == o.type
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [id, name, code, value, type].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ new.build_from_hash(attributes)
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ self.class.openapi_types.each_pair do |key, type|
174
+ if type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
178
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
183
+ self.send("#{key}=", nil)
184
+ end
185
+ end
186
+
187
+ self
188
+ end
189
+
190
+ # Deserializes the data based on type
191
+ # @param string type Data type
192
+ # @param string value Value to be deserialized
193
+ # @return [Object] Deserialized data
194
+ def _deserialize(type, value)
195
+ case type.to_sym
196
+ when :DateTime
197
+ DateTime.parse(value)
198
+ when :Date
199
+ Date.parse(value)
200
+ when :String
201
+ value.to_s
202
+ when :Integer
203
+ value.to_i
204
+ when :Float
205
+ value.to_f
206
+ when :Boolean
207
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
208
+ true
209
+ else
210
+ false
211
+ end
212
+ when :Object
213
+ # generic object (usually a Hash), return directly
214
+ value
215
+ when /\AArray<(?<inner_type>.+)>\z/
216
+ inner_type = Regexp.last_match[:inner_type]
217
+ value.map { |v| _deserialize(inner_type, v) }
218
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
219
+ k_type = Regexp.last_match[:k_type]
220
+ v_type = Regexp.last_match[:v_type]
221
+ {}.tap do |hash|
222
+ value.each do |k, v|
223
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
224
+ end
225
+ end
226
+ else # model
227
+ Billabear.const_get(type).build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ if value.nil?
250
+ is_nullable = self.class.openapi_nullable.include?(attr)
251
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
252
+ end
253
+
254
+ hash[param] = _to_hash(value)
255
+ end
256
+ hash
257
+ end
258
+
259
+ # Outputs non-array value in the form of hash
260
+ # For object, use to_hash. Otherwise, just return the value
261
+ # @param [Object] value Any valid value
262
+ # @return [Hash] Returns the value in the form of hash
263
+ def _to_hash(value)
264
+ if value.is_a?(Array)
265
+ value.compact.map { |v| _to_hash(v) }
266
+ elsif value.is_a?(Hash)
267
+ {}.tap do |hash|
268
+ value.each { |k, v| hash[k] = _to_hash(v) }
269
+ end
270
+ elsif value.respond_to? :to_hash
271
+ value.to_hash
272
+ else
273
+ value
274
+ end
275
+ end end
276
+ end
@@ -3,15 +3,15 @@
3
3
 
4
4
  #The REST API provided by BillaBear
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 1.1.0
7
7
  Contact: support@billabear.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.56
9
+ Swagger Codegen version: 3.0.66
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module SwaggerClient
14
+ module Billabear
15
15
  class PaymentDetails
16
16
  attr_accessor :id
17
17
 
@@ -69,13 +69,13 @@ module SwaggerClient
69
69
  # @param [Hash] attributes Model attributes in the form of hash
70
70
  def initialize(attributes = {})
71
71
  if (!attributes.is_a?(Hash))
72
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::PaymentDetails` initialize method"
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::PaymentDetails` initialize method"
73
73
  end
74
74
 
75
75
  # check to see if the attribute exists and convert string to symbol for hash key
76
76
  attributes = attributes.each_with_object({}) { |(k, v), h|
77
77
  if (!self.class.attribute_map.key?(k.to_sym))
78
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::PaymentDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::PaymentDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
79
  end
80
80
  h[k.to_sym] = v
81
81
  }
@@ -219,7 +219,7 @@ module SwaggerClient
219
219
  end
220
220
  end
221
221
  else # model
222
- SwaggerClient.const_get(type).build_from_hash(value)
222
+ Billabear.const_get(type).build_from_hash(value)
223
223
  end
224
224
  end
225
225
 
@@ -3,15 +3,15 @@
3
3
 
4
4
  #The REST API provided by BillaBear
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 1.1.0
7
7
  Contact: support@billabear.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.56
9
+ Swagger Codegen version: 3.0.66
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module SwaggerClient
14
+ module Billabear
15
15
  class Price
16
16
  attr_accessor :id
17
17
 
@@ -32,6 +32,8 @@ module SwaggerClient
32
32
 
33
33
  attr_accessor :public
34
34
 
35
+ attr_accessor :metric
36
+
35
37
  class EnumAttributeValidator
36
38
  attr_reader :datatype
37
39
  attr_reader :allowable_values
@@ -64,7 +66,8 @@ module SwaggerClient
64
66
  :'recurring' => :'recurring',
65
67
  :'schedule' => :'schedule',
66
68
  :'including_tax' => :'including_tax',
67
- :'public' => :'public'
69
+ :'public' => :'public',
70
+ :'metric' => :'metric'
68
71
  }
69
72
  end
70
73
 
@@ -78,7 +81,8 @@ module SwaggerClient
78
81
  :'recurring' => :'Object',
79
82
  :'schedule' => :'Object',
80
83
  :'including_tax' => :'Object',
81
- :'public' => :'Object'
84
+ :'public' => :'Object',
85
+ :'metric' => :'Object'
82
86
  }
83
87
  end
84
88
 
@@ -88,7 +92,7 @@ module SwaggerClient
88
92
  :'external_reference',
89
93
  :'schedule',
90
94
  :'including_tax',
91
- :'public'
95
+ :'public',
92
96
  ])
93
97
  end
94
98
 
@@ -96,13 +100,13 @@ module SwaggerClient
96
100
  # @param [Hash] attributes Model attributes in the form of hash
97
101
  def initialize(attributes = {})
98
102
  if (!attributes.is_a?(Hash))
99
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::Price` initialize method"
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::Price` initialize method"
100
104
  end
101
105
 
102
106
  # check to see if the attribute exists and convert string to symbol for hash key
103
107
  attributes = attributes.each_with_object({}) { |(k, v), h|
104
108
  if (!self.class.attribute_map.key?(k.to_sym))
105
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::Price`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::Price`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
106
110
  end
107
111
  h[k.to_sym] = v
108
112
  }
@@ -138,6 +142,10 @@ module SwaggerClient
138
142
  if attributes.key?(:'public')
139
143
  self.public = attributes[:'public']
140
144
  end
145
+
146
+ if attributes.key?(:'metric')
147
+ self.metric = attributes[:'metric']
148
+ end
141
149
  end
142
150
 
143
151
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -192,7 +200,8 @@ module SwaggerClient
192
200
  recurring == o.recurring &&
193
201
  schedule == o.schedule &&
194
202
  including_tax == o.including_tax &&
195
- public == o.public
203
+ public == o.public &&
204
+ metric == o.metric
196
205
  end
197
206
 
198
207
  # @see the `==` method
@@ -204,7 +213,7 @@ module SwaggerClient
204
213
  # Calculates hash code according to all attributes.
205
214
  # @return [Integer] Hash code
206
215
  def hash
207
- [id, amount, currency, external_reference, recurring, schedule, including_tax, public].hash
216
+ [id, amount, currency, external_reference, recurring, schedule, including_tax, public, metric].hash
208
217
  end
209
218
 
210
219
  # Builds the object from hash
@@ -273,7 +282,7 @@ module SwaggerClient
273
282
  end
274
283
  end
275
284
  else # model
276
- SwaggerClient.const_get(type).build_from_hash(value)
285
+ Billabear.const_get(type).build_from_hash(value)
277
286
  end
278
287
  end
279
288
 
@@ -3,15 +3,15 @@
3
3
 
4
4
  #The REST API provided by BillaBear
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 1.1.0
7
7
  Contact: support@billabear.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.56
9
+ Swagger Codegen version: 3.0.66
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module SwaggerClient
14
+ module Billabear
15
15
  class Product
16
16
  attr_accessor :id
17
17
 
@@ -53,13 +53,13 @@ module SwaggerClient
53
53
  # @param [Hash] attributes Model attributes in the form of hash
54
54
  def initialize(attributes = {})
55
55
  if (!attributes.is_a?(Hash))
56
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::Product` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::Product` initialize method"
57
57
  end
58
58
 
59
59
  # check to see if the attribute exists and convert string to symbol for hash key
60
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
61
  if (!self.class.attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::Product`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::Product`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
63
  end
64
64
  h[k.to_sym] = v
65
65
  }
@@ -188,7 +188,7 @@ module SwaggerClient
188
188
  end
189
189
  end
190
190
  else # model
191
- SwaggerClient.const_get(type).build_from_hash(value)
191
+ Billabear.const_get(type).build_from_hash(value)
192
192
  end
193
193
  end
194
194
 
@@ -3,15 +3,15 @@
3
3
 
4
4
  #The REST API provided by BillaBear
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 1.1.0
7
7
  Contact: support@billabear.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.56
9
+ Swagger Codegen version: 3.0.66
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module SwaggerClient
14
+ module Billabear
15
15
  class ProductTaxType
16
16
  attr_accessor :id
17
17
 
@@ -47,13 +47,13 @@ module SwaggerClient
47
47
  # @param [Hash] attributes Model attributes in the form of hash
48
48
  def initialize(attributes = {})
49
49
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::ProductTaxType` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::ProductTaxType` initialize method"
51
51
  end
52
52
 
53
53
  # check to see if the attribute exists and convert string to symbol for hash key
54
54
  attributes = attributes.each_with_object({}) { |(k, v), h|
55
55
  if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::ProductTaxType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::ProductTaxType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
57
  end
58
58
  h[k.to_sym] = v
59
59
  }
@@ -177,7 +177,7 @@ module SwaggerClient
177
177
  end
178
178
  end
179
179
  else # model
180
- SwaggerClient.const_get(type).build_from_hash(value)
180
+ Billabear.const_get(type).build_from_hash(value)
181
181
  end
182
182
  end
183
183
 
@@ -3,15 +3,15 @@
3
3
 
4
4
  #The REST API provided by BillaBear
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 1.1.0
7
7
  Contact: support@billabear.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.56
9
+ Swagger Codegen version: 3.0.66
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module SwaggerClient
14
+ module Billabear
15
15
  class Refund
16
16
  attr_accessor :id
17
17
 
@@ -100,13 +100,13 @@ module SwaggerClient
100
100
  # @param [Hash] attributes Model attributes in the form of hash
101
101
  def initialize(attributes = {})
102
102
  if (!attributes.is_a?(Hash))
103
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::Refund` initialize method"
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::Refund` initialize method"
104
104
  end
105
105
 
106
106
  # check to see if the attribute exists and convert string to symbol for hash key
107
107
  attributes = attributes.each_with_object({}) { |(k, v), h|
108
108
  if (!self.class.attribute_map.key?(k.to_sym))
109
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::Refund`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::Refund`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
110
110
  end
111
111
  h[k.to_sym] = v
112
112
  }
@@ -272,7 +272,7 @@ module SwaggerClient
272
272
  end
273
273
  end
274
274
  else # model
275
- SwaggerClient.const_get(type).build_from_hash(value)
275
+ Billabear.const_get(type).build_from_hash(value)
276
276
  end
277
277
  end
278
278
 
@@ -3,15 +3,15 @@
3
3
 
4
4
  #The REST API provided by BillaBear
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 1.1.0
7
7
  Contact: support@billabear.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.56
9
+ Swagger Codegen version: 3.0.66
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module SwaggerClient
14
+ module Billabear
15
15
  class SeatsAddBody
16
16
  attr_accessor :seats
17
17
 
@@ -39,13 +39,13 @@ module SwaggerClient
39
39
  # @param [Hash] attributes Model attributes in the form of hash
40
40
  def initialize(attributes = {})
41
41
  if (!attributes.is_a?(Hash))
42
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SeatsAddBody` initialize method"
42
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SeatsAddBody` initialize method"
43
43
  end
44
44
 
45
45
  # check to see if the attribute exists and convert string to symbol for hash key
46
46
  attributes = attributes.each_with_object({}) { |(k, v), h|
47
47
  if (!self.class.attribute_map.key?(k.to_sym))
48
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SeatsAddBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
48
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::SeatsAddBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
49
  end
50
50
  h[k.to_sym] = v
51
51
  }
@@ -159,7 +159,7 @@ module SwaggerClient
159
159
  end
160
160
  end
161
161
  else # model
162
- SwaggerClient.const_get(type).build_from_hash(value)
162
+ Billabear.const_get(type).build_from_hash(value)
163
163
  end
164
164
  end
165
165
 
@@ -3,15 +3,15 @@
3
3
 
4
4
  #The REST API provided by BillaBear
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 1.1.0
7
7
  Contact: support@billabear.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.56
9
+ Swagger Codegen version: 3.0.66
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module SwaggerClient
14
+ module Billabear
15
15
  class SeatsRemoveBody
16
16
  attr_accessor :seats
17
17
 
@@ -39,13 +39,13 @@ module SwaggerClient
39
39
  # @param [Hash] attributes Model attributes in the form of hash
40
40
  def initialize(attributes = {})
41
41
  if (!attributes.is_a?(Hash))
42
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SeatsRemoveBody` initialize method"
42
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SeatsRemoveBody` initialize method"
43
43
  end
44
44
 
45
45
  # check to see if the attribute exists and convert string to symbol for hash key
46
46
  attributes = attributes.each_with_object({}) { |(k, v), h|
47
47
  if (!self.class.attribute_map.key?(k.to_sym))
48
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SeatsRemoveBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
48
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::SeatsRemoveBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
49
  end
50
50
  h[k.to_sym] = v
51
51
  }
@@ -159,7 +159,7 @@ module SwaggerClient
159
159
  end
160
160
  end
161
161
  else # model
162
- SwaggerClient.const_get(type).build_from_hash(value)
162
+ Billabear.const_get(type).build_from_hash(value)
163
163
  end
164
164
  end
165
165