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
@@ -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 Subscription
16
16
  attr_accessor :id
17
17
 
@@ -33,6 +33,8 @@ module SwaggerClient
33
33
 
34
34
  attr_accessor :child_external_reference
35
35
 
36
+ attr_accessor :metadata
37
+
36
38
  attr_accessor :price
37
39
 
38
40
  attr_accessor :plan
@@ -50,6 +52,7 @@ module SwaggerClient
50
52
  :'valid_until' => :'valid_until',
51
53
  :'main_external_reference' => :'main_external_reference',
52
54
  :'child_external_reference' => :'child_external_reference',
55
+ :'metadata' => :'metadata',
53
56
  :'price' => :'price',
54
57
  :'plan' => :'plan'
55
58
  }
@@ -68,6 +71,7 @@ module SwaggerClient
68
71
  :'valid_until' => :'Object',
69
72
  :'main_external_reference' => :'Object',
70
73
  :'child_external_reference' => :'Object',
74
+ :'metadata' => :'Object',
71
75
  :'price' => :'Object',
72
76
  :'plan' => :'Object'
73
77
  }
@@ -83,13 +87,13 @@ module SwaggerClient
83
87
  # @param [Hash] attributes Model attributes in the form of hash
84
88
  def initialize(attributes = {})
85
89
  if (!attributes.is_a?(Hash))
86
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::Subscription` initialize method"
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::Subscription` initialize method"
87
91
  end
88
92
 
89
93
  # check to see if the attribute exists and convert string to symbol for hash key
90
94
  attributes = attributes.each_with_object({}) { |(k, v), h|
91
95
  if (!self.class.attribute_map.key?(k.to_sym))
92
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::Subscription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::Subscription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
97
  end
94
98
  h[k.to_sym] = v
95
99
  }
@@ -134,6 +138,10 @@ module SwaggerClient
134
138
  self.child_external_reference = attributes[:'child_external_reference']
135
139
  end
136
140
 
141
+ if attributes.key?(:'metadata')
142
+ self.metadata = attributes[:'metadata']
143
+ end
144
+
137
145
  if attributes.key?(:'price')
138
146
  self.price = attributes[:'price']
139
147
  end
@@ -171,6 +179,7 @@ module SwaggerClient
171
179
  valid_until == o.valid_until &&
172
180
  main_external_reference == o.main_external_reference &&
173
181
  child_external_reference == o.child_external_reference &&
182
+ metadata == o.metadata &&
174
183
  price == o.price &&
175
184
  plan == o.plan
176
185
  end
@@ -184,7 +193,7 @@ module SwaggerClient
184
193
  # Calculates hash code according to all attributes.
185
194
  # @return [Integer] Hash code
186
195
  def hash
187
- [id, seat_number, schedule, status, created_at, updated_at, ended_at, valid_until, main_external_reference, child_external_reference, price, plan].hash
196
+ [id, seat_number, schedule, status, created_at, updated_at, ended_at, valid_until, main_external_reference, child_external_reference, metadata, price, plan].hash
188
197
  end
189
198
 
190
199
  # Builds the object from hash
@@ -253,7 +262,7 @@ module SwaggerClient
253
262
  end
254
263
  end
255
264
  else # model
256
- SwaggerClient.const_get(type).build_from_hash(value)
265
+ Billabear.const_get(type).build_from_hash(value)
257
266
  end
258
267
  end
259
268
 
@@ -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 SubscriptionIdCancelBody
16
16
  attr_accessor :_when
17
17
 
@@ -74,13 +74,13 @@ module SwaggerClient
74
74
  # @param [Hash] attributes Model attributes in the form of hash
75
75
  def initialize(attributes = {})
76
76
  if (!attributes.is_a?(Hash))
77
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SubscriptionIdCancelBody` initialize method"
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SubscriptionIdCancelBody` initialize method"
78
78
  end
79
79
 
80
80
  # check to see if the attribute exists and convert string to symbol for hash key
81
81
  attributes = attributes.each_with_object({}) { |(k, v), h|
82
82
  if (!self.class.attribute_map.key?(k.to_sym))
83
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SubscriptionIdCancelBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::SubscriptionIdCancelBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
84
  end
85
85
  h[k.to_sym] = v
86
86
  }
@@ -242,7 +242,7 @@ module SwaggerClient
242
242
  end
243
243
  end
244
244
  else # model
245
- SwaggerClient.const_get(type).build_from_hash(value)
245
+ Billabear.const_get(type).build_from_hash(value)
246
246
  end
247
247
  end
248
248
 
