ultracart_api 4.1.19 → 4.1.20
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 +4 -4
- data/README.md +10 -10
- data/docs/CustomDashboardSchedule.md +26 -0
- data/docs/{ChargebackDisputeResponse.md → CustomDashboardScheduleResponse.md} +4 -4
- data/docs/{ChargebackDisputesResponse.md → CustomDashboardSchedulesResponse.md} +4 -4
- data/docs/CustomReport.md +2 -0
- data/docs/DatawarehouseApi.md +220 -0
- data/docs/EmailCampaign.md +4 -0
- data/lib/ultracart_api/api/datawarehouse_api.rb +290 -0
- data/lib/ultracart_api/models/custom_dashboard_schedule.rb +258 -0
- data/lib/ultracart_api/models/{chargeback_dispute_response.rb → custom_dashboard_schedule_response.rb} +13 -13
- data/lib/ultracart_api/models/{chargeback_disputes_response.rb → custom_dashboard_schedules_response.rb} +16 -15
- data/lib/ultracart_api/models/custom_report.rb +10 -1
- data/lib/ultracart_api/models/email_campaign.rb +21 -1
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -4
- metadata +8 -10
- data/docs/ChargebackApi.md +0 -297
- data/docs/ChargebackDispute.md +0 -62
- data/lib/ultracart_api/api/chargeback_api.rb +0 -410
- data/lib/ultracart_api/models/chargeback_dispute.rb +0 -649
data/docs/ChargebackDispute.md
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
# UltracartClient::ChargebackDispute
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **account_number** | **String** | Account number | [optional] |
|
8
|
-
| **adjustment_request_text** | **String** | Adjustment request text | [optional] |
|
9
|
-
| **amount** | **Float** | Amount | [optional] |
|
10
|
-
| **auth_code** | **String** | Auth code | [optional] |
|
11
|
-
| **case_number** | **String** | Case number | [optional] |
|
12
|
-
| **chargeback_dispute_oid** | **Integer** | Chargeback Dispute Oid | [optional] |
|
13
|
-
| **chargeback_dts** | **String** | Chargeback dts | [optional] |
|
14
|
-
| **currency** | **String** | Currency | [optional] |
|
15
|
-
| **customer_care_notes** | **String** | Customer care notes | [optional] |
|
16
|
-
| **encryption_key** | **String** | Encryption key | [optional] |
|
17
|
-
| **expiration_dts** | **String** | Expiration Dts | [optional] |
|
18
|
-
| **fax_failure_reason** | **String** | Fax failure reason | [optional] |
|
19
|
-
| **fax_number** | **String** | Fax number | [optional] |
|
20
|
-
| **fax_transaction_id** | **Integer** | Fax transaction id | [optional] |
|
21
|
-
| **icsid** | **String** | icsid | [optional] |
|
22
|
-
| **merchant_account_profile_oid** | **Integer** | Merchant account profile oid | [optional] |
|
23
|
-
| **order** | [**Order**](Order.md) | | [optional] |
|
24
|
-
| **order_id** | **String** | Order Id | [optional] |
|
25
|
-
| **partial_card_number** | **String** | Partial card number | [optional] |
|
26
|
-
| **pdf_file_oid** | **String** | PDF file oid | [optional] |
|
27
|
-
| **reason_code** | **String** | Reason code | [optional] |
|
28
|
-
| **status** | **String** | Status | [optional] |
|
29
|
-
| **website_url** | **String** | Website URL | [optional] |
|
30
|
-
|
31
|
-
## Example
|
32
|
-
|
33
|
-
```ruby
|
34
|
-
require 'ultracart_api'
|
35
|
-
|
36
|
-
instance = UltracartClient::ChargebackDispute.new(
|
37
|
-
account_number: null,
|
38
|
-
adjustment_request_text: null,
|
39
|
-
amount: null,
|
40
|
-
auth_code: null,
|
41
|
-
case_number: null,
|
42
|
-
chargeback_dispute_oid: null,
|
43
|
-
chargeback_dts: null,
|
44
|
-
currency: null,
|
45
|
-
customer_care_notes: null,
|
46
|
-
encryption_key: null,
|
47
|
-
expiration_dts: null,
|
48
|
-
fax_failure_reason: null,
|
49
|
-
fax_number: null,
|
50
|
-
fax_transaction_id: null,
|
51
|
-
icsid: null,
|
52
|
-
merchant_account_profile_oid: null,
|
53
|
-
order: null,
|
54
|
-
order_id: null,
|
55
|
-
partial_card_number: null,
|
56
|
-
pdf_file_oid: null,
|
57
|
-
reason_code: null,
|
58
|
-
status: null,
|
59
|
-
website_url: null
|
60
|
-
)
|
61
|
-
```
|
62
|
-
|
@@ -1,410 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#UltraCart Rest API V2
|
3
|
-
|
4
|
-
#UltraCart REST API Version 2
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 2.0.0
|
7
|
-
Contact: support@ultracart.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module UltracartClient
|
16
|
-
class ChargebackApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
|
24
|
-
api_config = Configuration.new
|
25
|
-
api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
|
26
|
-
api_config.api_version = '2017-03-01'
|
27
|
-
api_config.verify_ssl = verify_ssl
|
28
|
-
|
29
|
-
api_client = ApiClient.new(api_config)
|
30
|
-
api_client.config.debugging = debugging
|
31
|
-
|
32
|
-
UltracartClient::ChargebackApi.new(api_client)
|
33
|
-
end
|
34
|
-
|
35
|
-
# Delete a chargeback
|
36
|
-
# Delete a chargeback on the UltraCart account.
|
37
|
-
# @param chargeback_dispute_oid [Integer] The chargeback_dispute_oid to delete.
|
38
|
-
# @param [Hash] opts the optional parameters
|
39
|
-
# @return [ChargebackDisputeResponse]
|
40
|
-
def delete_chargeback(chargeback_dispute_oid, opts = {})
|
41
|
-
data, _status_code, _headers = delete_chargeback_with_http_info(chargeback_dispute_oid, opts)
|
42
|
-
data
|
43
|
-
end
|
44
|
-
|
45
|
-
# Delete a chargeback
|
46
|
-
# Delete a chargeback on the UltraCart account.
|
47
|
-
# @param chargeback_dispute_oid [Integer] The chargeback_dispute_oid to delete.
|
48
|
-
# @param [Hash] opts the optional parameters
|
49
|
-
# @return [Array<(ChargebackDisputeResponse, Integer, Hash)>] ChargebackDisputeResponse data, response status code and response headers
|
50
|
-
def delete_chargeback_with_http_info(chargeback_dispute_oid, opts = {})
|
51
|
-
if @api_client.config.debugging
|
52
|
-
@api_client.config.logger.debug 'Calling API: ChargebackApi.delete_chargeback ...'
|
53
|
-
end
|
54
|
-
# verify the required parameter 'chargeback_dispute_oid' is set
|
55
|
-
if @api_client.config.client_side_validation && chargeback_dispute_oid.nil?
|
56
|
-
fail ArgumentError, "Missing the required parameter 'chargeback_dispute_oid' when calling ChargebackApi.delete_chargeback"
|
57
|
-
end
|
58
|
-
# resource path
|
59
|
-
local_var_path = '/chargeback/chargebacks/{chargeback_dispute_oid}'.sub('{' + 'chargeback_dispute_oid' + '}', CGI.escape(chargeback_dispute_oid.to_s))
|
60
|
-
|
61
|
-
# query parameters
|
62
|
-
query_params = opts[:query_params] || {}
|
63
|
-
|
64
|
-
# header parameters
|
65
|
-
header_params = opts[:header_params] || {}
|
66
|
-
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
67
|
-
# HTTP header 'Accept' (if needed)
|
68
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
69
|
-
|
70
|
-
# form parameters
|
71
|
-
form_params = opts[:form_params] || {}
|
72
|
-
|
73
|
-
# http body (model)
|
74
|
-
post_body = opts[:debug_body]
|
75
|
-
|
76
|
-
# return_type
|
77
|
-
return_type = opts[:debug_return_type] || 'ChargebackDisputeResponse'
|
78
|
-
|
79
|
-
# auth_names
|
80
|
-
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
81
|
-
|
82
|
-
new_options = opts.merge(
|
83
|
-
:operation => :"ChargebackApi.delete_chargeback",
|
84
|
-
:header_params => header_params,
|
85
|
-
:query_params => query_params,
|
86
|
-
:form_params => form_params,
|
87
|
-
:body => post_body,
|
88
|
-
:auth_names => auth_names,
|
89
|
-
:return_type => return_type
|
90
|
-
)
|
91
|
-
|
92
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
93
|
-
if @api_client.config.debugging
|
94
|
-
@api_client.config.logger.debug "API called: ChargebackApi#delete_chargeback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
95
|
-
end
|
96
|
-
return data, status_code, headers
|
97
|
-
end
|
98
|
-
|
99
|
-
# Retrieve a chargeback
|
100
|
-
# Retrieves a single chargeback using the specified chargeback dispute oid.
|
101
|
-
# @param chargeback_dispute_oid [Integer] The chargeback dispute oid to retrieve.
|
102
|
-
# @param [Hash] opts the optional parameters
|
103
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
104
|
-
# @return [ChargebackDisputeResponse]
|
105
|
-
def get_chargeback_dispute(chargeback_dispute_oid, opts = {})
|
106
|
-
data, _status_code, _headers = get_chargeback_dispute_with_http_info(chargeback_dispute_oid, opts)
|
107
|
-
data
|
108
|
-
end
|
109
|
-
|
110
|
-
# Retrieve a chargeback
|
111
|
-
# Retrieves a single chargeback using the specified chargeback dispute oid.
|
112
|
-
# @param chargeback_dispute_oid [Integer] The chargeback dispute oid to retrieve.
|
113
|
-
# @param [Hash] opts the optional parameters
|
114
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
115
|
-
# @return [Array<(ChargebackDisputeResponse, Integer, Hash)>] ChargebackDisputeResponse data, response status code and response headers
|
116
|
-
def get_chargeback_dispute_with_http_info(chargeback_dispute_oid, opts = {})
|
117
|
-
if @api_client.config.debugging
|
118
|
-
@api_client.config.logger.debug 'Calling API: ChargebackApi.get_chargeback_dispute ...'
|
119
|
-
end
|
120
|
-
# verify the required parameter 'chargeback_dispute_oid' is set
|
121
|
-
if @api_client.config.client_side_validation && chargeback_dispute_oid.nil?
|
122
|
-
fail ArgumentError, "Missing the required parameter 'chargeback_dispute_oid' when calling ChargebackApi.get_chargeback_dispute"
|
123
|
-
end
|
124
|
-
# resource path
|
125
|
-
local_var_path = '/chargeback/chargebacks/{chargeback_dispute_oid}'.sub('{' + 'chargeback_dispute_oid' + '}', CGI.escape(chargeback_dispute_oid.to_s))
|
126
|
-
|
127
|
-
# query parameters
|
128
|
-
query_params = opts[:query_params] || {}
|
129
|
-
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
130
|
-
|
131
|
-
# header parameters
|
132
|
-
header_params = opts[:header_params] || {}
|
133
|
-
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
134
|
-
# HTTP header 'Accept' (if needed)
|
135
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
136
|
-
|
137
|
-
# form parameters
|
138
|
-
form_params = opts[:form_params] || {}
|
139
|
-
|
140
|
-
# http body (model)
|
141
|
-
post_body = opts[:debug_body]
|
142
|
-
|
143
|
-
# return_type
|
144
|
-
return_type = opts[:debug_return_type] || 'ChargebackDisputeResponse'
|
145
|
-
|
146
|
-
# auth_names
|
147
|
-
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
148
|
-
|
149
|
-
new_options = opts.merge(
|
150
|
-
:operation => :"ChargebackApi.get_chargeback_dispute",
|
151
|
-
:header_params => header_params,
|
152
|
-
:query_params => query_params,
|
153
|
-
:form_params => form_params,
|
154
|
-
:body => post_body,
|
155
|
-
:auth_names => auth_names,
|
156
|
-
:return_type => return_type
|
157
|
-
)
|
158
|
-
|
159
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
160
|
-
if @api_client.config.debugging
|
161
|
-
@api_client.config.logger.debug "API called: ChargebackApi#get_chargeback_dispute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
162
|
-
end
|
163
|
-
return data, status_code, headers
|
164
|
-
end
|
165
|
-
|
166
|
-
# Retrieve chargebacks
|
167
|
-
# Retrieves chargebacks from the account. If no parameters are specified, all chargebacks will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
168
|
-
# @param [Hash] opts the optional parameters
|
169
|
-
# @option opts [String] :order_id Order Id
|
170
|
-
# @option opts [String] :case_number Case number
|
171
|
-
# @option opts [String] :status Status
|
172
|
-
# @option opts [String] :expiration_dts_start Expiration dts start
|
173
|
-
# @option opts [String] :expiration_dts_end Expiration dts end
|
174
|
-
# @option opts [String] :chargeback_dts_start Chargeback dts start
|
175
|
-
# @option opts [String] :chargeback_dts_end Chargeback dts end
|
176
|
-
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
|
177
|
-
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
178
|
-
# @option opts [String] :_since Fetch chargebacks that have been created/modified since this date/time.
|
179
|
-
# @option opts [String] :_sort The sort order of the chargebacks. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
180
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
181
|
-
# @return [ChargebackDisputesResponse]
|
182
|
-
def get_chargeback_disputes(opts = {})
|
183
|
-
data, _status_code, _headers = get_chargeback_disputes_with_http_info(opts)
|
184
|
-
data
|
185
|
-
end
|
186
|
-
|
187
|
-
# Retrieve chargebacks
|
188
|
-
# Retrieves chargebacks from the account. If no parameters are specified, all chargebacks will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
189
|
-
# @param [Hash] opts the optional parameters
|
190
|
-
# @option opts [String] :order_id Order Id
|
191
|
-
# @option opts [String] :case_number Case number
|
192
|
-
# @option opts [String] :status Status
|
193
|
-
# @option opts [String] :expiration_dts_start Expiration dts start
|
194
|
-
# @option opts [String] :expiration_dts_end Expiration dts end
|
195
|
-
# @option opts [String] :chargeback_dts_start Chargeback dts start
|
196
|
-
# @option opts [String] :chargeback_dts_end Chargeback dts end
|
197
|
-
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
|
198
|
-
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
199
|
-
# @option opts [String] :_since Fetch chargebacks that have been created/modified since this date/time.
|
200
|
-
# @option opts [String] :_sort The sort order of the chargebacks. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
201
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
202
|
-
# @return [Array<(ChargebackDisputesResponse, Integer, Hash)>] ChargebackDisputesResponse data, response status code and response headers
|
203
|
-
def get_chargeback_disputes_with_http_info(opts = {})
|
204
|
-
if @api_client.config.debugging
|
205
|
-
@api_client.config.logger.debug 'Calling API: ChargebackApi.get_chargeback_disputes ...'
|
206
|
-
end
|
207
|
-
# resource path
|
208
|
-
local_var_path = '/chargeback/chargebacks'
|
209
|
-
|
210
|
-
# query parameters
|
211
|
-
query_params = opts[:query_params] || {}
|
212
|
-
query_params[:'order_id'] = opts[:'order_id'] if !opts[:'order_id'].nil?
|
213
|
-
query_params[:'case_number'] = opts[:'case_number'] if !opts[:'case_number'].nil?
|
214
|
-
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
215
|
-
query_params[:'expiration_dts_start'] = opts[:'expiration_dts_start'] if !opts[:'expiration_dts_start'].nil?
|
216
|
-
query_params[:'expiration_dts_end'] = opts[:'expiration_dts_end'] if !opts[:'expiration_dts_end'].nil?
|
217
|
-
query_params[:'chargeback_dts_start'] = opts[:'chargeback_dts_start'] if !opts[:'chargeback_dts_start'].nil?
|
218
|
-
query_params[:'chargeback_dts_end'] = opts[:'chargeback_dts_end'] if !opts[:'chargeback_dts_end'].nil?
|
219
|
-
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
220
|
-
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
221
|
-
query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
|
222
|
-
query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
|
223
|
-
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
224
|
-
|
225
|
-
# header parameters
|
226
|
-
header_params = opts[:header_params] || {}
|
227
|
-
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
228
|
-
# HTTP header 'Accept' (if needed)
|
229
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
230
|
-
|
231
|
-
# form parameters
|
232
|
-
form_params = opts[:form_params] || {}
|
233
|
-
|
234
|
-
# http body (model)
|
235
|
-
post_body = opts[:debug_body]
|
236
|
-
|
237
|
-
# return_type
|
238
|
-
return_type = opts[:debug_return_type] || 'ChargebackDisputesResponse'
|
239
|
-
|
240
|
-
# auth_names
|
241
|
-
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
242
|
-
|
243
|
-
new_options = opts.merge(
|
244
|
-
:operation => :"ChargebackApi.get_chargeback_disputes",
|
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
|
-
|
253
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
254
|
-
if @api_client.config.debugging
|
255
|
-
@api_client.config.logger.debug "API called: ChargebackApi#get_chargeback_disputes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
256
|
-
end
|
257
|
-
return data, status_code, headers
|
258
|
-
end
|
259
|
-
|
260
|
-
# Insert a chargeback
|
261
|
-
# Insert a chargeback on the UltraCart account.
|
262
|
-
# @param chargeback [ChargebackDispute] Chargeback to insert
|
263
|
-
# @param [Hash] opts the optional parameters
|
264
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
265
|
-
# @return [ChargebackDisputeResponse]
|
266
|
-
def insert_chargeback(chargeback, opts = {})
|
267
|
-
data, _status_code, _headers = insert_chargeback_with_http_info(chargeback, opts)
|
268
|
-
data
|
269
|
-
end
|
270
|
-
|
271
|
-
# Insert a chargeback
|
272
|
-
# Insert a chargeback on the UltraCart account.
|
273
|
-
# @param chargeback [ChargebackDispute] Chargeback to insert
|
274
|
-
# @param [Hash] opts the optional parameters
|
275
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
276
|
-
# @return [Array<(ChargebackDisputeResponse, Integer, Hash)>] ChargebackDisputeResponse data, response status code and response headers
|
277
|
-
def insert_chargeback_with_http_info(chargeback, opts = {})
|
278
|
-
if @api_client.config.debugging
|
279
|
-
@api_client.config.logger.debug 'Calling API: ChargebackApi.insert_chargeback ...'
|
280
|
-
end
|
281
|
-
# verify the required parameter 'chargeback' is set
|
282
|
-
if @api_client.config.client_side_validation && chargeback.nil?
|
283
|
-
fail ArgumentError, "Missing the required parameter 'chargeback' when calling ChargebackApi.insert_chargeback"
|
284
|
-
end
|
285
|
-
# resource path
|
286
|
-
local_var_path = '/chargeback/chargebacks'
|
287
|
-
|
288
|
-
# query parameters
|
289
|
-
query_params = opts[:query_params] || {}
|
290
|
-
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
291
|
-
|
292
|
-
# header parameters
|
293
|
-
header_params = opts[:header_params] || {}
|
294
|
-
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
295
|
-
# HTTP header 'Accept' (if needed)
|
296
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
297
|
-
# HTTP header 'Content-Type'
|
298
|
-
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
299
|
-
if !content_type.nil?
|
300
|
-
header_params['Content-Type'] = content_type
|
301
|
-
end
|
302
|
-
|
303
|
-
# form parameters
|
304
|
-
form_params = opts[:form_params] || {}
|
305
|
-
|
306
|
-
# http body (model)
|
307
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(chargeback)
|
308
|
-
|
309
|
-
# return_type
|
310
|
-
return_type = opts[:debug_return_type] || 'ChargebackDisputeResponse'
|
311
|
-
|
312
|
-
# auth_names
|
313
|
-
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
314
|
-
|
315
|
-
new_options = opts.merge(
|
316
|
-
:operation => :"ChargebackApi.insert_chargeback",
|
317
|
-
:header_params => header_params,
|
318
|
-
:query_params => query_params,
|
319
|
-
:form_params => form_params,
|
320
|
-
:body => post_body,
|
321
|
-
:auth_names => auth_names,
|
322
|
-
:return_type => return_type
|
323
|
-
)
|
324
|
-
|
325
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
326
|
-
if @api_client.config.debugging
|
327
|
-
@api_client.config.logger.debug "API called: ChargebackApi#insert_chargeback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
328
|
-
end
|
329
|
-
return data, status_code, headers
|
330
|
-
end
|
331
|
-
|
332
|
-
# Update a chargeback
|
333
|
-
# Update a chargeback on the UltraCart account.
|
334
|
-
# @param chargeback_dispute_oid [Integer] The chargeback_dispute_oid to update.
|
335
|
-
# @param chargeback [ChargebackDispute] Chargeback to update
|
336
|
-
# @param [Hash] opts the optional parameters
|
337
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
338
|
-
# @return [ChargebackDisputeResponse]
|
339
|
-
def update_chargeback(chargeback_dispute_oid, chargeback, opts = {})
|
340
|
-
data, _status_code, _headers = update_chargeback_with_http_info(chargeback_dispute_oid, chargeback, opts)
|
341
|
-
data
|
342
|
-
end
|
343
|
-
|
344
|
-
# Update a chargeback
|
345
|
-
# Update a chargeback on the UltraCart account.
|
346
|
-
# @param chargeback_dispute_oid [Integer] The chargeback_dispute_oid to update.
|
347
|
-
# @param chargeback [ChargebackDispute] Chargeback to update
|
348
|
-
# @param [Hash] opts the optional parameters
|
349
|
-
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
350
|
-
# @return [Array<(ChargebackDisputeResponse, Integer, Hash)>] ChargebackDisputeResponse data, response status code and response headers
|
351
|
-
def update_chargeback_with_http_info(chargeback_dispute_oid, chargeback, opts = {})
|
352
|
-
if @api_client.config.debugging
|
353
|
-
@api_client.config.logger.debug 'Calling API: ChargebackApi.update_chargeback ...'
|
354
|
-
end
|
355
|
-
# verify the required parameter 'chargeback_dispute_oid' is set
|
356
|
-
if @api_client.config.client_side_validation && chargeback_dispute_oid.nil?
|
357
|
-
fail ArgumentError, "Missing the required parameter 'chargeback_dispute_oid' when calling ChargebackApi.update_chargeback"
|
358
|
-
end
|
359
|
-
# verify the required parameter 'chargeback' is set
|
360
|
-
if @api_client.config.client_side_validation && chargeback.nil?
|
361
|
-
fail ArgumentError, "Missing the required parameter 'chargeback' when calling ChargebackApi.update_chargeback"
|
362
|
-
end
|
363
|
-
# resource path
|
364
|
-
local_var_path = '/chargeback/chargebacks/{chargeback_dispute_oid}'.sub('{' + 'chargeback_dispute_oid' + '}', CGI.escape(chargeback_dispute_oid.to_s))
|
365
|
-
|
366
|
-
# query parameters
|
367
|
-
query_params = opts[:query_params] || {}
|
368
|
-
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
369
|
-
|
370
|
-
# header parameters
|
371
|
-
header_params = opts[:header_params] || {}
|
372
|
-
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
373
|
-
# HTTP header 'Accept' (if needed)
|
374
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
375
|
-
# HTTP header 'Content-Type'
|
376
|
-
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
377
|
-
if !content_type.nil?
|
378
|
-
header_params['Content-Type'] = content_type
|
379
|
-
end
|
380
|
-
|
381
|
-
# form parameters
|
382
|
-
form_params = opts[:form_params] || {}
|
383
|
-
|
384
|
-
# http body (model)
|
385
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(chargeback)
|
386
|
-
|
387
|
-
# return_type
|
388
|
-
return_type = opts[:debug_return_type] || 'ChargebackDisputeResponse'
|
389
|
-
|
390
|
-
# auth_names
|
391
|
-
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
392
|
-
|
393
|
-
new_options = opts.merge(
|
394
|
-
:operation => :"ChargebackApi.update_chargeback",
|
395
|
-
:header_params => header_params,
|
396
|
-
:query_params => query_params,
|
397
|
-
:form_params => form_params,
|
398
|
-
:body => post_body,
|
399
|
-
:auth_names => auth_names,
|
400
|
-
:return_type => return_type
|
401
|
-
)
|
402
|
-
|
403
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
404
|
-
if @api_client.config.debugging
|
405
|
-
@api_client.config.logger.debug "API called: ChargebackApi#update_chargeback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
406
|
-
end
|
407
|
-
return data, status_code, headers
|
408
|
-
end
|
409
|
-
end
|
410
|
-
end
|