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,188 @@
|
|
|
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 InvoicesApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# Charge Invoice
|
|
20
|
+
# Attempts to charge a card that is on file for the invoice amount
|
|
21
|
+
# @param invoice_id The id of the invoice
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @return [InlineResponse20012]
|
|
24
|
+
def charge_invoice(invoice_id, opts = {})
|
|
25
|
+
data, _status_code, _headers = charge_invoice_with_http_info(invoice_id, opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Charge Invoice
|
|
30
|
+
# Attempts to charge a card that is on file for the invoice amount
|
|
31
|
+
# @param invoice_id The id of the invoice
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers
|
|
34
|
+
def charge_invoice_with_http_info(invoice_id, opts = {})
|
|
35
|
+
if @api_client.config.debugging
|
|
36
|
+
@api_client.config.logger.debug 'Calling API: InvoicesApi.charge_invoice ...'
|
|
37
|
+
end
|
|
38
|
+
# verify the required parameter 'invoice_id' is set
|
|
39
|
+
if @api_client.config.client_side_validation && invoice_id.nil?
|
|
40
|
+
fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.charge_invoice"
|
|
41
|
+
end
|
|
42
|
+
# resource path
|
|
43
|
+
local_var_path = '/invoice/{invoiceId}/charge'.sub('{' + 'invoiceId' + '}', invoice_id.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/json'])
|
|
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] || 'InlineResponse20012'
|
|
60
|
+
|
|
61
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
62
|
+
data, status_code, headers = @api_client.call_api(:POST, 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: InvoicesApi#charge_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
72
|
+
end
|
|
73
|
+
return data, status_code, headers
|
|
74
|
+
end
|
|
75
|
+
# Download Invoice
|
|
76
|
+
# Returns the pdf blob for the invoice
|
|
77
|
+
# @param invoice_id The id of the invoice
|
|
78
|
+
# @param [Hash] opts the optional parameters
|
|
79
|
+
# @return [String]
|
|
80
|
+
def download_invoice(invoice_id, opts = {})
|
|
81
|
+
data, _status_code, _headers = download_invoice_with_http_info(invoice_id, opts)
|
|
82
|
+
data
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Download Invoice
|
|
86
|
+
# Returns the pdf blob for the invoice
|
|
87
|
+
# @param invoice_id The id of the invoice
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
90
|
+
def download_invoice_with_http_info(invoice_id, opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: InvoicesApi.download_invoice ...'
|
|
93
|
+
end
|
|
94
|
+
# verify the required parameter 'invoice_id' is set
|
|
95
|
+
if @api_client.config.client_side_validation && invoice_id.nil?
|
|
96
|
+
fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.download_invoice"
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/invoice/{invoiceId}/download'.sub('{' + 'invoiceId' + '}', invoice_id.to_s)
|
|
100
|
+
|
|
101
|
+
# query parameters
|
|
102
|
+
query_params = opts[:query_params] || {}
|
|
103
|
+
|
|
104
|
+
# header parameters
|
|
105
|
+
header_params = opts[:header_params] || {}
|
|
106
|
+
# HTTP header 'Accept' (if needed)
|
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/pdf'])
|
|
108
|
+
|
|
109
|
+
# form parameters
|
|
110
|
+
form_params = opts[:form_params] || {}
|
|
111
|
+
|
|
112
|
+
# http body (model)
|
|
113
|
+
post_body = opts[:body]
|
|
114
|
+
|
|
115
|
+
return_type = opts[:return_type] || 'String'
|
|
116
|
+
|
|
117
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
118
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
119
|
+
:header_params => header_params,
|
|
120
|
+
:query_params => query_params,
|
|
121
|
+
:form_params => form_params,
|
|
122
|
+
:body => post_body,
|
|
123
|
+
:auth_names => auth_names,
|
|
124
|
+
:return_type => return_type)
|
|
125
|
+
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug "API called: InvoicesApi#download_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
# List Customer Invoices
|
|
132
|
+
# List Customer Invoices
|
|
133
|
+
# @param customer_id The id of the customer to retrieve
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @return [InlineResponse2004]
|
|
136
|
+
def get_invoices_for_customer(customer_id, opts = {})
|
|
137
|
+
data, _status_code, _headers = get_invoices_for_customer_with_http_info(customer_id, opts)
|
|
138
|
+
data
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# List Customer Invoices
|
|
142
|
+
# List Customer Invoices
|
|
143
|
+
# @param customer_id The id of the customer to retrieve
|
|
144
|
+
# @param [Hash] opts the optional parameters
|
|
145
|
+
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
|
146
|
+
def get_invoices_for_customer_with_http_info(customer_id, opts = {})
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug 'Calling API: InvoicesApi.get_invoices_for_customer ...'
|
|
149
|
+
end
|
|
150
|
+
# verify the required parameter 'customer_id' is set
|
|
151
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
152
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling InvoicesApi.get_invoices_for_customer"
|
|
153
|
+
end
|
|
154
|
+
# resource path
|
|
155
|
+
local_var_path = '/customer/{customerId}/invoices'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
156
|
+
|
|
157
|
+
# query parameters
|
|
158
|
+
query_params = opts[:query_params] || {}
|
|
159
|
+
|
|
160
|
+
# header parameters
|
|
161
|
+
header_params = opts[:header_params] || {}
|
|
162
|
+
# HTTP header 'Accept' (if needed)
|
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
164
|
+
|
|
165
|
+
# form parameters
|
|
166
|
+
form_params = opts[:form_params] || {}
|
|
167
|
+
|
|
168
|
+
# http body (model)
|
|
169
|
+
post_body = opts[:body]
|
|
170
|
+
|
|
171
|
+
return_type = opts[:return_type] || 'InlineResponse2004'
|
|
172
|
+
|
|
173
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
174
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
175
|
+
:header_params => header_params,
|
|
176
|
+
:query_params => query_params,
|
|
177
|
+
:form_params => form_params,
|
|
178
|
+
:body => post_body,
|
|
179
|
+
:auth_names => auth_names,
|
|
180
|
+
:return_type => return_type)
|
|
181
|
+
|
|
182
|
+
if @api_client.config.debugging
|
|
183
|
+
@api_client.config.logger.debug "API called: InvoicesApi#get_invoices_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
184
|
+
end
|
|
185
|
+
return data, status_code, headers
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,494 @@
|
|
|
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 PaymentDetailsApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# Complete Frontend Detail Collection
|
|
20
|
+
# Complete frontend payment details
|
|
21
|
+
# @param body
|
|
22
|
+
# @param customer_id The id of the customer to retrieve
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [PaymentDetails]
|
|
25
|
+
def complete_frontend_payment_details(body, customer_id, opts = {})
|
|
26
|
+
data, _status_code, _headers = complete_frontend_payment_details_with_http_info(body, customer_id, opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Complete Frontend Detail Collection
|
|
31
|
+
# Complete frontend payment details
|
|
32
|
+
# @param body
|
|
33
|
+
# @param customer_id The id of the customer to retrieve
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @return [Array<(PaymentDetails, Integer, Hash)>] PaymentDetails data, response status code and response headers
|
|
36
|
+
def complete_frontend_payment_details_with_http_info(body, customer_id, opts = {})
|
|
37
|
+
if @api_client.config.debugging
|
|
38
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.complete_frontend_payment_details ...'
|
|
39
|
+
end
|
|
40
|
+
# verify the required parameter 'body' is set
|
|
41
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
42
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PaymentDetailsApi.complete_frontend_payment_details"
|
|
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 PaymentDetailsApi.complete_frontend_payment_details"
|
|
47
|
+
end
|
|
48
|
+
# resource path
|
|
49
|
+
local_var_path = '/customer/{customerId}/payment-methods/frontend-payment-token'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
50
|
+
|
|
51
|
+
# query parameters
|
|
52
|
+
query_params = opts[:query_params] || {}
|
|
53
|
+
|
|
54
|
+
# header parameters
|
|
55
|
+
header_params = opts[:header_params] || {}
|
|
56
|
+
# HTTP header 'Accept' (if needed)
|
|
57
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
58
|
+
# HTTP header 'Content-Type'
|
|
59
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
66
|
+
|
|
67
|
+
return_type = opts[:return_type] || 'PaymentDetails'
|
|
68
|
+
|
|
69
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type)
|
|
77
|
+
|
|
78
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#complete_frontend_payment_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
# Delete
|
|
84
|
+
# Delete Payment Details
|
|
85
|
+
# @param payment_details_id The id of the payment details
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [String]
|
|
88
|
+
def delete_payment_details(payment_details_id, opts = {})
|
|
89
|
+
data, _status_code, _headers = delete_payment_details_with_http_info(payment_details_id, opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Delete
|
|
94
|
+
# Delete Payment Details
|
|
95
|
+
# @param payment_details_id The id of the payment details
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
98
|
+
def delete_payment_details_with_http_info(payment_details_id, opts = {})
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.delete_payment_details ...'
|
|
101
|
+
end
|
|
102
|
+
# verify the required parameter 'payment_details_id' is set
|
|
103
|
+
if @api_client.config.client_side_validation && payment_details_id.nil?
|
|
104
|
+
fail ArgumentError, "Missing the required parameter 'payment_details_id' when calling PaymentDetailsApi.delete_payment_details"
|
|
105
|
+
end
|
|
106
|
+
# resource path
|
|
107
|
+
local_var_path = '/payment-methods/{paymentDetailsId}'.sub('{' + 'paymentDetailsId' + '}', payment_details_id.to_s)
|
|
108
|
+
|
|
109
|
+
# query parameters
|
|
110
|
+
query_params = opts[:query_params] || {}
|
|
111
|
+
|
|
112
|
+
# header parameters
|
|
113
|
+
header_params = opts[:header_params] || {}
|
|
114
|
+
# HTTP header 'Accept' (if needed)
|
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:body]
|
|
122
|
+
|
|
123
|
+
return_type = opts[:return_type] || 'String'
|
|
124
|
+
|
|
125
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
126
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => return_type)
|
|
133
|
+
|
|
134
|
+
if @api_client.config.debugging
|
|
135
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#delete_payment_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
136
|
+
end
|
|
137
|
+
return data, status_code, headers
|
|
138
|
+
end
|
|
139
|
+
# Delete With Customer
|
|
140
|
+
# Delete Payment Details
|
|
141
|
+
# @param customer_id The id of the customer to retrieve
|
|
142
|
+
# @param payment_details_id The id of the payment details
|
|
143
|
+
# @param [Hash] opts the optional parameters
|
|
144
|
+
# @return [String]
|
|
145
|
+
def delete_payment_details_customer(customer_id, payment_details_id, opts = {})
|
|
146
|
+
data, _status_code, _headers = delete_payment_details_customer_with_http_info(customer_id, payment_details_id, opts)
|
|
147
|
+
data
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Delete With Customer
|
|
151
|
+
# Delete Payment Details
|
|
152
|
+
# @param customer_id The id of the customer to retrieve
|
|
153
|
+
# @param payment_details_id The id of the payment details
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
156
|
+
def delete_payment_details_customer_with_http_info(customer_id, payment_details_id, opts = {})
|
|
157
|
+
if @api_client.config.debugging
|
|
158
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.delete_payment_details_customer ...'
|
|
159
|
+
end
|
|
160
|
+
# verify the required parameter 'customer_id' is set
|
|
161
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
162
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling PaymentDetailsApi.delete_payment_details_customer"
|
|
163
|
+
end
|
|
164
|
+
# verify the required parameter 'payment_details_id' is set
|
|
165
|
+
if @api_client.config.client_side_validation && payment_details_id.nil?
|
|
166
|
+
fail ArgumentError, "Missing the required parameter 'payment_details_id' when calling PaymentDetailsApi.delete_payment_details_customer"
|
|
167
|
+
end
|
|
168
|
+
# resource path
|
|
169
|
+
local_var_path = '/customer/{customerId}/payment-methods/{paymentDetailsId}'.sub('{' + 'customerId' + '}', customer_id.to_s).sub('{' + 'paymentDetailsId' + '}', payment_details_id.to_s)
|
|
170
|
+
|
|
171
|
+
# query parameters
|
|
172
|
+
query_params = opts[:query_params] || {}
|
|
173
|
+
|
|
174
|
+
# header parameters
|
|
175
|
+
header_params = opts[:header_params] || {}
|
|
176
|
+
# HTTP header 'Accept' (if needed)
|
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
178
|
+
|
|
179
|
+
# form parameters
|
|
180
|
+
form_params = opts[:form_params] || {}
|
|
181
|
+
|
|
182
|
+
# http body (model)
|
|
183
|
+
post_body = opts[:body]
|
|
184
|
+
|
|
185
|
+
return_type = opts[:return_type] || 'String'
|
|
186
|
+
|
|
187
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
188
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
189
|
+
:header_params => header_params,
|
|
190
|
+
:query_params => query_params,
|
|
191
|
+
:form_params => form_params,
|
|
192
|
+
:body => post_body,
|
|
193
|
+
:auth_names => auth_names,
|
|
194
|
+
:return_type => return_type)
|
|
195
|
+
|
|
196
|
+
if @api_client.config.debugging
|
|
197
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#delete_payment_details_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
198
|
+
end
|
|
199
|
+
return data, status_code, headers
|
|
200
|
+
end
|
|
201
|
+
# Fetch
|
|
202
|
+
# Fetch the payment cards
|
|
203
|
+
# @param payment_details_id The id of the payment details
|
|
204
|
+
# @param [Hash] opts the optional parameters
|
|
205
|
+
# @return [PaymentDetails]
|
|
206
|
+
def get_payment_details(payment_details_id, opts = {})
|
|
207
|
+
data, _status_code, _headers = get_payment_details_with_http_info(payment_details_id, opts)
|
|
208
|
+
data
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Fetch
|
|
212
|
+
# Fetch the payment cards
|
|
213
|
+
# @param payment_details_id The id of the payment details
|
|
214
|
+
# @param [Hash] opts the optional parameters
|
|
215
|
+
# @return [Array<(PaymentDetails, Integer, Hash)>] PaymentDetails data, response status code and response headers
|
|
216
|
+
def get_payment_details_with_http_info(payment_details_id, opts = {})
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.get_payment_details ...'
|
|
219
|
+
end
|
|
220
|
+
# verify the required parameter 'payment_details_id' is set
|
|
221
|
+
if @api_client.config.client_side_validation && payment_details_id.nil?
|
|
222
|
+
fail ArgumentError, "Missing the required parameter 'payment_details_id' when calling PaymentDetailsApi.get_payment_details"
|
|
223
|
+
end
|
|
224
|
+
# resource path
|
|
225
|
+
local_var_path = '/payment-methods/{paymentDetailsId}'.sub('{' + 'paymentDetailsId' + '}', payment_details_id.to_s)
|
|
226
|
+
|
|
227
|
+
# query parameters
|
|
228
|
+
query_params = opts[:query_params] || {}
|
|
229
|
+
|
|
230
|
+
# header parameters
|
|
231
|
+
header_params = opts[:header_params] || {}
|
|
232
|
+
# HTTP header 'Accept' (if needed)
|
|
233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
234
|
+
|
|
235
|
+
# form parameters
|
|
236
|
+
form_params = opts[:form_params] || {}
|
|
237
|
+
|
|
238
|
+
# http body (model)
|
|
239
|
+
post_body = opts[:body]
|
|
240
|
+
|
|
241
|
+
return_type = opts[:return_type] || 'PaymentDetails'
|
|
242
|
+
|
|
243
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
244
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
245
|
+
:header_params => header_params,
|
|
246
|
+
:query_params => query_params,
|
|
247
|
+
:form_params => form_params,
|
|
248
|
+
:body => post_body,
|
|
249
|
+
:auth_names => auth_names,
|
|
250
|
+
:return_type => return_type)
|
|
251
|
+
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#get_payment_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
254
|
+
end
|
|
255
|
+
return data, status_code, headers
|
|
256
|
+
end
|
|
257
|
+
# List Customer's Payment Details
|
|
258
|
+
# List all customers <br><br>Added in version 1.1
|
|
259
|
+
# @param customer_id The id of the customer to retrieve
|
|
260
|
+
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @return [InlineResponse2005]
|
|
262
|
+
def list_payment_details(customer_id, opts = {})
|
|
263
|
+
data, _status_code, _headers = list_payment_details_with_http_info(customer_id, opts)
|
|
264
|
+
data
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# List Customer's Payment Details
|
|
268
|
+
# List all customers <br><br>Added in version 1.1
|
|
269
|
+
# @param customer_id The id of the customer to retrieve
|
|
270
|
+
# @param [Hash] opts the optional parameters
|
|
271
|
+
# @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
|
|
272
|
+
def list_payment_details_with_http_info(customer_id, opts = {})
|
|
273
|
+
if @api_client.config.debugging
|
|
274
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.list_payment_details ...'
|
|
275
|
+
end
|
|
276
|
+
# verify the required parameter 'customer_id' is set
|
|
277
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
278
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling PaymentDetailsApi.list_payment_details"
|
|
279
|
+
end
|
|
280
|
+
# resource path
|
|
281
|
+
local_var_path = '/customer/{customerId}/payment-methods'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
282
|
+
|
|
283
|
+
# query parameters
|
|
284
|
+
query_params = opts[:query_params] || {}
|
|
285
|
+
|
|
286
|
+
# header parameters
|
|
287
|
+
header_params = opts[:header_params] || {}
|
|
288
|
+
# HTTP header 'Accept' (if needed)
|
|
289
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
290
|
+
|
|
291
|
+
# form parameters
|
|
292
|
+
form_params = opts[:form_params] || {}
|
|
293
|
+
|
|
294
|
+
# http body (model)
|
|
295
|
+
post_body = opts[:body]
|
|
296
|
+
|
|
297
|
+
return_type = opts[:return_type] || 'InlineResponse2005'
|
|
298
|
+
|
|
299
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
300
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
301
|
+
:header_params => header_params,
|
|
302
|
+
:query_params => query_params,
|
|
303
|
+
:form_params => form_params,
|
|
304
|
+
:body => post_body,
|
|
305
|
+
:auth_names => auth_names,
|
|
306
|
+
:return_type => return_type)
|
|
307
|
+
|
|
308
|
+
if @api_client.config.debugging
|
|
309
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#list_payment_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
310
|
+
end
|
|
311
|
+
return data, status_code, headers
|
|
312
|
+
end
|
|
313
|
+
# Make Default
|
|
314
|
+
# Delete Payment Details
|
|
315
|
+
# @param customer_id The id of the customer to retrieve
|
|
316
|
+
# @param payment_details_id The id of the payment details
|
|
317
|
+
# @param [Hash] opts the optional parameters
|
|
318
|
+
# @return [String]
|
|
319
|
+
def make_default_payment_details(customer_id, payment_details_id, opts = {})
|
|
320
|
+
data, _status_code, _headers = make_default_payment_details_with_http_info(customer_id, payment_details_id, opts)
|
|
321
|
+
data
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Make Default
|
|
325
|
+
# Delete Payment Details
|
|
326
|
+
# @param customer_id The id of the customer to retrieve
|
|
327
|
+
# @param payment_details_id The id of the payment details
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
330
|
+
def make_default_payment_details_with_http_info(customer_id, payment_details_id, opts = {})
|
|
331
|
+
if @api_client.config.debugging
|
|
332
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.make_default_payment_details ...'
|
|
333
|
+
end
|
|
334
|
+
# verify the required parameter 'customer_id' is set
|
|
335
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
336
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling PaymentDetailsApi.make_default_payment_details"
|
|
337
|
+
end
|
|
338
|
+
# verify the required parameter 'payment_details_id' is set
|
|
339
|
+
if @api_client.config.client_side_validation && payment_details_id.nil?
|
|
340
|
+
fail ArgumentError, "Missing the required parameter 'payment_details_id' when calling PaymentDetailsApi.make_default_payment_details"
|
|
341
|
+
end
|
|
342
|
+
# resource path
|
|
343
|
+
local_var_path = '/payment-methods/{paymentDetailsId}/default'.sub('{' + 'customerId' + '}', customer_id.to_s).sub('{' + 'paymentDetailsId' + '}', payment_details_id.to_s)
|
|
344
|
+
|
|
345
|
+
# query parameters
|
|
346
|
+
query_params = opts[:query_params] || {}
|
|
347
|
+
|
|
348
|
+
# header parameters
|
|
349
|
+
header_params = opts[:header_params] || {}
|
|
350
|
+
# HTTP header 'Accept' (if needed)
|
|
351
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
352
|
+
|
|
353
|
+
# form parameters
|
|
354
|
+
form_params = opts[:form_params] || {}
|
|
355
|
+
|
|
356
|
+
# http body (model)
|
|
357
|
+
post_body = opts[:body]
|
|
358
|
+
|
|
359
|
+
return_type = opts[:return_type] || 'String'
|
|
360
|
+
|
|
361
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
362
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
363
|
+
:header_params => header_params,
|
|
364
|
+
:query_params => query_params,
|
|
365
|
+
:form_params => form_params,
|
|
366
|
+
:body => post_body,
|
|
367
|
+
:auth_names => auth_names,
|
|
368
|
+
:return_type => return_type)
|
|
369
|
+
|
|
370
|
+
if @api_client.config.debugging
|
|
371
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#make_default_payment_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
372
|
+
end
|
|
373
|
+
return data, status_code, headers
|
|
374
|
+
end
|
|
375
|
+
# Make Default With Customer
|
|
376
|
+
# Delete Payment Details
|
|
377
|
+
# @param customer_id The id of the customer to retrieve
|
|
378
|
+
# @param payment_details_id The id of the payment details
|
|
379
|
+
# @param [Hash] opts the optional parameters
|
|
380
|
+
# @return [String]
|
|
381
|
+
def make_default_payment_details_customer(customer_id, payment_details_id, opts = {})
|
|
382
|
+
data, _status_code, _headers = make_default_payment_details_customer_with_http_info(customer_id, payment_details_id, opts)
|
|
383
|
+
data
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Make Default With Customer
|
|
387
|
+
# Delete Payment Details
|
|
388
|
+
# @param customer_id The id of the customer to retrieve
|
|
389
|
+
# @param payment_details_id The id of the payment details
|
|
390
|
+
# @param [Hash] opts the optional parameters
|
|
391
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
392
|
+
def make_default_payment_details_customer_with_http_info(customer_id, payment_details_id, opts = {})
|
|
393
|
+
if @api_client.config.debugging
|
|
394
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.make_default_payment_details_customer ...'
|
|
395
|
+
end
|
|
396
|
+
# verify the required parameter 'customer_id' is set
|
|
397
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
398
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling PaymentDetailsApi.make_default_payment_details_customer"
|
|
399
|
+
end
|
|
400
|
+
# verify the required parameter 'payment_details_id' is set
|
|
401
|
+
if @api_client.config.client_side_validation && payment_details_id.nil?
|
|
402
|
+
fail ArgumentError, "Missing the required parameter 'payment_details_id' when calling PaymentDetailsApi.make_default_payment_details_customer"
|
|
403
|
+
end
|
|
404
|
+
# resource path
|
|
405
|
+
local_var_path = '/customer/{customerId}/payment-methods/{paymentDetailsId}/default'.sub('{' + 'customerId' + '}', customer_id.to_s).sub('{' + 'paymentDetailsId' + '}', payment_details_id.to_s)
|
|
406
|
+
|
|
407
|
+
# query parameters
|
|
408
|
+
query_params = opts[:query_params] || {}
|
|
409
|
+
|
|
410
|
+
# header parameters
|
|
411
|
+
header_params = opts[:header_params] || {}
|
|
412
|
+
# HTTP header 'Accept' (if needed)
|
|
413
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
414
|
+
|
|
415
|
+
# form parameters
|
|
416
|
+
form_params = opts[:form_params] || {}
|
|
417
|
+
|
|
418
|
+
# http body (model)
|
|
419
|
+
post_body = opts[:body]
|
|
420
|
+
|
|
421
|
+
return_type = opts[:return_type] || 'String'
|
|
422
|
+
|
|
423
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
424
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
425
|
+
:header_params => header_params,
|
|
426
|
+
:query_params => query_params,
|
|
427
|
+
:form_params => form_params,
|
|
428
|
+
:body => post_body,
|
|
429
|
+
:auth_names => auth_names,
|
|
430
|
+
:return_type => return_type)
|
|
431
|
+
|
|
432
|
+
if @api_client.config.debugging
|
|
433
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#make_default_payment_details_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
434
|
+
end
|
|
435
|
+
return data, status_code, headers
|
|
436
|
+
end
|
|
437
|
+
# Start Frontend Detail Collection
|
|
438
|
+
# Start frontend payment details
|
|
439
|
+
# @param customer_id The id of the customer to retrieve
|
|
440
|
+
# @param [Hash] opts the optional parameters
|
|
441
|
+
# @return [FrontendToken]
|
|
442
|
+
def start_frontend_payment_details(customer_id, opts = {})
|
|
443
|
+
data, _status_code, _headers = start_frontend_payment_details_with_http_info(customer_id, opts)
|
|
444
|
+
data
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
# Start Frontend Detail Collection
|
|
448
|
+
# Start frontend payment details
|
|
449
|
+
# @param customer_id The id of the customer to retrieve
|
|
450
|
+
# @param [Hash] opts the optional parameters
|
|
451
|
+
# @return [Array<(FrontendToken, Integer, Hash)>] FrontendToken data, response status code and response headers
|
|
452
|
+
def start_frontend_payment_details_with_http_info(customer_id, opts = {})
|
|
453
|
+
if @api_client.config.debugging
|
|
454
|
+
@api_client.config.logger.debug 'Calling API: PaymentDetailsApi.start_frontend_payment_details ...'
|
|
455
|
+
end
|
|
456
|
+
# verify the required parameter 'customer_id' is set
|
|
457
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
458
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling PaymentDetailsApi.start_frontend_payment_details"
|
|
459
|
+
end
|
|
460
|
+
# resource path
|
|
461
|
+
local_var_path = '/customer/{customerId}/payment-methods/frontend-payment-token'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
462
|
+
|
|
463
|
+
# query parameters
|
|
464
|
+
query_params = opts[:query_params] || {}
|
|
465
|
+
|
|
466
|
+
# header parameters
|
|
467
|
+
header_params = opts[:header_params] || {}
|
|
468
|
+
# HTTP header 'Accept' (if needed)
|
|
469
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
470
|
+
|
|
471
|
+
# form parameters
|
|
472
|
+
form_params = opts[:form_params] || {}
|
|
473
|
+
|
|
474
|
+
# http body (model)
|
|
475
|
+
post_body = opts[:body]
|
|
476
|
+
|
|
477
|
+
return_type = opts[:return_type] || 'FrontendToken'
|
|
478
|
+
|
|
479
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
480
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
481
|
+
:header_params => header_params,
|
|
482
|
+
:query_params => query_params,
|
|
483
|
+
:form_params => form_params,
|
|
484
|
+
:body => post_body,
|
|
485
|
+
:auth_names => auth_names,
|
|
486
|
+
:return_type => return_type)
|
|
487
|
+
|
|
488
|
+
if @api_client.config.debugging
|
|
489
|
+
@api_client.config.logger.debug "API called: PaymentDetailsApi#start_frontend_payment_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
490
|
+
end
|
|
491
|
+
return data, status_code, headers
|
|
492
|
+
end
|
|
493
|
+
end
|
|
494
|
+
end
|