@@ -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 SubscriptionIdExtendBody
16
16
  attr_accessor :price
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::SubscriptionIdExtendBody` initialize method"
42
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SubscriptionIdExtendBody` 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::SubscriptionIdExtendBody`. 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::SubscriptionIdExtendBody`. 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 SubscriptionIdPlanBody
16
16
  attr_accessor :_when
17
17
 
@@ -71,13 +71,13 @@ module SwaggerClient
71
71
  # @param [Hash] attributes Model attributes in the form of hash
72
72
  def initialize(attributes = {})
73
73
  if (!attributes.is_a?(Hash))
74
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SubscriptionIdPlanBody` initialize method"
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SubscriptionIdPlanBody` initialize method"
75
75
  end
76
76
 
77
77
  # check to see if the attribute exists and convert string to symbol for hash key
78
78
  attributes = attributes.each_with_object({}) { |(k, v), h|
79
79
  if (!self.class.attribute_map.key?(k.to_sym))
80
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SubscriptionIdPlanBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::SubscriptionIdPlanBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
81
  end
82
82
  h[k.to_sym] = v
83
83
  }
@@ -103,6 +103,10 @@ module SwaggerClient
103
103
  invalid_properties.push('invalid value for "_when", _when cannot be nil.')
104
104
  end
105
105
 
106
+ if @plan.nil?
107
+ invalid_properties.push('invalid value for "plan", plan cannot be nil.')
108
+ end
109
+
106
110
  if @price.nil?
107
111
  invalid_properties.push('invalid value for "price", price cannot be nil.')
108
112
  end
@@ -116,6 +120,7 @@ module SwaggerClient
116
120
  return false if @_when.nil?
117
121
  _when_validator = EnumAttributeValidator.new('Object', ['instantly', 'next-cycle'])
118
122
  return false unless _when_validator.valid?(@_when)
123
+ return false if @plan.nil?
119
124
  return false if @price.nil?
120
125
  true
121
126
  end
@@ -218,7 +223,7 @@ module SwaggerClient
218
223
  end
219
224
  end
220
225
  else # model
221
- SwaggerClient.const_get(type).build_from_hash(value)
226
+ Billabear.const_get(type).build_from_hash(value)
222
227
  end
223
228
  end
224
229
 
@@ -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 SubscriptionIdPriceBody
16
16
  attr_accessor :price
17
17
 
@@ -65,13 +65,13 @@ module SwaggerClient
65
65
  # @param [Hash] attributes Model attributes in the form of hash
66
66
  def initialize(attributes = {})
67
67
  if (!attributes.is_a?(Hash))
68
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SubscriptionIdPriceBody` initialize method"
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SubscriptionIdPriceBody` initialize method"
69
69
  end
70
70
 
71
71
  # check to see if the attribute exists and convert string to symbol for hash key
72
72
  attributes = attributes.each_with_object({}) { |(k, v), h|
73
73
  if (!self.class.attribute_map.key?(k.to_sym))
74
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SubscriptionIdPriceBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::SubscriptionIdPriceBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
75
  end
76
76
  h[k.to_sym] = v
77
77
  }
@@ -207,7 +207,7 @@ module SwaggerClient
207
207
  end
208
208
  end
209
209
  else # model
210
- SwaggerClient.const_get(type).build_from_hash(value)
210
+ Billabear.const_get(type).build_from_hash(value)
211
211
  end
212
212
  end
213
213
 
@@ -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 SubscriptionPlan
16
16
  attr_accessor :id
17
17
 
@@ -92,13 +92,13 @@ module SwaggerClient
92
92
  # @param [Hash] attributes Model attributes in the form of hash
93
93
  def initialize(attributes = {})
94
94
  if (!attributes.is_a?(Hash))
95
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SubscriptionPlan` initialize method"
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SubscriptionPlan` initialize method"
96
96
  end
97
97
 
98
98
  # check to see if the attribute exists and convert string to symbol for hash key
99
99
  attributes = attributes.each_with_object({}) { |(k, v), h|
100
100
  if (!self.class.attribute_map.key?(k.to_sym))
101
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SubscriptionPlan`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::SubscriptionPlan`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
102
102
  end
103
103
  h[k.to_sym] = v
104
104
  }
@@ -278,7 +278,7 @@ module SwaggerClient
278
278
  end
279
279
  end
280
280
  else # model
281
- SwaggerClient.const_get(type).build_from_hash(value)
281
+ Billabear.const_get(type).build_from_hash(value)
282
282
  end
283
283
  end
284
284
 
@@ -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 SubscriptionStartBody
16
16
  # The ID for the subscription plan to be used (Can also be the code name)
