google-cloud-recaptcha_enterprise-v1beta1 0.6.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/client.rb +13 -9
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/rest/client.rb +438 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/rest/service_stub.rb +168 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/rest.rb +52 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service.rb +7 -1
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/rest.rb +37 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/version.rb +1 -1
- data/lib/google/cloud/recaptcha_enterprise/v1beta1.rb +7 -2
- data/lib/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_pb.rb +101 -0
- data/proto_docs/google/api/client.rb +324 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.rb +391 -37
- data/proto_docs/google/protobuf/duration.rb +98 -0
- metadata +16 -8
@@ -34,6 +34,127 @@ module Google
|
|
34
34
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
35
35
|
end
|
36
36
|
|
37
|
+
# Describes an event in the lifecycle of a payment transaction.
|
38
|
+
# @!attribute [rw] event_type
|
39
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionEvent::TransactionEventType]
|
40
|
+
# Optional. The type of this transaction event.
|
41
|
+
# @!attribute [rw] reason
|
42
|
+
# @return [::String]
|
43
|
+
# Optional. The reason or standardized code that corresponds with this
|
44
|
+
# transaction event, if one exists. For example, a CHARGEBACK event with code
|
45
|
+
# 6005.
|
46
|
+
# @!attribute [rw] value
|
47
|
+
# @return [::Float]
|
48
|
+
# Optional. The value that corresponds with this transaction event, if one
|
49
|
+
# exists. For example, a refund event where $5.00 was refunded. Currency is
|
50
|
+
# obtained from the original transaction data.
|
51
|
+
# @!attribute [rw] event_time
|
52
|
+
# @return [::Google::Protobuf::Timestamp]
|
53
|
+
# Optional. Timestamp when this transaction event occurred; otherwise assumed
|
54
|
+
# to be the time of the API call.
|
55
|
+
class TransactionEvent
|
56
|
+
include ::Google::Protobuf::MessageExts
|
57
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
58
|
+
|
59
|
+
# Enum that represents an event in the payment transaction lifecycle.
|
60
|
+
module TransactionEventType
|
61
|
+
# Default, unspecified event type.
|
62
|
+
TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0
|
63
|
+
|
64
|
+
# Indicates that the transaction is approved by the merchant. The
|
65
|
+
# accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY',
|
66
|
+
# 'CYBERSOURCE', or 'MANUAL_REVIEW'.
|
67
|
+
MERCHANT_APPROVE = 1
|
68
|
+
|
69
|
+
# Indicates that the transaction is denied and concluded due to risks
|
70
|
+
# detected by the merchant. The accompanying reasons can include terms such
|
71
|
+
# as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'.
|
72
|
+
MERCHANT_DENY = 2
|
73
|
+
|
74
|
+
# Indicates that the transaction is being evaluated by a human, due to
|
75
|
+
# suspicion or risk.
|
76
|
+
MANUAL_REVIEW = 3
|
77
|
+
|
78
|
+
# Indicates that the authorization attempt with the card issuer succeeded.
|
79
|
+
AUTHORIZATION = 4
|
80
|
+
|
81
|
+
# Indicates that the authorization attempt with the card issuer failed.
|
82
|
+
# The accompanying reasons can include Visa's '54' indicating that the card
|
83
|
+
# is expired, or '82' indicating that the CVV is incorrect.
|
84
|
+
AUTHORIZATION_DECLINE = 5
|
85
|
+
|
86
|
+
# Indicates that the transaction is completed because the funds were
|
87
|
+
# settled.
|
88
|
+
PAYMENT_CAPTURE = 6
|
89
|
+
|
90
|
+
# Indicates that the transaction could not be completed because the funds
|
91
|
+
# were not settled.
|
92
|
+
PAYMENT_CAPTURE_DECLINE = 7
|
93
|
+
|
94
|
+
# Indicates that the transaction has been canceled. Specify the reason
|
95
|
+
# for the cancellation. For example, 'INSUFFICIENT_INVENTORY'.
|
96
|
+
CANCEL = 8
|
97
|
+
|
98
|
+
# Indicates that the merchant has received a chargeback inquiry due to
|
99
|
+
# fraud for the transaction, requesting additional information before a
|
100
|
+
# fraud chargeback is officially issued and a formal chargeback
|
101
|
+
# notification is sent.
|
102
|
+
CHARGEBACK_INQUIRY = 9
|
103
|
+
|
104
|
+
# Indicates that the merchant has received a chargeback alert due to fraud
|
105
|
+
# for the transaction. The process of resolving the dispute without
|
106
|
+
# involving the payment network is started.
|
107
|
+
CHARGEBACK_ALERT = 10
|
108
|
+
|
109
|
+
# Indicates that a fraud notification is issued for the transaction, sent
|
110
|
+
# by the payment instrument's issuing bank because the transaction appears
|
111
|
+
# to be fraudulent. We recommend including TC40 or SAFE data in the
|
112
|
+
# `reason` field for this event type. For partial chargebacks, we recommend
|
113
|
+
# that you include an amount in the `value` field.
|
114
|
+
FRAUD_NOTIFICATION = 11
|
115
|
+
|
116
|
+
# Indicates that the merchant is informed by the payment network that the
|
117
|
+
# transaction has entered the chargeback process due to fraud. Reason code
|
118
|
+
# examples include Discover's '6005' and '6041'. For partial chargebacks,
|
119
|
+
# we recommend that you include an amount in the `value` field.
|
120
|
+
CHARGEBACK = 12
|
121
|
+
|
122
|
+
# Indicates that the transaction has entered the chargeback process due to
|
123
|
+
# fraud, and that the merchant has chosen to enter representment. Reason
|
124
|
+
# examples include Discover's '6005' and '6041'. For partial chargebacks,
|
125
|
+
# we recommend that you include an amount in the `value` field.
|
126
|
+
CHARGEBACK_REPRESENTMENT = 13
|
127
|
+
|
128
|
+
# Indicates that the transaction has had a fraud chargeback which was
|
129
|
+
# illegitimate and was reversed as a result. For partial chargebacks, we
|
130
|
+
# recommend that you include an amount in the `value` field.
|
131
|
+
CHARGEBACK_REVERSE = 14
|
132
|
+
|
133
|
+
# Indicates that the merchant has received a refund for a completed
|
134
|
+
# transaction. For partial refunds, we recommend that you include an amount
|
135
|
+
# in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of
|
136
|
+
# exempt tax)
|
137
|
+
REFUND_REQUEST = 15
|
138
|
+
|
139
|
+
# Indicates that the merchant has received a refund request for this
|
140
|
+
# transaction, but that they have declined it. For partial refunds, we
|
141
|
+
# recommend that you include an amount in the `value` field. Reason
|
142
|
+
# example: 'TAX_EXEMPT' (partial refund of exempt tax)
|
143
|
+
REFUND_DECLINE = 16
|
144
|
+
|
145
|
+
# Indicates that the completed transaction was refunded by the merchant.
|
146
|
+
# For partial refunds, we recommend that you include an amount in the
|
147
|
+
# `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt
|
148
|
+
# tax)
|
149
|
+
REFUND = 17
|
150
|
+
|
151
|
+
# Indicates that the completed transaction was refunded by the merchant,
|
152
|
+
# and that this refund was reversed. For partial refunds, we recommend that
|
153
|
+
# you include an amount in the `value` field.
|
154
|
+
REFUND_REVERSE = 18
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
37
158
|
# The request message to annotate an Assessment.
|
38
159
|
# @!attribute [rw] name
|
39
160
|
# @return [::String]
|
@@ -41,19 +162,24 @@ module Google
|
|
41
162
|
# "projects/\\{project_number}/assessments/\\{assessment_id}".
|
42
163
|
# @!attribute [rw] annotation
|
43
164
|
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Annotation]
|
44
|
-
# Optional. The annotation that will be assigned to the Event. This field can
|
45
|
-
# empty to provide reasons that apply to an event without concluding
|
46
|
-
# the event is legitimate or fraudulent.
|
165
|
+
# Optional. The annotation that will be assigned to the Event. This field can
|
166
|
+
# be left empty to provide reasons that apply to an event without concluding
|
167
|
+
# whether the event is legitimate or fraudulent.
|
47
168
|
# @!attribute [rw] reasons
|
48
169
|
# @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Reason>]
|
49
|
-
# Optional. Optional reasons for the annotation that will be assigned to the
|
170
|
+
# Optional. Optional reasons for the annotation that will be assigned to the
|
171
|
+
# Event.
|
50
172
|
# @!attribute [rw] hashed_account_id
|
51
173
|
# @return [::String]
|
52
|
-
# Optional. Optional unique stable hashed user identifier to apply to the
|
53
|
-
# This is an alternative to setting the hashed_account_id in
|
174
|
+
# Optional. Optional unique stable hashed user identifier to apply to the
|
175
|
+
# assessment. This is an alternative to setting the hashed_account_id in
|
54
176
|
# CreateAssessment, for example when the account identifier is not yet known
|
55
177
|
# in the initial request. It is recommended that the identifier is hashed
|
56
178
|
# using hmac-sha256 with stable secret.
|
179
|
+
# @!attribute [rw] transaction_event
|
180
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionEvent]
|
181
|
+
# Optional. If the assessment is part of a payment transaction, provide
|
182
|
+
# details on payment lifecycle events that occur in the transaction.
|
57
183
|
class AnnotateAssessmentRequest
|
58
184
|
include ::Google::Protobuf::MessageExts
|
59
185
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -85,21 +211,38 @@ module Google
|
|
85
211
|
# Default unspecified reason.
|
86
212
|
REASON_UNSPECIFIED = 0
|
87
213
|
|
88
|
-
# Indicates a chargeback issued
|
89
|
-
# When possible, specify the type by using CHARGEBACK_FRAUD or
|
214
|
+
# Indicates that the transaction had a chargeback issued with no other
|
215
|
+
# details. When possible, specify the type by using CHARGEBACK_FRAUD or
|
90
216
|
# CHARGEBACK_DISPUTE instead.
|
91
217
|
CHARGEBACK = 1
|
92
218
|
|
93
|
-
# Indicates a chargeback related to an
|
94
|
-
# from the cardholder's perspective (for
|
95
|
-
# stolen).
|
219
|
+
# Indicates that the transaction had a chargeback issued related to an
|
220
|
+
# alleged unauthorized transaction from the cardholder's perspective (for
|
221
|
+
# example, the card number was stolen).
|
96
222
|
CHARGEBACK_FRAUD = 8
|
97
223
|
|
98
|
-
# Indicates a chargeback related to the
|
99
|
-
# card details but allegedly not being
|
100
|
-
# (for example, misrepresentation, attempted
|
224
|
+
# Indicates that the transaction had a chargeback issued related to the
|
225
|
+
# cardholder having provided their card details but allegedly not being
|
226
|
+
# satisfied with the purchase (for example, misrepresentation, attempted
|
227
|
+
# cancellation).
|
101
228
|
CHARGEBACK_DISPUTE = 9
|
102
229
|
|
230
|
+
# Indicates that the completed payment transaction was refunded by the
|
231
|
+
# seller.
|
232
|
+
REFUND = 10
|
233
|
+
|
234
|
+
# Indicates that the completed payment transaction was determined to be
|
235
|
+
# fraudulent by the seller, and was cancelled and refunded as a result.
|
236
|
+
REFUND_FRAUD = 11
|
237
|
+
|
238
|
+
# Indicates that the payment transaction was accepted, and the user was
|
239
|
+
# charged.
|
240
|
+
TRANSACTION_ACCEPTED = 12
|
241
|
+
|
242
|
+
# Indicates that the payment transaction was declined, for example due to
|
243
|
+
# invalid card details.
|
244
|
+
TRANSACTION_DECLINED = 13
|
245
|
+
|
103
246
|
# Indicates the transaction associated with the assessment is suspected of
|
104
247
|
# being fraudulent based on the payment method, billing details, shipping
|
105
248
|
# address or other transaction information.
|
@@ -122,6 +265,10 @@ module Google
|
|
122
265
|
|
123
266
|
# Indicates the user provided an incorrect password.
|
124
267
|
INCORRECT_PASSWORD = 6
|
268
|
+
|
269
|
+
# Indicates that the user sent unwanted and abusive messages to other users
|
270
|
+
# of the platform, such as spam, scams, phishing, or social engineering.
|
271
|
+
SOCIAL_SPAM = 14
|
125
272
|
end
|
126
273
|
end
|
127
274
|
|
@@ -134,22 +281,23 @@ module Google
|
|
134
281
|
# Password leak verification info.
|
135
282
|
# @!attribute [rw] hashed_user_credentials
|
136
283
|
# @return [::String]
|
137
|
-
# Optional. Scrypt hash of the username+password that the customer wants to
|
138
|
-
# against a known password leak.
|
284
|
+
# Optional. Scrypt hash of the username+password that the customer wants to
|
285
|
+
# verify against a known password leak.
|
139
286
|
# @!attribute [r] credentials_leaked
|
140
287
|
# @return [::Boolean]
|
141
|
-
# Output only. Whether or not the user's credentials are present in a known
|
288
|
+
# Output only. Whether or not the user's credentials are present in a known
|
289
|
+
# leak.
|
142
290
|
# @!attribute [rw] canonicalized_username
|
143
291
|
# @return [::String]
|
144
|
-
# Optional. The username part of the user credentials for which we want to
|
145
|
-
# leak check in canonicalized form. This is the same data used to
|
146
|
-
# hashed_user_credentials on the customer side.
|
292
|
+
# Optional. The username part of the user credentials for which we want to
|
293
|
+
# trigger a leak check in canonicalized form. This is the same data used to
|
294
|
+
# create the hashed_user_credentials on the customer side.
|
147
295
|
class PasswordLeakVerification
|
148
296
|
include ::Google::Protobuf::MessageExts
|
149
297
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
150
298
|
end
|
151
299
|
|
152
|
-
# A
|
300
|
+
# A reCAPTCHA Enterprise assessment resource.
|
153
301
|
# @!attribute [r] name
|
154
302
|
# @return [::String]
|
155
303
|
# Output only. The resource name for the Assessment in the format
|
@@ -176,8 +324,11 @@ module Google
|
|
176
324
|
# environment.
|
177
325
|
# @!attribute [rw] account_defender_assessment
|
178
326
|
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::AccountDefenderAssessment]
|
179
|
-
# Assessment returned by
|
327
|
+
# Assessment returned by account defender when a hashed_account_id is
|
180
328
|
# provided.
|
329
|
+
# @!attribute [rw] fraud_prevention_assessment
|
330
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::FraudPreventionAssessment]
|
331
|
+
# Assessment returned by Fraud Prevention when TransactionData is provided.
|
181
332
|
class Assessment
|
182
333
|
include ::Google::Protobuf::MessageExts
|
183
334
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -203,38 +354,202 @@ module Google
|
|
203
354
|
# Too little traffic has been received from this site thus far to generate
|
204
355
|
# quality risk analysis.
|
205
356
|
LOW_CONFIDENCE_SCORE = 5
|
357
|
+
|
358
|
+
# The request matches behavioral characteristics of a carding attack.
|
359
|
+
SUSPECTED_CARDING = 6
|
360
|
+
|
361
|
+
# The request matches behavioral characteristics of chargebacks for fraud.
|
362
|
+
SUSPECTED_CHARGEBACK = 7
|
206
363
|
end
|
207
364
|
end
|
208
365
|
|
209
366
|
# @!attribute [rw] token
|
210
367
|
# @return [::String]
|
211
|
-
# Optional. The user response token provided by the reCAPTCHA
|
212
|
-
# on your site.
|
368
|
+
# Optional. The user response token provided by the reCAPTCHA Enterprise
|
369
|
+
# client-side integration on your site.
|
213
370
|
# @!attribute [rw] site_key
|
214
371
|
# @return [::String]
|
215
|
-
# Optional. The site key that was used to invoke reCAPTCHA on your
|
216
|
-
# the token.
|
372
|
+
# Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
|
373
|
+
# site and generate the token.
|
217
374
|
# @!attribute [rw] user_agent
|
218
375
|
# @return [::String]
|
219
|
-
# Optional. The user agent present in the request from the user's device
|
220
|
-
# this event.
|
376
|
+
# Optional. The user agent present in the request from the user's device
|
377
|
+
# related to this event.
|
221
378
|
# @!attribute [rw] user_ip_address
|
222
379
|
# @return [::String]
|
223
|
-
# Optional. The IP address in the request from the user's device related to
|
380
|
+
# Optional. The IP address in the request from the user's device related to
|
381
|
+
# this event.
|
224
382
|
# @!attribute [rw] expected_action
|
225
383
|
# @return [::String]
|
226
|
-
# Optional. The expected action for this type of event. This should be the
|
227
|
-
# provided at token generation time on client-side platforms
|
228
|
-
# integrated with recaptcha enterprise.
|
384
|
+
# Optional. The expected action for this type of event. This should be the
|
385
|
+
# same action provided at token generation time on client-side platforms
|
386
|
+
# already integrated with recaptcha enterprise.
|
229
387
|
# @!attribute [rw] hashed_account_id
|
230
388
|
# @return [::String]
|
231
|
-
# Optional.
|
232
|
-
# identifier
|
389
|
+
# Optional. Unique stable hashed user identifier for the request. The
|
390
|
+
# identifier must be hashed using hmac-sha256 with stable secret.
|
391
|
+
# @!attribute [rw] transaction_data
|
392
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionData]
|
393
|
+
# Optional. Data describing a payment transaction to be assessed. Sending
|
394
|
+
# this data enables reCAPTCHA Enterprise Fraud Prevention and the
|
395
|
+
# FraudPreventionAssessment component in the response.
|
233
396
|
class Event
|
234
397
|
include ::Google::Protobuf::MessageExts
|
235
398
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
236
399
|
end
|
237
400
|
|
401
|
+
# Transaction data associated with a payment protected by reCAPTCHA Enterprise.
|
402
|
+
# All fields are optional.
|
403
|
+
# @!attribute [rw] transaction_id
|
404
|
+
# @return [::String]
|
405
|
+
# Unique identifier for the transaction. This custom identifier can be used
|
406
|
+
# to reference this transaction in the future, for example, labeling a refund
|
407
|
+
# or chargeback event. Two attempts at the same transaction should use the
|
408
|
+
# same transaction id.
|
409
|
+
# @!attribute [rw] payment_method
|
410
|
+
# @return [::String]
|
411
|
+
# The payment method for the transaction. The allowed values are:
|
412
|
+
#
|
413
|
+
# * credit-card
|
414
|
+
# * debit-card
|
415
|
+
# * gift-card
|
416
|
+
# * processor-\\{name} (If a third-party is used, for example,
|
417
|
+
# processor-paypal)
|
418
|
+
# * custom-\\{name} (If an alternative method is used, for example,
|
419
|
+
# custom-crypto)
|
420
|
+
# @!attribute [rw] card_bin
|
421
|
+
# @return [::String]
|
422
|
+
# The Bank Identification Number - generally the first 6 or 8 digits of the
|
423
|
+
# card.
|
424
|
+
# @!attribute [rw] card_last_four
|
425
|
+
# @return [::String]
|
426
|
+
# The last four digits of the card.
|
427
|
+
# @!attribute [rw] currency_code
|
428
|
+
# @return [::String]
|
429
|
+
# The currency code in ISO-4217 format.
|
430
|
+
# @!attribute [rw] value
|
431
|
+
# @return [::Float]
|
432
|
+
# The decimal value of the transaction in the specified currency.
|
433
|
+
# @!attribute [rw] shipping_value
|
434
|
+
# @return [::Float]
|
435
|
+
# The value of shipping in the specified currency. 0 for free or no shipping.
|
436
|
+
# @!attribute [rw] shipping_address
|
437
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionData::Address]
|
438
|
+
# Destination address if this transaction involves shipping a physical item.
|
439
|
+
# @!attribute [rw] billing_address
|
440
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionData::Address]
|
441
|
+
# Address associated with the payment method when applicable.
|
442
|
+
# @!attribute [rw] user
|
443
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionData::User]
|
444
|
+
# Information about the user paying/initiating the transaction.
|
445
|
+
# @!attribute [rw] merchants
|
446
|
+
# @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionData::User>]
|
447
|
+
# Information about the user or users fulfilling the transaction.
|
448
|
+
# @!attribute [rw] items
|
449
|
+
# @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionData::Item>]
|
450
|
+
# Items purchased in this transaction.
|
451
|
+
# @!attribute [rw] gateway_info
|
452
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TransactionData::GatewayInfo]
|
453
|
+
# Information about the payment gateway's response to the transaction.
|
454
|
+
class TransactionData
|
455
|
+
include ::Google::Protobuf::MessageExts
|
456
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
457
|
+
|
458
|
+
# Structured address format for billing and shipping addresses.
|
459
|
+
# @!attribute [rw] recipient
|
460
|
+
# @return [::String]
|
461
|
+
# The recipient name, potentially including information such as "care of".
|
462
|
+
# @!attribute [rw] address
|
463
|
+
# @return [::Array<::String>]
|
464
|
+
# The first lines of the address. The first line generally contains the
|
465
|
+
# street name and number, and further lines may include information such as
|
466
|
+
# an apartment number.
|
467
|
+
# @!attribute [rw] locality
|
468
|
+
# @return [::String]
|
469
|
+
# The town/city of the address.
|
470
|
+
# @!attribute [rw] administrative_area
|
471
|
+
# @return [::String]
|
472
|
+
# The state, province, or otherwise administrative area of the address.
|
473
|
+
# @!attribute [rw] region_code
|
474
|
+
# @return [::String]
|
475
|
+
# The CLDR country/region of the address.
|
476
|
+
# @!attribute [rw] postal_code
|
477
|
+
# @return [::String]
|
478
|
+
# The postal or ZIP code of the address.
|
479
|
+
class Address
|
480
|
+
include ::Google::Protobuf::MessageExts
|
481
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
482
|
+
end
|
483
|
+
|
484
|
+
# Details about a user's account involved in the transaction.
|
485
|
+
# @!attribute [rw] account_id
|
486
|
+
# @return [::String]
|
487
|
+
# Unique account identifier for this user. If using account defender,
|
488
|
+
# this should match the hashed_account_id field. Otherwise, a unique and
|
489
|
+
# persistent identifier for this account.
|
490
|
+
# @!attribute [rw] creation_ms
|
491
|
+
# @return [::Integer]
|
492
|
+
# The epoch milliseconds of the user's account creation.
|
493
|
+
# @!attribute [rw] email
|
494
|
+
# @return [::String]
|
495
|
+
# The email address of the user.
|
496
|
+
# @!attribute [rw] email_verified
|
497
|
+
# @return [::Boolean]
|
498
|
+
# Whether the email has been verified to be accessible by the user (OTP or
|
499
|
+
# similar).
|
500
|
+
# @!attribute [rw] phone_number
|
501
|
+
# @return [::String]
|
502
|
+
# The phone number of the user, with country code.
|
503
|
+
# @!attribute [rw] phone_verified
|
504
|
+
# @return [::Boolean]
|
505
|
+
# Whether the phone number has been verified to be accessible by the user
|
506
|
+
# (OTP or similar).
|
507
|
+
class User
|
508
|
+
include ::Google::Protobuf::MessageExts
|
509
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
510
|
+
end
|
511
|
+
|
512
|
+
# Line items being purchased in this transaction.
|
513
|
+
# @!attribute [rw] name
|
514
|
+
# @return [::String]
|
515
|
+
# The full name of the item.
|
516
|
+
# @!attribute [rw] value
|
517
|
+
# @return [::Float]
|
518
|
+
# The value per item that the user is paying, in the transaction currency,
|
519
|
+
# after discounts.
|
520
|
+
# @!attribute [rw] quantity
|
521
|
+
# @return [::Integer]
|
522
|
+
# The quantity of this item that is being purchased.
|
523
|
+
# @!attribute [rw] merchant_account_id
|
524
|
+
# @return [::String]
|
525
|
+
# When a merchant is specified, its corresponding account_id. Necessary to
|
526
|
+
# populate marketplace-style transactions.
|
527
|
+
class Item
|
528
|
+
include ::Google::Protobuf::MessageExts
|
529
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
530
|
+
end
|
531
|
+
|
532
|
+
# Details about the transaction from the gateway.
|
533
|
+
# @!attribute [rw] name
|
534
|
+
# @return [::String]
|
535
|
+
# Name of the gateway service (for example, stripe, square, paypal).
|
536
|
+
# @!attribute [rw] gateway_response_code
|
537
|
+
# @return [::String]
|
538
|
+
# Gateway response code describing the state of the transaction.
|
539
|
+
# @!attribute [rw] avs_response_code
|
540
|
+
# @return [::String]
|
541
|
+
# AVS response code from the gateway
|
542
|
+
# (available only when reCAPTCHA Enterprise is called after authorization).
|
543
|
+
# @!attribute [rw] cvv_response_code
|
544
|
+
# @return [::String]
|
545
|
+
# CVV response code from the gateway
|
546
|
+
# (available only when reCAPTCHA Enterprise is called after authorization).
|
547
|
+
class GatewayInfo
|
548
|
+
include ::Google::Protobuf::MessageExts
|
549
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
550
|
+
end
|
551
|
+
end
|
552
|
+
|
238
553
|
# @!attribute [rw] valid
|
239
554
|
# @return [::Boolean]
|
240
555
|
# Whether the provided user response token is valid. When valid = false, the
|
@@ -276,7 +591,7 @@ module Google
|
|
276
591
|
DUPE = 4
|
277
592
|
|
278
593
|
# The user verification token did not match the provided site key.
|
279
|
-
# This may be a configuration error (
|
594
|
+
# This may be a configuration error (for example, development keys used in
|
280
595
|
# production) or end users trying to use verification tokens from other
|
281
596
|
# sites.
|
282
597
|
SITE_MISMATCH = 5
|
@@ -290,7 +605,46 @@ module Google
|
|
290
605
|
end
|
291
606
|
end
|
292
607
|
|
293
|
-
#
|
608
|
+
# Assessment for Fraud Prevention.
|
609
|
+
# @!attribute [rw] transaction_risk
|
610
|
+
# @return [::Float]
|
611
|
+
# Probability (0-1) of this transaction being fraudulent. Summarizes the
|
612
|
+
# combined risk of attack vectors below.
|
613
|
+
# @!attribute [rw] stolen_instrument_verdict
|
614
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::FraudPreventionAssessment::StolenInstrumentVerdict]
|
615
|
+
# Assessment of this transaction for risk of a stolen instrument.
|
616
|
+
# @!attribute [rw] card_testing_verdict
|
617
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::FraudPreventionAssessment::CardTestingVerdict]
|
618
|
+
# Assessment of this transaction for risk of being part of a card testing
|
619
|
+
# attack.
|
620
|
+
class FraudPreventionAssessment
|
621
|
+
include ::Google::Protobuf::MessageExts
|
622
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
623
|
+
|
624
|
+
# Information about stolen instrument fraud, where the user is not the
|
625
|
+
# legitimate owner of the instrument being used for the purchase.
|
626
|
+
# @!attribute [rw] risk
|
627
|
+
# @return [::Float]
|
628
|
+
# Probability (0-1) of this transaction being executed with a stolen
|
629
|
+
# instrument.
|
630
|
+
class StolenInstrumentVerdict
|
631
|
+
include ::Google::Protobuf::MessageExts
|
632
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
633
|
+
end
|
634
|
+
|
635
|
+
# Information about card testing fraud, where an adversary is testing
|
636
|
+
# fraudulently obtained cards or brute forcing their details.
|
637
|
+
# @!attribute [rw] risk
|
638
|
+
# @return [::Float]
|
639
|
+
# Probability (0-1) of this transaction attempt being part of a card
|
640
|
+
# testing attack.
|
641
|
+
class CardTestingVerdict
|
642
|
+
include ::Google::Protobuf::MessageExts
|
643
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
644
|
+
end
|
645
|
+
end
|
646
|
+
|
647
|
+
# Account defender risk assessment.
|
294
648
|
# @!attribute [rw] labels
|
295
649
|
# @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::AccountDefenderAssessment::AccountDefenderLabel>]
|
296
650
|
# Labels for this request.
|
@@ -298,7 +652,7 @@ module Google
|
|
298
652
|
include ::Google::Protobuf::MessageExts
|
299
653
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
300
654
|
|
301
|
-
# Labels returned by
|
655
|
+
# Labels returned by account defender for this request.
|
302
656
|
module AccountDefenderLabel
|
303
657
|
# Default unspecified type.
|
304
658
|
ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Duration represents a signed, fixed-length span of time represented
|
23
|
+
# as a count of seconds and fractions of seconds at nanosecond
|
24
|
+
# resolution. It is independent of any calendar and concepts like "day"
|
25
|
+
# or "month". It is related to Timestamp in that the difference between
|
26
|
+
# two Timestamp values is a Duration and it can be added or subtracted
|
27
|
+
# from a Timestamp. Range is approximately +-10,000 years.
|
28
|
+
#
|
29
|
+
# # Examples
|
30
|
+
#
|
31
|
+
# Example 1: Compute Duration from two Timestamps in pseudo code.
|
32
|
+
#
|
33
|
+
# Timestamp start = ...;
|
34
|
+
# Timestamp end = ...;
|
35
|
+
# Duration duration = ...;
|
36
|
+
#
|
37
|
+
# duration.seconds = end.seconds - start.seconds;
|
38
|
+
# duration.nanos = end.nanos - start.nanos;
|
39
|
+
#
|
40
|
+
# if (duration.seconds < 0 && duration.nanos > 0) {
|
41
|
+
# duration.seconds += 1;
|
42
|
+
# duration.nanos -= 1000000000;
|
43
|
+
# } else if (duration.seconds > 0 && duration.nanos < 0) {
|
44
|
+
# duration.seconds -= 1;
|
45
|
+
# duration.nanos += 1000000000;
|
46
|
+
# }
|
47
|
+
#
|
48
|
+
# Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
49
|
+
#
|
50
|
+
# Timestamp start = ...;
|
51
|
+
# Duration duration = ...;
|
52
|
+
# Timestamp end = ...;
|
53
|
+
#
|
54
|
+
# end.seconds = start.seconds + duration.seconds;
|
55
|
+
# end.nanos = start.nanos + duration.nanos;
|
56
|
+
#
|
57
|
+
# if (end.nanos < 0) {
|
58
|
+
# end.seconds -= 1;
|
59
|
+
# end.nanos += 1000000000;
|
60
|
+
# } else if (end.nanos >= 1000000000) {
|
61
|
+
# end.seconds += 1;
|
62
|
+
# end.nanos -= 1000000000;
|
63
|
+
# }
|
64
|
+
#
|
65
|
+
# Example 3: Compute Duration from datetime.timedelta in Python.
|
66
|
+
#
|
67
|
+
# td = datetime.timedelta(days=3, minutes=10)
|
68
|
+
# duration = Duration()
|
69
|
+
# duration.FromTimedelta(td)
|
70
|
+
#
|
71
|
+
# # JSON Mapping
|
72
|
+
#
|
73
|
+
# In JSON format, the Duration type is encoded as a string rather than an
|
74
|
+
# object, where the string ends in the suffix "s" (indicating seconds) and
|
75
|
+
# is preceded by the number of seconds, with nanoseconds expressed as
|
76
|
+
# fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
77
|
+
# encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
78
|
+
# be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
79
|
+
# microsecond should be expressed in JSON format as "3.000001s".
|
80
|
+
# @!attribute [rw] seconds
|
81
|
+
# @return [::Integer]
|
82
|
+
# Signed seconds of the span of time. Must be from -315,576,000,000
|
83
|
+
# to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
84
|
+
# 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
85
|
+
# @!attribute [rw] nanos
|
86
|
+
# @return [::Integer]
|
87
|
+
# Signed fractions of a second at nanosecond resolution of the span
|
88
|
+
# of time. Durations less than one second are represented with a 0
|
89
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
90
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
91
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
92
|
+
# to +999,999,999 inclusive.
|
93
|
+
class Duration
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|