ultracart_api 4.1.92 → 4.1.95
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 +23 -2
- data/docs/FraudApi.md +278 -0
- data/docs/FraudDeclineEmailRequest.md +18 -0
- data/docs/FraudLookupValues.md +28 -0
- data/docs/FraudLookupValuesResponse.md +26 -0
- data/docs/FraudRuleInsertRequest.md +76 -0
- data/docs/FraudRuleItemFilter.md +20 -0
- data/docs/FraudRulePublic.md +90 -0
- data/docs/FraudRuleResponse.md +26 -0
- data/docs/FraudRuleRotatingTransactionGatewayFilter.md +20 -0
- data/docs/FraudRuleSearchRequest.md +78 -0
- data/docs/FraudRuleStorefrontFilter.md +20 -0
- data/docs/FraudRulesResponse.md +26 -0
- data/docs/ItemVariantItem.md +2 -0
- data/docs/OauthApi.md +5 -5
- data/lib/ultracart_api/api/fraud_api.rb +373 -0
- data/lib/ultracart_api/api/oauth_api.rb +5 -5
- data/lib/ultracart_api/models/fraud_decline_email_request.rb +220 -0
- data/lib/ultracart_api/models/fraud_lookup_values.rb +270 -0
- data/lib/ultracart_api/models/fraud_lookup_values_response.rb +256 -0
- data/lib/ultracart_api/models/fraud_rule_insert_request.rb +583 -0
- data/lib/ultracart_api/models/fraud_rule_item_filter.rb +245 -0
- data/lib/ultracart_api/models/fraud_rule_public.rb +652 -0
- data/lib/ultracart_api/models/fraud_rule_response.rb +256 -0
- data/lib/ultracart_api/models/fraud_rule_rotating_transaction_gateway_filter.rb +230 -0
- data/lib/ultracart_api/models/fraud_rule_search_request.rb +572 -0
- data/lib/ultracart_api/models/fraud_rule_storefront_filter.rb +245 -0
- data/lib/ultracart_api/models/fraud_rules_response.rb +259 -0
- data/lib/ultracart_api/models/item_variant_item.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +12 -0
- metadata +26 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# UltracartClient::FraudRuleSearchRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **affiliate_oid_or_email** | **String** | Affiliate oid (integer) or affiliate email. Email is resolved to oid before searching. | [optional] |
|
|
8
|
+
| **amount_threshold_begin** | **Float** | Lower bound on amount/score/percentage thresholds (rules backed by the same numeric column). | [optional] |
|
|
9
|
+
| **amount_threshold_end** | **Float** | | [optional] |
|
|
10
|
+
| **auto_note** | **String** | Wildcard search on the rule's auto_note. Use '*' for wildcards. | [optional] |
|
|
11
|
+
| **count_threshold_begin** | **Integer** | Lower bound on count thresholds (rules backed by the same integer count column). | [optional] |
|
|
12
|
+
| **count_threshold_end** | **Integer** | | [optional] |
|
|
13
|
+
| **created_by** | **String** | | [optional] |
|
|
14
|
+
| **created_date_begin** | **String** | Rule creation date begin (MM/dd/yyyy) | [optional] |
|
|
15
|
+
| **created_date_end** | **String** | Rule creation date end (MM/dd/yyyy) | [optional] |
|
|
16
|
+
| **credit_card_partial** | **String** | Partial credit card number for matching 'credit card matches' rules. Use '*' wildcards. | [optional] |
|
|
17
|
+
| **decline_message** | **String** | Wildcard search on the rule's decline_message. Use '*' for wildcards. | [optional] |
|
|
18
|
+
| **failure_action** | **String** | | [optional] |
|
|
19
|
+
| **gateway_code** | **String** | | [optional] |
|
|
20
|
+
| **merchant_item_id** | **String** | | [optional] |
|
|
21
|
+
| **modifier_value** | **String** | Wildcard search on the rule's secondary modifier (eg 'address'/'subnet', gateway codes, avs match types). | [optional] |
|
|
22
|
+
| **modify_custom_field1** | **String** | | [optional] |
|
|
23
|
+
| **modify_custom_field2** | **String** | | [optional] |
|
|
24
|
+
| **modify_custom_field3** | **String** | | [optional] |
|
|
25
|
+
| **modify_custom_field4** | **String** | | [optional] |
|
|
26
|
+
| **modify_custom_field5** | **String** | | [optional] |
|
|
27
|
+
| **modify_custom_field6** | **String** | | [optional] |
|
|
28
|
+
| **modify_custom_field7** | **String** | | [optional] |
|
|
29
|
+
| **modify_skip_affiliate** | **Boolean** | | [optional] |
|
|
30
|
+
| **modify_skip_affiliate_network_pixel** | **Boolean** | | [optional] |
|
|
31
|
+
| **rule_group** | **String** | Rule group to filter by. | [optional] |
|
|
32
|
+
| **rule_type** | **String** | Rule type to filter by. | [optional] |
|
|
33
|
+
| **search_linked_accounts** | **Boolean** | Include rules from accounts linked to this merchant. Defaults to false. | [optional] |
|
|
34
|
+
| **storefront_hostname** | **String** | | [optional] |
|
|
35
|
+
| **text_value** | **String** | Wildcard search on the rule's text parameter (email / ip / bin / country / item id / avs codes - the backend disambiguates by rule_type). | [optional] |
|
|
36
|
+
| **theme_code** | **String** | | [optional] |
|
|
37
|
+
| **user_action** | **String** | | [optional] |
|
|
38
|
+
|
|
39
|
+
## Example
|
|
40
|
+
|
|
41
|
+
```ruby
|
|
42
|
+
require 'ultracart_api'
|
|
43
|
+
|
|
44
|
+
instance = UltracartClient::FraudRuleSearchRequest.new(
|
|
45
|
+
affiliate_oid_or_email: null,
|
|
46
|
+
amount_threshold_begin: null,
|
|
47
|
+
amount_threshold_end: null,
|
|
48
|
+
auto_note: null,
|
|
49
|
+
count_threshold_begin: null,
|
|
50
|
+
count_threshold_end: null,
|
|
51
|
+
created_by: null,
|
|
52
|
+
created_date_begin: null,
|
|
53
|
+
created_date_end: null,
|
|
54
|
+
credit_card_partial: null,
|
|
55
|
+
decline_message: null,
|
|
56
|
+
failure_action: null,
|
|
57
|
+
gateway_code: null,
|
|
58
|
+
merchant_item_id: null,
|
|
59
|
+
modifier_value: null,
|
|
60
|
+
modify_custom_field1: null,
|
|
61
|
+
modify_custom_field2: null,
|
|
62
|
+
modify_custom_field3: null,
|
|
63
|
+
modify_custom_field4: null,
|
|
64
|
+
modify_custom_field5: null,
|
|
65
|
+
modify_custom_field6: null,
|
|
66
|
+
modify_custom_field7: null,
|
|
67
|
+
modify_skip_affiliate: null,
|
|
68
|
+
modify_skip_affiliate_network_pixel: null,
|
|
69
|
+
rule_group: null,
|
|
70
|
+
rule_type: null,
|
|
71
|
+
search_linked_accounts: null,
|
|
72
|
+
storefront_hostname: null,
|
|
73
|
+
text_value: null,
|
|
74
|
+
theme_code: null,
|
|
75
|
+
user_action: null
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# UltracartClient::FraudRuleStorefrontFilter
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **screen_branding_theme_code** | **String** | Screen branding theme code associated with this storefront (legacy checkouts) | [optional] |
|
|
8
|
+
| **storefront_host_name** | **String** | StoreFront Host Name | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ultracart_api'
|
|
14
|
+
|
|
15
|
+
instance = UltracartClient::FraudRuleStorefrontFilter.new(
|
|
16
|
+
screen_branding_theme_code: null,
|
|
17
|
+
storefront_host_name: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# UltracartClient::FraudRulesResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
|
8
|
+
| **fraud_rules** | [**Array<FraudRulePublic>**](FraudRulePublic.md) | fraud_rules | [optional] |
|
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ultracart_api'
|
|
17
|
+
|
|
18
|
+
instance = UltracartClient::FraudRulesResponse.new(
|
|
19
|
+
error: null,
|
|
20
|
+
fraud_rules: null,
|
|
21
|
+
metadata: null,
|
|
22
|
+
success: null,
|
|
23
|
+
warning: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
data/docs/ItemVariantItem.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **description** | **String** | Description | [optional] |
|
|
8
8
|
| **merchant_item_multimedia_oid** | **Integer** | Multimedia object identifier | [optional] |
|
|
9
|
+
| **quantity** | **Integer** | Quantity of the variant item added to the cart when this combination is selected. Defaults to 1. | [optional] |
|
|
9
10
|
| **variant_default_multimedia** | [**ItemContentMultimedia**](ItemContentMultimedia.md) | | [optional] |
|
|
10
11
|
| **variant_merchant_item_id** | **String** | Variant item id | [optional] |
|
|
11
12
|
| **variant_merchant_item_oid** | **Integer** | Variant item object identifier | [optional] |
|
|
@@ -21,6 +22,7 @@ require 'ultracart_api'
|
|
|
21
22
|
instance = UltracartClient::ItemVariantItem.new(
|
|
22
23
|
description: null,
|
|
23
24
|
merchant_item_multimedia_oid: null,
|
|
25
|
+
quantity: null,
|
|
24
26
|
variant_default_multimedia: null,
|
|
25
27
|
variant_merchant_item_id: null,
|
|
26
28
|
variant_merchant_item_oid: null,
|
data/docs/OauthApi.md
CHANGED
|
@@ -126,7 +126,7 @@ end
|
|
|
126
126
|
|
|
127
127
|
## oauth_device_authorize
|
|
128
128
|
|
|
129
|
-
> oauth_device_authorize(client_id, scope)
|
|
129
|
+
> <OauthDeviceAuthorizationResponse> oauth_device_authorize(client_id, scope)
|
|
130
130
|
|
|
131
131
|
Initiate a device authorization flow.
|
|
132
132
|
|
|
@@ -141,9 +141,9 @@ Initiates the device authorization flow by returning a device code and user code
|
|
|
141
141
|
|
|
142
142
|
#### Using the oauth_device_authorize_with_http_info variant
|
|
143
143
|
|
|
144
|
-
This returns an Array which contains the response data
|
|
144
|
+
This returns an Array which contains the response data, status code and headers.
|
|
145
145
|
|
|
146
|
-
> <Array(
|
|
146
|
+
> <Array(<OauthDeviceAuthorizationResponse>, Integer, Hash)> oauth_device_authorize_with_http_info(client_id, scope)
|
|
147
147
|
|
|
148
148
|
```ruby
|
|
149
149
|
begin
|
|
@@ -151,7 +151,7 @@ begin
|
|
|
151
151
|
data, status_code, headers = api_instance.oauth_device_authorize_with_http_info(client_id, scope)
|
|
152
152
|
p status_code # => 2xx
|
|
153
153
|
p headers # => { ... }
|
|
154
|
-
p data # =>
|
|
154
|
+
p data # => <OauthDeviceAuthorizationResponse>
|
|
155
155
|
rescue UltracartClient::ApiError => e
|
|
156
156
|
puts "Error when calling OauthApi->oauth_device_authorize_with_http_info: #{e}"
|
|
157
157
|
end
|
|
@@ -166,7 +166,7 @@ end
|
|
|
166
166
|
|
|
167
167
|
### Return type
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
[**OauthDeviceAuthorizationResponse**](OauthDeviceAuthorizationResponse.md)
|
|
170
170
|
|
|
171
171
|
### Authorization
|
|
172
172
|
|
|
@@ -0,0 +1,373 @@
|
|
|
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 FraudApi
|
|
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::FraudApi.new(api_client)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Decline emails during checkout fraud review
|
|
36
|
+
# Adds one or more email addresses to the fraud decline list for this merchant account.
|
|
37
|
+
# @param fraud_decline_emails_request [FraudDeclineEmailRequest] Fraud decline emails request
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [nil]
|
|
40
|
+
def decline_email(fraud_decline_emails_request, opts = {})
|
|
41
|
+
decline_email_with_http_info(fraud_decline_emails_request, opts)
|
|
42
|
+
nil
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Decline emails during checkout fraud review
|
|
46
|
+
# Adds one or more email addresses to the fraud decline list for this merchant account.
|
|
47
|
+
# @param fraud_decline_emails_request [FraudDeclineEmailRequest] Fraud decline emails request
|
|
48
|
+
# @param [Hash] opts the optional parameters
|
|
49
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
50
|
+
def decline_email_with_http_info(fraud_decline_emails_request, opts = {})
|
|
51
|
+
if @api_client.config.debugging
|
|
52
|
+
@api_client.config.logger.debug 'Calling API: FraudApi.decline_email ...'
|
|
53
|
+
end
|
|
54
|
+
# verify the required parameter 'fraud_decline_emails_request' is set
|
|
55
|
+
if @api_client.config.client_side_validation && fraud_decline_emails_request.nil?
|
|
56
|
+
fail ArgumentError, "Missing the required parameter 'fraud_decline_emails_request' when calling FraudApi.decline_email"
|
|
57
|
+
end
|
|
58
|
+
# resource path
|
|
59
|
+
local_var_path = '/fraud/decline_email'
|
|
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
|
+
# HTTP header 'Content-Type'
|
|
70
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
71
|
+
if !content_type.nil?
|
|
72
|
+
header_params['Content-Type'] = content_type
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# form parameters
|
|
76
|
+
form_params = opts[:form_params] || {}
|
|
77
|
+
|
|
78
|
+
# http body (model)
|
|
79
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(fraud_decline_emails_request)
|
|
80
|
+
|
|
81
|
+
# return_type
|
|
82
|
+
return_type = opts[:debug_return_type]
|
|
83
|
+
|
|
84
|
+
# auth_names
|
|
85
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
86
|
+
|
|
87
|
+
new_options = opts.merge(
|
|
88
|
+
:operation => :"FraudApi.decline_email",
|
|
89
|
+
:header_params => header_params,
|
|
90
|
+
:query_params => query_params,
|
|
91
|
+
:form_params => form_params,
|
|
92
|
+
:body => post_body,
|
|
93
|
+
:auth_names => auth_names,
|
|
94
|
+
:return_type => return_type
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug "API called: FraudApi#decline_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
100
|
+
end
|
|
101
|
+
return data, status_code, headers
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Delete a fraud rule
|
|
105
|
+
# Deletes a fraud rule for this merchant account.
|
|
106
|
+
# @param fraud_rule_oid [Integer]
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [nil]
|
|
109
|
+
def delete_fraud_rule(fraud_rule_oid, opts = {})
|
|
110
|
+
delete_fraud_rule_with_http_info(fraud_rule_oid, opts)
|
|
111
|
+
nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Delete a fraud rule
|
|
115
|
+
# Deletes a fraud rule for this merchant account.
|
|
116
|
+
# @param fraud_rule_oid [Integer]
|
|
117
|
+
# @param [Hash] opts the optional parameters
|
|
118
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
119
|
+
def delete_fraud_rule_with_http_info(fraud_rule_oid, opts = {})
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug 'Calling API: FraudApi.delete_fraud_rule ...'
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'fraud_rule_oid' is set
|
|
124
|
+
if @api_client.config.client_side_validation && fraud_rule_oid.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'fraud_rule_oid' when calling FraudApi.delete_fraud_rule"
|
|
126
|
+
end
|
|
127
|
+
# resource path
|
|
128
|
+
local_var_path = '/fraud/rules/{fraud_rule_oid}'.sub('{' + 'fraud_rule_oid' + '}', CGI.escape(fraud_rule_oid.to_s))
|
|
129
|
+
|
|
130
|
+
# query parameters
|
|
131
|
+
query_params = opts[:query_params] || {}
|
|
132
|
+
|
|
133
|
+
# header parameters
|
|
134
|
+
header_params = opts[:header_params] || {}
|
|
135
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
136
|
+
# HTTP header 'Accept' (if needed)
|
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
138
|
+
|
|
139
|
+
# form parameters
|
|
140
|
+
form_params = opts[:form_params] || {}
|
|
141
|
+
|
|
142
|
+
# http body (model)
|
|
143
|
+
post_body = opts[:debug_body]
|
|
144
|
+
|
|
145
|
+
# return_type
|
|
146
|
+
return_type = opts[:debug_return_type]
|
|
147
|
+
|
|
148
|
+
# auth_names
|
|
149
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
150
|
+
|
|
151
|
+
new_options = opts.merge(
|
|
152
|
+
:operation => :"FraudApi.delete_fraud_rule",
|
|
153
|
+
:header_params => header_params,
|
|
154
|
+
:query_params => query_params,
|
|
155
|
+
:form_params => form_params,
|
|
156
|
+
:body => post_body,
|
|
157
|
+
:auth_names => auth_names,
|
|
158
|
+
:return_type => return_type
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
162
|
+
if @api_client.config.debugging
|
|
163
|
+
@api_client.config.logger.debug "API called: FraudApi#delete_fraud_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
164
|
+
end
|
|
165
|
+
return data, status_code, headers
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Retrieve fraud rule lookup values
|
|
169
|
+
# Returns the dropdown values required to build valid fraud rule insert and search requests. Includes rule types, failure actions, user actions, IP range types, AVS match types, the merchant's rotating transaction gateways, screen branding themes, countries, and affiliates.
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @return [FraudLookupValuesResponse]
|
|
172
|
+
def get_fraud_lookup_values(opts = {})
|
|
173
|
+
data, _status_code, _headers = get_fraud_lookup_values_with_http_info(opts)
|
|
174
|
+
data
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Retrieve fraud rule lookup values
|
|
178
|
+
# Returns the dropdown values required to build valid fraud rule insert and search requests. Includes rule types, failure actions, user actions, IP range types, AVS match types, the merchant's rotating transaction gateways, screen branding themes, countries, and affiliates.
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @return [Array<(FraudLookupValuesResponse, Integer, Hash)>] FraudLookupValuesResponse data, response status code and response headers
|
|
181
|
+
def get_fraud_lookup_values_with_http_info(opts = {})
|
|
182
|
+
if @api_client.config.debugging
|
|
183
|
+
@api_client.config.logger.debug 'Calling API: FraudApi.get_fraud_lookup_values ...'
|
|
184
|
+
end
|
|
185
|
+
# resource path
|
|
186
|
+
local_var_path = '/fraud/lookup_values'
|
|
187
|
+
|
|
188
|
+
# query parameters
|
|
189
|
+
query_params = opts[:query_params] || {}
|
|
190
|
+
|
|
191
|
+
# header parameters
|
|
192
|
+
header_params = opts[:header_params] || {}
|
|
193
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
194
|
+
# HTTP header 'Accept' (if needed)
|
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
196
|
+
|
|
197
|
+
# form parameters
|
|
198
|
+
form_params = opts[:form_params] || {}
|
|
199
|
+
|
|
200
|
+
# http body (model)
|
|
201
|
+
post_body = opts[:debug_body]
|
|
202
|
+
|
|
203
|
+
# return_type
|
|
204
|
+
return_type = opts[:debug_return_type] || 'FraudLookupValuesResponse'
|
|
205
|
+
|
|
206
|
+
# auth_names
|
|
207
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
208
|
+
|
|
209
|
+
new_options = opts.merge(
|
|
210
|
+
:operation => :"FraudApi.get_fraud_lookup_values",
|
|
211
|
+
:header_params => header_params,
|
|
212
|
+
:query_params => query_params,
|
|
213
|
+
:form_params => form_params,
|
|
214
|
+
:body => post_body,
|
|
215
|
+
:auth_names => auth_names,
|
|
216
|
+
:return_type => return_type
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
220
|
+
if @api_client.config.debugging
|
|
221
|
+
@api_client.config.logger.debug "API called: FraudApi#get_fraud_lookup_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
222
|
+
end
|
|
223
|
+
return data, status_code, headers
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Insert a fraud rule
|
|
227
|
+
# Creates a fraud rule for this merchant account. Field names in the request body are semantic (eg amount_threshold, email, ip_address). Call GET /v2/fraud/lookup_values for the list of valid rule_type, failure_action, and related dropdown values. The 'credit card matches' rule type is not supported via REST.
|
|
228
|
+
# @param fraud_rule_insert_request [FraudRuleInsertRequest] Fraud rule insert request
|
|
229
|
+
# @param [Hash] opts the optional parameters
|
|
230
|
+
# @return [FraudRuleResponse]
|
|
231
|
+
def insert_fraud_rule(fraud_rule_insert_request, opts = {})
|
|
232
|
+
data, _status_code, _headers = insert_fraud_rule_with_http_info(fraud_rule_insert_request, opts)
|
|
233
|
+
data
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Insert a fraud rule
|
|
237
|
+
# Creates a fraud rule for this merchant account. Field names in the request body are semantic (eg amount_threshold, email, ip_address). Call GET /v2/fraud/lookup_values for the list of valid rule_type, failure_action, and related dropdown values. The 'credit card matches' rule type is not supported via REST.
|
|
238
|
+
# @param fraud_rule_insert_request [FraudRuleInsertRequest] Fraud rule insert request
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @return [Array<(FraudRuleResponse, Integer, Hash)>] FraudRuleResponse data, response status code and response headers
|
|
241
|
+
def insert_fraud_rule_with_http_info(fraud_rule_insert_request, opts = {})
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug 'Calling API: FraudApi.insert_fraud_rule ...'
|
|
244
|
+
end
|
|
245
|
+
# verify the required parameter 'fraud_rule_insert_request' is set
|
|
246
|
+
if @api_client.config.client_side_validation && fraud_rule_insert_request.nil?
|
|
247
|
+
fail ArgumentError, "Missing the required parameter 'fraud_rule_insert_request' when calling FraudApi.insert_fraud_rule"
|
|
248
|
+
end
|
|
249
|
+
# resource path
|
|
250
|
+
local_var_path = '/fraud/rules'
|
|
251
|
+
|
|
252
|
+
# query parameters
|
|
253
|
+
query_params = opts[:query_params] || {}
|
|
254
|
+
|
|
255
|
+
# header parameters
|
|
256
|
+
header_params = opts[:header_params] || {}
|
|
257
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
258
|
+
# HTTP header 'Accept' (if needed)
|
|
259
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
260
|
+
# HTTP header 'Content-Type'
|
|
261
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
262
|
+
if !content_type.nil?
|
|
263
|
+
header_params['Content-Type'] = content_type
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# form parameters
|
|
267
|
+
form_params = opts[:form_params] || {}
|
|
268
|
+
|
|
269
|
+
# http body (model)
|
|
270
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(fraud_rule_insert_request)
|
|
271
|
+
|
|
272
|
+
# return_type
|
|
273
|
+
return_type = opts[:debug_return_type] || 'FraudRuleResponse'
|
|
274
|
+
|
|
275
|
+
# auth_names
|
|
276
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
277
|
+
|
|
278
|
+
new_options = opts.merge(
|
|
279
|
+
:operation => :"FraudApi.insert_fraud_rule",
|
|
280
|
+
:header_params => header_params,
|
|
281
|
+
:query_params => query_params,
|
|
282
|
+
:form_params => form_params,
|
|
283
|
+
:body => post_body,
|
|
284
|
+
:auth_names => auth_names,
|
|
285
|
+
:return_type => return_type
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
289
|
+
if @api_client.config.debugging
|
|
290
|
+
@api_client.config.logger.debug "API called: FraudApi#insert_fraud_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
291
|
+
end
|
|
292
|
+
return data, status_code, headers
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Search fraud rules
|
|
296
|
+
# Searches fraud rules for this merchant account using semantic filter fields. Pagination and sort are passed as query parameters (_limit, _offset, _sort). You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. Results are capped at 10,000 records by ElasticSearch and the warning slot indicates when that cap was hit. Use more selective filters in that case.
|
|
297
|
+
# @param fraud_rule_search_request [FraudRuleSearchRequest] Fraud rule search request
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200) (default to 100)
|
|
300
|
+
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
|
301
|
+
# @option opts [String] :_sort The sort order of the fraud rules. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
|
302
|
+
# @return [FraudRulesResponse]
|
|
303
|
+
def search_fraud_rules(fraud_rule_search_request, opts = {})
|
|
304
|
+
data, _status_code, _headers = search_fraud_rules_with_http_info(fraud_rule_search_request, opts)
|
|
305
|
+
data
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Search fraud rules
|
|
309
|
+
# Searches fraud rules for this merchant account using semantic filter fields. Pagination and sort are passed as query parameters (_limit, _offset, _sort). You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. Results are capped at 10,000 records by ElasticSearch and the warning slot indicates when that cap was hit. Use more selective filters in that case.
|
|
310
|
+
# @param fraud_rule_search_request [FraudRuleSearchRequest] Fraud rule search request
|
|
311
|
+
# @param [Hash] opts the optional parameters
|
|
312
|
+
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200) (default to 100)
|
|
313
|
+
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
|
314
|
+
# @option opts [String] :_sort The sort order of the fraud rules. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
|
315
|
+
# @return [Array<(FraudRulesResponse, Integer, Hash)>] FraudRulesResponse data, response status code and response headers
|
|
316
|
+
def search_fraud_rules_with_http_info(fraud_rule_search_request, opts = {})
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug 'Calling API: FraudApi.search_fraud_rules ...'
|
|
319
|
+
end
|
|
320
|
+
# verify the required parameter 'fraud_rule_search_request' is set
|
|
321
|
+
if @api_client.config.client_side_validation && fraud_rule_search_request.nil?
|
|
322
|
+
fail ArgumentError, "Missing the required parameter 'fraud_rule_search_request' when calling FraudApi.search_fraud_rules"
|
|
323
|
+
end
|
|
324
|
+
# resource path
|
|
325
|
+
local_var_path = '/fraud/rules/search'
|
|
326
|
+
|
|
327
|
+
# query parameters
|
|
328
|
+
query_params = opts[:query_params] || {}
|
|
329
|
+
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
|
330
|
+
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
|
331
|
+
query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
|
|
332
|
+
|
|
333
|
+
# header parameters
|
|
334
|
+
header_params = opts[:header_params] || {}
|
|
335
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
336
|
+
# HTTP header 'Accept' (if needed)
|
|
337
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
338
|
+
# HTTP header 'Content-Type'
|
|
339
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
340
|
+
if !content_type.nil?
|
|
341
|
+
header_params['Content-Type'] = content_type
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# form parameters
|
|
345
|
+
form_params = opts[:form_params] || {}
|
|
346
|
+
|
|
347
|
+
# http body (model)
|
|
348
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(fraud_rule_search_request)
|
|
349
|
+
|
|
350
|
+
# return_type
|
|
351
|
+
return_type = opts[:debug_return_type] || 'FraudRulesResponse'
|
|
352
|
+
|
|
353
|
+
# auth_names
|
|
354
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
355
|
+
|
|
356
|
+
new_options = opts.merge(
|
|
357
|
+
:operation => :"FraudApi.search_fraud_rules",
|
|
358
|
+
:header_params => header_params,
|
|
359
|
+
:query_params => query_params,
|
|
360
|
+
:form_params => form_params,
|
|
361
|
+
:body => post_body,
|
|
362
|
+
:auth_names => auth_names,
|
|
363
|
+
:return_type => return_type
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
367
|
+
if @api_client.config.debugging
|
|
368
|
+
@api_client.config.logger.debug "API called: FraudApi#search_fraud_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
369
|
+
end
|
|
370
|
+
return data, status_code, headers
|
|
371
|
+
end
|
|
372
|
+
end
|
|
373
|
+
end
|
|
@@ -126,10 +126,10 @@ module UltracartClient
|
|
|
126
126
|
# @param client_id [String] The OAuth application client_id.
|
|
127
127
|
# @param scope [String] The application-level scope (e.g., crm, ultraship).
|
|
128
128
|
# @param [Hash] opts the optional parameters
|
|
129
|
-
# @return [
|
|
129
|
+
# @return [OauthDeviceAuthorizationResponse]
|
|
130
130
|
def oauth_device_authorize(client_id, scope, opts = {})
|
|
131
|
-
oauth_device_authorize_with_http_info(client_id, scope, opts)
|
|
132
|
-
|
|
131
|
+
data, _status_code, _headers = oauth_device_authorize_with_http_info(client_id, scope, opts)
|
|
132
|
+
data
|
|
133
133
|
end
|
|
134
134
|
|
|
135
135
|
# Initiate a device authorization flow.
|
|
@@ -137,7 +137,7 @@ module UltracartClient
|
|
|
137
137
|
# @param client_id [String] The OAuth application client_id.
|
|
138
138
|
# @param scope [String] The application-level scope (e.g., crm, ultraship).
|
|
139
139
|
# @param [Hash] opts the optional parameters
|
|
140
|
-
# @return [Array<(
|
|
140
|
+
# @return [Array<(OauthDeviceAuthorizationResponse, Integer, Hash)>] OauthDeviceAuthorizationResponse data, response status code and response headers
|
|
141
141
|
def oauth_device_authorize_with_http_info(client_id, scope, opts = {})
|
|
142
142
|
if @api_client.config.debugging
|
|
143
143
|
@api_client.config.logger.debug 'Calling API: OauthApi.oauth_device_authorize ...'
|
|
@@ -176,7 +176,7 @@ module UltracartClient
|
|
|
176
176
|
post_body = opts[:debug_body]
|
|
177
177
|
|
|
178
178
|
# return_type
|
|
179
|
-
return_type = opts[:debug_return_type]
|
|
179
|
+
return_type = opts[:debug_return_type] || 'OauthDeviceAuthorizationResponse'
|
|
180
180
|
|
|
181
181
|
# auth_names
|
|
182
182
|
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|