17
17
  attr_accessor :subscription_plan
@@ -35,6 +35,9 @@ module SwaggerClient
35
35
 
36
36
  attr_accessor :deny_trial
37
37
 
38
+ # Any metadata you want to add to a subscription
39
+ attr_accessor :metadata
40
+
38
41
  class EnumAttributeValidator
39
42
  attr_reader :datatype
40
43
  attr_reader :allowable_values
@@ -67,7 +70,8 @@ module SwaggerClient
67
70
  :'schedule' => :'schedule',
68
71
  :'currency' => :'currency',
69
72
  :'seat_numbrers' => :'seat_numbrers',
70
- :'deny_trial' => :'deny_trial'
73
+ :'deny_trial' => :'deny_trial',
74
+ :'metadata' => :'metadata'
71
75
  }
72
76
  end
73
77
 
@@ -81,7 +85,8 @@ module SwaggerClient
81
85
  :'schedule' => :'Object',
82
86
  :'currency' => :'Object',
83
87
  :'seat_numbrers' => :'Object',
84
- :'deny_trial' => :'Object'
88
+ :'deny_trial' => :'Object',
89
+ :'metadata' => :'Object'
85
90
  }
86
91
  end
87
92
 
@@ -95,13 +100,13 @@ module SwaggerClient
95
100
  # @param [Hash] attributes Model attributes in the form of hash
96
101
  def initialize(attributes = {})
97
102
  if (!attributes.is_a?(Hash))
98
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SubscriptionStartBody` initialize method"
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SubscriptionStartBody` initialize method"
99
104
  end
100
105
 
101
106
  # check to see if the attribute exists and convert string to symbol for hash key
102
107
  attributes = attributes.each_with_object({}) { |(k, v), h|
103
108
  if (!self.class.attribute_map.key?(k.to_sym))
104
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SubscriptionStartBody`. 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::SubscriptionStartBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
110
  end
106
111
  h[k.to_sym] = v
107
112
  }
@@ -137,6 +142,10 @@ module SwaggerClient
137
142
  if attributes.key?(:'deny_trial')
138
143
  self.deny_trial = attributes[:'deny_trial']
139
144
  end
145
+
146
+ if attributes.key?(:'metadata')
147
+ self.metadata = attributes[:'metadata']
148
+ end
140
149
  end
141
150
 
142
151
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -181,7 +190,8 @@ module SwaggerClient
181
190
  schedule == o.schedule &&
182
191
  currency == o.currency &&
183
192
  seat_numbrers == o.seat_numbrers &&
184
- deny_trial == o.deny_trial
193
+ deny_trial == o.deny_trial &&
194
+ metadata == o.metadata
185
195
  end
186
196
 
187
197
  # @see the `==` method
@@ -193,7 +203,7 @@ module SwaggerClient
193
203
  # Calculates hash code according to all attributes.
194
204
  # @return [Integer] Hash code
195
205
  def hash
196
- [subscription_plan, payment_details, card_token, price, schedule, currency, seat_numbrers, deny_trial].hash
206
+ [subscription_plan, payment_details, card_token, price, schedule, currency, seat_numbrers, deny_trial, metadata].hash
197
207
  end
198
208
 
199
209
  # Builds the object from hash
@@ -262,7 +272,7 @@ module SwaggerClient
262
272
  end
263
273
  end
264
274
  else # model
265
- SwaggerClient.const_get(type).build_from_hash(value)
275
+ Billabear.const_get(type).build_from_hash(value)
266
276
  end
267
277
  end
268
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 SubscriptionTrialBody
16
16
  # The ID for the subscription plan to be used (Can also be the code name)
17
17
  attr_accessor :subscription_plan
@@ -55,13 +55,13 @@ module SwaggerClient
55
55
  # @param [Hash] attributes Model attributes in the form of hash
56
56
  def initialize(attributes = {})
57
57
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SubscriptionTrialBody` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::SubscriptionTrialBody` initialize method"
59
59
  end
60
60
 
61
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
62
  attributes = attributes.each_with_object({}) { |(k, v), h|
63
63
  if (!self.class.attribute_map.key?(k.to_sym))
64
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SubscriptionTrialBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::SubscriptionTrialBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
65
  end
66
66
  h[k.to_sym] = v
67
67
  }
@@ -190,7 +190,7 @@ module SwaggerClient
190
190
  end
191
191
  end
192
192
  else # model
193
- SwaggerClient.const_get(type).build_from_hash(value)
193
+ Billabear.const_get(type).build_from_hash(value)
194
194
  end
195
195
  end
196
196