billabear 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 +1340 -0
- data/Rakefile +8 -0
- data/billabear.gemspec +38 -0
- data/docs/Address.md +13 -0
- data/docs/BillingAdmin.md +8 -0
- data/docs/CheckoutApi.md +61 -0
- data/docs/CheckoutBody.md +12 -0
- data/docs/CheckoutItems.md +11 -0
- data/docs/CheckoutSubscriptions.md +9 -0
- data/docs/Customer.md +18 -0
- data/docs/CustomersApi.md +904 -0
- data/docs/Error.md +8 -0
- data/docs/Feature.md +10 -0
- data/docs/FrontendToken.md +7 -0
- data/docs/InlineResponse200.md +9 -0
- data/docs/InlineResponse2001.md +9 -0
- data/docs/InlineResponse20010.md +9 -0
- data/docs/InlineResponse20011.md +7 -0
- data/docs/InlineResponse20012.md +8 -0
- data/docs/InlineResponse2002.md +9 -0
- data/docs/InlineResponse2003.md +9 -0
- data/docs/InlineResponse2004.md +9 -0
- data/docs/InlineResponse2005.md +9 -0
- data/docs/InlineResponse2006.md +9 -0
- data/docs/InlineResponse2007.md +9 -0
- data/docs/InlineResponse2007Data.md +14 -0
- data/docs/InlineResponse2007Receipts.md +9 -0
- data/docs/InlineResponse2008.md +9 -0
- data/docs/InlineResponse2009.md +9 -0
- data/docs/InlineResponse201.md +15 -0
- data/docs/InlineResponse201Lines.md +14 -0
- data/docs/InlineResponse400.md +7 -0
- data/docs/Invoice.md +21 -0
- data/docs/InvoiceLines.md +12 -0
- data/docs/InvoicesApi.md +169 -0
- data/docs/IssueRefundPayment.md +9 -0
- data/docs/Limit.md +8 -0
- data/docs/PaymentDetails.md +14 -0
- data/docs/PaymentDetailsApi.md +447 -0
- data/docs/PaymentsApi.md +399 -0
- data/docs/Price.md +14 -0
- data/docs/PricesApi.md +122 -0
- data/docs/Product.md +10 -0
- data/docs/ProductTaxType.md +9 -0
- data/docs/ProductsApi.md +228 -0
- data/docs/ReceiptApi.md +61 -0
- data/docs/Refund.md +16 -0
- data/docs/RefundsApi.md +181 -0
- data/docs/SeatsAddBody.md +7 -0
- data/docs/SeatsRemoveBody.md +7 -0
- data/docs/Subscription.md +18 -0
- data/docs/SubscriptionIdCancelBody.md +10 -0
- data/docs/SubscriptionIdExtendBody.md +7 -0
- data/docs/SubscriptionIdPlanBody.md +9 -0
- data/docs/SubscriptionIdPriceBody.md +8 -0
- data/docs/SubscriptionPlan.md +20 -0
- data/docs/SubscriptionStartBody.md +14 -0
- data/docs/SubscriptionTrialBody.md +10 -0
- data/docs/SubscriptionsApi.md +731 -0
- data/docs/VoucherCode.md +7 -0
- data/git_push.sh +55 -0
- data/lib/swagger_client/api/checkout_api.rb +78 -0
- data/lib/swagger_client/api/customers_api.rb +980 -0
- data/lib/swagger_client/api/invoices_api.rb +188 -0
- data/lib/swagger_client/api/payment_details_api.rb +494 -0
- data/lib/swagger_client/api/payments_api.rb +432 -0
- data/lib/swagger_client/api/prices_api.rb +146 -0
- data/lib/swagger_client/api/products_api.rb +249 -0
- data/lib/swagger_client/api/receipt_api.rb +76 -0
- data/lib/swagger_client/api/refunds_api.rb +200 -0
- data/lib/swagger_client/api/subscriptions_api.rb +812 -0
- data/lib/swagger_client/api_client.rb +388 -0
- data/lib/swagger_client/api_error.rb +57 -0
- data/lib/swagger_client/configuration.rb +205 -0
- data/lib/swagger_client/models/address.rb +265 -0
- data/lib/swagger_client/models/billing_admin.rb +215 -0
- data/lib/swagger_client/models/checkout_body.rb +265 -0
- data/lib/swagger_client/models/checkout_items.rb +242 -0
- data/lib/swagger_client/models/checkout_subscriptions.rb +224 -0
- data/lib/swagger_client/models/customer.rb +370 -0
- data/lib/swagger_client/models/error.rb +225 -0
- data/lib/swagger_client/models/feature.rb +240 -0
- data/lib/swagger_client/models/frontend_token.rb +211 -0
- data/lib/swagger_client/models/inline_response_200.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_1.rb +228 -0
- data/lib/swagger_client/models/inline_response_200_10.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_11.rb +206 -0
- data/lib/swagger_client/models/inline_response_200_12.rb +250 -0
- data/lib/swagger_client/models/inline_response_200_2.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_3.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_4.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_5.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_6.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_7.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_7_data.rb +307 -0
- data/lib/swagger_client/models/inline_response_200_7_receipts.rb +224 -0
- data/lib/swagger_client/models/inline_response_200_8.rb +226 -0
- data/lib/swagger_client/models/inline_response_200_9.rb +226 -0
- data/lib/swagger_client/models/inline_response_201.rb +285 -0
- data/lib/swagger_client/models/inline_response_201_lines.rb +269 -0
- data/lib/swagger_client/models/inline_response_400.rb +213 -0
- data/lib/swagger_client/models/invoice.rb +334 -0
- data/lib/swagger_client/models/invoice_lines.rb +251 -0
- data/lib/swagger_client/models/issue_refund_payment.rb +232 -0
- data/lib/swagger_client/models/limit.rb +215 -0
- data/lib/swagger_client/models/payment_details.rb +271 -0
- data/lib/swagger_client/models/price.rb +325 -0
- data/lib/swagger_client/models/product.rb +240 -0
- data/lib/swagger_client/models/product_tax_type.rb +229 -0
- data/lib/swagger_client/models/refund.rb +324 -0
- data/lib/swagger_client/models/seats_add_body.rb +211 -0
- data/lib/swagger_client/models/seats_remove_body.rb +211 -0
- data/lib/swagger_client/models/subscription.rb +305 -0
- data/lib/swagger_client/models/subscription_id_cancel_body.rb +294 -0
- data/lib/swagger_client/models/subscription_id_extend_body.rb +211 -0
- data/lib/swagger_client/models/subscription_id_plan_body.rb +270 -0
- data/lib/swagger_client/models/subscription_id_price_body.rb +259 -0
- data/lib/swagger_client/models/subscription_plan.rb +330 -0
- data/lib/swagger_client/models/subscription_start_body.rb +314 -0
- data/lib/swagger_client/models/subscription_trial_body.rb +242 -0
- data/lib/swagger_client/models/voucher_code.rb +211 -0
- data/lib/swagger_client/version.rb +14 -0
- data/lib/swagger_client.rb +95 -0
- data/spec/api/checkout_api_spec.rb +46 -0
- data/spec/api/customers_api_spec.rb +241 -0
- data/spec/api/invoices_api_spec.rb +70 -0
- data/spec/api/payment_details_api_spec.rb +134 -0
- data/spec/api/payments_api_spec.rb +124 -0
- data/spec/api/prices_api_spec.rb +61 -0
- data/spec/api/products_api_spec.rb +84 -0
- data/spec/api/receipt_api_spec.rb +46 -0
- data/spec/api/refunds_api_spec.rb +75 -0
- data/spec/api/subscriptions_api_spec.rb +200 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/address_spec.rb +76 -0
- data/spec/models/billing_admin_spec.rb +46 -0
- data/spec/models/checkout_body_spec.rb +70 -0
- data/spec/models/checkout_items_spec.rb +64 -0
- data/spec/models/checkout_subscriptions_spec.rb +52 -0
- data/spec/models/customer_spec.rb +114 -0
- data/spec/models/error_spec.rb +46 -0
- data/spec/models/feature_spec.rb +58 -0
- data/spec/models/frontend_token_spec.rb +40 -0
- data/spec/models/inline_response_200_10_spec.rb +52 -0
- data/spec/models/inline_response_200_11_spec.rb +40 -0
- data/spec/models/inline_response_200_12_spec.rb +50 -0
- data/spec/models/inline_response_200_1_spec.rb +52 -0
- data/spec/models/inline_response_200_2_spec.rb +52 -0
- data/spec/models/inline_response_200_3_spec.rb +52 -0
- data/spec/models/inline_response_200_4_spec.rb +52 -0
- data/spec/models/inline_response_200_5_spec.rb +52 -0
- data/spec/models/inline_response_200_6_spec.rb +52 -0
- data/spec/models/inline_response_200_7_data_spec.rb +86 -0
- data/spec/models/inline_response_200_7_receipts_spec.rb +52 -0
- data/spec/models/inline_response_200_7_spec.rb +52 -0
- data/spec/models/inline_response_200_8_spec.rb +52 -0
- data/spec/models/inline_response_200_9_spec.rb +52 -0
- data/spec/models/inline_response_200_spec.rb +52 -0
- data/spec/models/inline_response_201_lines_spec.rb +82 -0
- data/spec/models/inline_response_201_spec.rb +88 -0
- data/spec/models/inline_response_400_spec.rb +40 -0
- data/spec/models/invoice_lines_spec.rb +70 -0
- data/spec/models/invoice_spec.rb +124 -0
- data/spec/models/issue_refund_payment_spec.rb +52 -0
- data/spec/models/limit_spec.rb +46 -0
- data/spec/models/payment_details_spec.rb +82 -0
- data/spec/models/price_spec.rb +86 -0
- data/spec/models/product_spec.rb +58 -0
- data/spec/models/product_tax_type_spec.rb +52 -0
- data/spec/models/refund_spec.rb +98 -0
- data/spec/models/seats_add_body_spec.rb +40 -0
- data/spec/models/seats_remove_body_spec.rb +40 -0
- data/spec/models/subscription_id_cancel_body_spec.rb +66 -0
- data/spec/models/subscription_id_extend_body_spec.rb +40 -0
- data/spec/models/subscription_id_plan_body_spec.rb +56 -0
- data/spec/models/subscription_id_price_body_spec.rb +50 -0
- data/spec/models/subscription_plan_spec.rb +118 -0
- data/spec/models/subscription_spec.rb +106 -0
- data/spec/models/subscription_start_body_spec.rb +86 -0
- data/spec/models/subscription_trial_body_spec.rb +58 -0
- data/spec/models/voucher_code_spec.rb +40 -0
- data/spec/spec_helper.rb +110 -0
- metadata +349 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#BillaBear
|
|
3
|
+
|
|
4
|
+
#The REST API provided by BillaBear
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0.0
|
|
7
|
+
Contact: support@billabear.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.56
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module SwaggerClient
|
|
13
|
+
class ProductsApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# Create
|
|
20
|
+
# Create a product
|
|
21
|
+
# @param body
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @return [String]
|
|
24
|
+
def create_product(body, opts = {})
|
|
25
|
+
data, _status_code, _headers = create_product_with_http_info(body, opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Create
|
|
30
|
+
# Create a product
|
|
31
|
+
# @param body
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
34
|
+
def create_product_with_http_info(body, opts = {})
|
|
35
|
+
if @api_client.config.debugging
|
|
36
|
+
@api_client.config.logger.debug 'Calling API: ProductsApi.create_product ...'
|
|
37
|
+
end
|
|
38
|
+
# verify the required parameter 'body' is set
|
|
39
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
40
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ProductsApi.create_product"
|
|
41
|
+
end
|
|
42
|
+
# resource path
|
|
43
|
+
local_var_path = '/product'
|
|
44
|
+
|
|
45
|
+
# query parameters
|
|
46
|
+
query_params = opts[:query_params] || {}
|
|
47
|
+
|
|
48
|
+
# header parameters
|
|
49
|
+
header_params = opts[:header_params] || {}
|
|
50
|
+
# HTTP header 'Accept' (if needed)
|
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
52
|
+
# HTTP header 'Content-Type'
|
|
53
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = opts[:form_params] || {}
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
60
|
+
|
|
61
|
+
return_type = opts[:return_type] || 'String'
|
|
62
|
+
|
|
63
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => return_type)
|
|
71
|
+
|
|
72
|
+
if @api_client.config.debugging
|
|
73
|
+
@api_client.config.logger.debug "API called: ProductsApi#create_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
74
|
+
end
|
|
75
|
+
return data, status_code, headers
|
|
76
|
+
end
|
|
77
|
+
# List
|
|
78
|
+
# List all products
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
81
|
+
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
82
|
+
# @option opts [String] :name The name to search for
|
|
83
|
+
# @return [InlineResponse2008]
|
|
84
|
+
def list_product(opts = {})
|
|
85
|
+
data, _status_code, _headers = list_product_with_http_info(opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# List
|
|
90
|
+
# List all products
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
93
|
+
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
94
|
+
# @option opts [String] :name The name to search for
|
|
95
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
|
96
|
+
def list_product_with_http_info(opts = {})
|
|
97
|
+
if @api_client.config.debugging
|
|
98
|
+
@api_client.config.logger.debug 'Calling API: ProductsApi.list_product ...'
|
|
99
|
+
end
|
|
100
|
+
# resource path
|
|
101
|
+
local_var_path = '/product'
|
|
102
|
+
|
|
103
|
+
# query parameters
|
|
104
|
+
query_params = opts[:query_params] || {}
|
|
105
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
106
|
+
query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
|
|
107
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
108
|
+
|
|
109
|
+
# header parameters
|
|
110
|
+
header_params = opts[:header_params] || {}
|
|
111
|
+
# HTTP header 'Accept' (if needed)
|
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
113
|
+
|
|
114
|
+
# form parameters
|
|
115
|
+
form_params = opts[:form_params] || {}
|
|
116
|
+
|
|
117
|
+
# http body (model)
|
|
118
|
+
post_body = opts[:body]
|
|
119
|
+
|
|
120
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
|
121
|
+
|
|
122
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
123
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
124
|
+
:header_params => header_params,
|
|
125
|
+
:query_params => query_params,
|
|
126
|
+
:form_params => form_params,
|
|
127
|
+
:body => post_body,
|
|
128
|
+
:auth_names => auth_names,
|
|
129
|
+
:return_type => return_type)
|
|
130
|
+
|
|
131
|
+
if @api_client.config.debugging
|
|
132
|
+
@api_client.config.logger.debug "API called: ProductsApi#list_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
133
|
+
end
|
|
134
|
+
return data, status_code, headers
|
|
135
|
+
end
|
|
136
|
+
# Detail
|
|
137
|
+
# Info for a specific product
|
|
138
|
+
# @param product_id The id of the product to retrieve
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @return [Product]
|
|
141
|
+
def show_product_by_id(product_id, opts = {})
|
|
142
|
+
data, _status_code, _headers = show_product_by_id_with_http_info(product_id, opts)
|
|
143
|
+
data
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Detail
|
|
147
|
+
# Info for a specific product
|
|
148
|
+
# @param product_id The id of the product to retrieve
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @return [Array<(Product, Integer, Hash)>] Product data, response status code and response headers
|
|
151
|
+
def show_product_by_id_with_http_info(product_id, opts = {})
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug 'Calling API: ProductsApi.show_product_by_id ...'
|
|
154
|
+
end
|
|
155
|
+
# verify the required parameter 'product_id' is set
|
|
156
|
+
if @api_client.config.client_side_validation && product_id.nil?
|
|
157
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.show_product_by_id"
|
|
158
|
+
end
|
|
159
|
+
# resource path
|
|
160
|
+
local_var_path = '/product/{productId}'.sub('{' + 'productId' + '}', product_id.to_s)
|
|
161
|
+
|
|
162
|
+
# query parameters
|
|
163
|
+
query_params = opts[:query_params] || {}
|
|
164
|
+
|
|
165
|
+
# header parameters
|
|
166
|
+
header_params = opts[:header_params] || {}
|
|
167
|
+
# HTTP header 'Accept' (if needed)
|
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = opts[:form_params] || {}
|
|
172
|
+
|
|
173
|
+
# http body (model)
|
|
174
|
+
post_body = opts[:body]
|
|
175
|
+
|
|
176
|
+
return_type = opts[:return_type] || 'Product'
|
|
177
|
+
|
|
178
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
179
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
180
|
+
:header_params => header_params,
|
|
181
|
+
:query_params => query_params,
|
|
182
|
+
:form_params => form_params,
|
|
183
|
+
:body => post_body,
|
|
184
|
+
:auth_names => auth_names,
|
|
185
|
+
:return_type => return_type)
|
|
186
|
+
|
|
187
|
+
if @api_client.config.debugging
|
|
188
|
+
@api_client.config.logger.debug "API called: ProductsApi#show_product_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
189
|
+
end
|
|
190
|
+
return data, status_code, headers
|
|
191
|
+
end
|
|
192
|
+
# Update
|
|
193
|
+
# Update a product
|
|
194
|
+
# @param product_id The id of the product to retrieve
|
|
195
|
+
# @param [Hash] opts the optional parameters
|
|
196
|
+
# @return [Product]
|
|
197
|
+
def update_product(product_id, opts = {})
|
|
198
|
+
data, _status_code, _headers = update_product_with_http_info(product_id, opts)
|
|
199
|
+
data
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Update
|
|
203
|
+
# Update a product
|
|
204
|
+
# @param product_id The id of the product to retrieve
|
|
205
|
+
# @param [Hash] opts the optional parameters
|
|
206
|
+
# @return [Array<(Product, Integer, Hash)>] Product data, response status code and response headers
|
|
207
|
+
def update_product_with_http_info(product_id, opts = {})
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug 'Calling API: ProductsApi.update_product ...'
|
|
210
|
+
end
|
|
211
|
+
# verify the required parameter 'product_id' is set
|
|
212
|
+
if @api_client.config.client_side_validation && product_id.nil?
|
|
213
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.update_product"
|
|
214
|
+
end
|
|
215
|
+
# resource path
|
|
216
|
+
local_var_path = '/product/{productId}'.sub('{' + 'productId' + '}', product_id.to_s)
|
|
217
|
+
|
|
218
|
+
# query parameters
|
|
219
|
+
query_params = opts[:query_params] || {}
|
|
220
|
+
|
|
221
|
+
# header parameters
|
|
222
|
+
header_params = opts[:header_params] || {}
|
|
223
|
+
# HTTP header 'Accept' (if needed)
|
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
225
|
+
|
|
226
|
+
# form parameters
|
|
227
|
+
form_params = opts[:form_params] || {}
|
|
228
|
+
|
|
229
|
+
# http body (model)
|
|
230
|
+
post_body = opts[:body]
|
|
231
|
+
|
|
232
|
+
return_type = opts[:return_type] || 'Product'
|
|
233
|
+
|
|
234
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
235
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
236
|
+
:header_params => header_params,
|
|
237
|
+
:query_params => query_params,
|
|
238
|
+
:form_params => form_params,
|
|
239
|
+
:body => post_body,
|
|
240
|
+
:auth_names => auth_names,
|
|
241
|
+
:return_type => return_type)
|
|
242
|
+
|
|
243
|
+
if @api_client.config.debugging
|
|
244
|
+
@api_client.config.logger.debug "API called: ProductsApi#update_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
245
|
+
end
|
|
246
|
+
return data, status_code, headers
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#BillaBear
|
|
3
|
+
|
|
4
|
+
#The REST API provided by BillaBear
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0.0
|
|
7
|
+
Contact: support@billabear.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.56
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module SwaggerClient
|
|
13
|
+
class ReceiptApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# Download Receipt
|
|
20
|
+
# Returns the pdf blob for the Receipt
|
|
21
|
+
# @param receipt The id of the receipt
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @return [String]
|
|
24
|
+
def download_receipt(receipt, opts = {})
|
|
25
|
+
data, _status_code, _headers = download_receipt_with_http_info(receipt, opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Download Receipt
|
|
30
|
+
# Returns the pdf blob for the Receipt
|
|
31
|
+
# @param receipt The id of the receipt
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
34
|
+
def download_receipt_with_http_info(receipt, opts = {})
|
|
35
|
+
if @api_client.config.debugging
|
|
36
|
+
@api_client.config.logger.debug 'Calling API: ReceiptApi.download_receipt ...'
|
|
37
|
+
end
|
|
38
|
+
# verify the required parameter 'receipt' is set
|
|
39
|
+
if @api_client.config.client_side_validation && receipt.nil?
|
|
40
|
+
fail ArgumentError, "Missing the required parameter 'receipt' when calling ReceiptApi.download_receipt"
|
|
41
|
+
end
|
|
42
|
+
# resource path
|
|
43
|
+
local_var_path = '/receipt/{receiptId}/download'.sub('{' + 'receipt' + '}', receipt.to_s)
|
|
44
|
+
|
|
45
|
+
# query parameters
|
|
46
|
+
query_params = opts[:query_params] || {}
|
|
47
|
+
|
|
48
|
+
# header parameters
|
|
49
|
+
header_params = opts[:header_params] || {}
|
|
50
|
+
# HTTP header 'Accept' (if needed)
|
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/pdf'])
|
|
52
|
+
|
|
53
|
+
# form parameters
|
|
54
|
+
form_params = opts[:form_params] || {}
|
|
55
|
+
|
|
56
|
+
# http body (model)
|
|
57
|
+
post_body = opts[:body]
|
|
58
|
+
|
|
59
|
+
return_type = opts[:return_type] || 'String'
|
|
60
|
+
|
|
61
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
62
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
63
|
+
:header_params => header_params,
|
|
64
|
+
:query_params => query_params,
|
|
65
|
+
:form_params => form_params,
|
|
66
|
+
:body => post_body,
|
|
67
|
+
:auth_names => auth_names,
|
|
68
|
+
:return_type => return_type)
|
|
69
|
+
|
|
70
|
+
if @api_client.config.debugging
|
|
71
|
+
@api_client.config.logger.debug "API called: ReceiptApi#download_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
72
|
+
end
|
|
73
|
+
return data, status_code, headers
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#BillaBear
|
|
3
|
+
|
|
4
|
+
#The REST API provided by BillaBear
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0.0
|
|
7
|
+
Contact: support@billabear.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.56
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module SwaggerClient
|
|
13
|
+
class RefundsApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# List Customer Refunds
|
|
20
|
+
# List Customer Refund
|
|
21
|
+
# @param customer_id The id of the customer to retrieve
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
24
|
+
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
25
|
+
# @option opts [String] :name The name to search for
|
|
26
|
+
# @return [InlineResponse2002]
|
|
27
|
+
def get_refunds_for_customer(customer_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = get_refunds_for_customer_with_http_info(customer_id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# List Customer Refunds
|
|
33
|
+
# List Customer Refund
|
|
34
|
+
# @param customer_id The id of the customer to retrieve
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
37
|
+
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
38
|
+
# @option opts [String] :name The name to search for
|
|
39
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
|
40
|
+
def get_refunds_for_customer_with_http_info(customer_id, opts = {})
|
|
41
|
+
if @api_client.config.debugging
|
|
42
|
+
@api_client.config.logger.debug 'Calling API: RefundsApi.get_refunds_for_customer ...'
|
|
43
|
+
end
|
|
44
|
+
# verify the required parameter 'customer_id' is set
|
|
45
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
46
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling RefundsApi.get_refunds_for_customer"
|
|
47
|
+
end
|
|
48
|
+
# resource path
|
|
49
|
+
local_var_path = '/customer/{customerId}/refund'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
50
|
+
|
|
51
|
+
# query parameters
|
|
52
|
+
query_params = opts[:query_params] || {}
|
|
53
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
54
|
+
query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
|
|
55
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = opts[:form_params] || {}
|
|
64
|
+
|
|
65
|
+
# http body (model)
|
|
66
|
+
post_body = opts[:body]
|
|
67
|
+
|
|
68
|
+
return_type = opts[:return_type] || 'InlineResponse2002'
|
|
69
|
+
|
|
70
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
71
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
72
|
+
:header_params => header_params,
|
|
73
|
+
:query_params => query_params,
|
|
74
|
+
:form_params => form_params,
|
|
75
|
+
:body => post_body,
|
|
76
|
+
:auth_names => auth_names,
|
|
77
|
+
:return_type => return_type)
|
|
78
|
+
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: RefundsApi#get_refunds_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
# List
|
|
85
|
+
# List all refund
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
88
|
+
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
89
|
+
# @option opts [String] :name The name to search for
|
|
90
|
+
# @return [InlineResponse2002]
|
|
91
|
+
def list_refund(opts = {})
|
|
92
|
+
data, _status_code, _headers = list_refund_with_http_info(opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# List
|
|
97
|
+
# List all refund
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
100
|
+
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
101
|
+
# @option opts [String] :name The name to search for
|
|
102
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
|
103
|
+
def list_refund_with_http_info(opts = {})
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug 'Calling API: RefundsApi.list_refund ...'
|
|
106
|
+
end
|
|
107
|
+
# resource path
|
|
108
|
+
local_var_path = '/refund'
|
|
109
|
+
|
|
110
|
+
# query parameters
|
|
111
|
+
query_params = opts[:query_params] || {}
|
|
112
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
113
|
+
query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
|
|
114
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
115
|
+
|
|
116
|
+
# header parameters
|
|
117
|
+
header_params = opts[:header_params] || {}
|
|
118
|
+
# HTTP header 'Accept' (if needed)
|
|
119
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
120
|
+
|
|
121
|
+
# form parameters
|
|
122
|
+
form_params = opts[:form_params] || {}
|
|
123
|
+
|
|
124
|
+
# http body (model)
|
|
125
|
+
post_body = opts[:body]
|
|
126
|
+
|
|
127
|
+
return_type = opts[:return_type] || 'InlineResponse2002'
|
|
128
|
+
|
|
129
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
130
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
131
|
+
:header_params => header_params,
|
|
132
|
+
:query_params => query_params,
|
|
133
|
+
:form_params => form_params,
|
|
134
|
+
:body => post_body,
|
|
135
|
+
:auth_names => auth_names,
|
|
136
|
+
:return_type => return_type)
|
|
137
|
+
|
|
138
|
+
if @api_client.config.debugging
|
|
139
|
+
@api_client.config.logger.debug "API called: RefundsApi#list_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
140
|
+
end
|
|
141
|
+
return data, status_code, headers
|
|
142
|
+
end
|
|
143
|
+
# Detail
|
|
144
|
+
# Info for a specific Refund
|
|
145
|
+
# @param refund_id The id of the refund
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @return [Refund]
|
|
148
|
+
def show_refund_by_id(refund_id, opts = {})
|
|
149
|
+
data, _status_code, _headers = show_refund_by_id_with_http_info(refund_id, opts)
|
|
150
|
+
data
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Detail
|
|
154
|
+
# Info for a specific Refund
|
|
155
|
+
# @param refund_id The id of the refund
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @return [Array<(Refund, Integer, Hash)>] Refund data, response status code and response headers
|
|
158
|
+
def show_refund_by_id_with_http_info(refund_id, opts = {})
|
|
159
|
+
if @api_client.config.debugging
|
|
160
|
+
@api_client.config.logger.debug 'Calling API: RefundsApi.show_refund_by_id ...'
|
|
161
|
+
end
|
|
162
|
+
# verify the required parameter 'refund_id' is set
|
|
163
|
+
if @api_client.config.client_side_validation && refund_id.nil?
|
|
164
|
+
fail ArgumentError, "Missing the required parameter 'refund_id' when calling RefundsApi.show_refund_by_id"
|
|
165
|
+
end
|
|
166
|
+
# resource path
|
|
167
|
+
local_var_path = '/refund/{refundId}'.sub('{' + 'refundId' + '}', refund_id.to_s)
|
|
168
|
+
|
|
169
|
+
# query parameters
|
|
170
|
+
query_params = opts[:query_params] || {}
|
|
171
|
+
|
|
172
|
+
# header parameters
|
|
173
|
+
header_params = opts[:header_params] || {}
|
|
174
|
+
# HTTP header 'Accept' (if needed)
|
|
175
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
176
|
+
|
|
177
|
+
# form parameters
|
|
178
|
+
form_params = opts[:form_params] || {}
|
|
179
|
+
|
|
180
|
+
# http body (model)
|
|
181
|
+
post_body = opts[:body]
|
|
182
|
+
|
|
183
|
+
return_type = opts[:return_type] || 'Refund'
|
|
184
|
+
|
|
185
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
186
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
187
|
+
:header_params => header_params,
|
|
188
|
+
:query_params => query_params,
|
|
189
|
+
:form_params => form_params,
|
|
190
|
+
:body => post_body,
|
|
191
|
+
:auth_names => auth_names,
|
|
192
|
+
:return_type => return_type)
|
|
193
|
+
|
|
194
|
+
if @api_client.config.debugging
|
|
195
|
+
@api_client.config.logger.debug "API called: RefundsApi#show_refund_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
196
|
+
end
|
|
197
|
+
return data, status_code, headers
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|