Class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1TransactionDataItem

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/recaptchaenterprise_v1/classes.rb,
lib/google/apis/recaptchaenterprise_v1/representations.rb,
lib/google/apis/recaptchaenterprise_v1/representations.rb

Overview

Line items being purchased in this transaction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecaptchaenterpriseV1TransactionDataItem

Returns a new instance of GoogleCloudRecaptchaenterpriseV1TransactionDataItem.



1811
1812
1813
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1811

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#merchant_account_id ⇒ String

Optional. When a merchant is specified, its corresponding account_id. Necessary to populate marketplace-style transactions. Corresponds to the JSON property merchantAccountId

Returns:

  • (String)


1793
1794
1795
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1793

def 
  @merchant_account_id
end

#name ⇒ String

Optional. The full name of the item. Corresponds to the JSON property name

Returns:

  • (String)


1798
1799
1800
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1798

def name
  @name
end

#quantity ⇒ Fixnum

Optional. The quantity of this item that is being purchased. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


1803
1804
1805
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1803

def quantity
  @quantity
end

#value ⇒ Float

Optional. The value per item that the user is paying, in the transaction currency, after discounts. Corresponds to the JSON property value

Returns:

  • (Float)


1809
1810
1811
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1809

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1816
1817
1818
1819
1820
1821
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1816

def update!(**args)
  @merchant_account_id = args[:merchant_account_id] if args.key?(:merchant_account_id)
  @name = args[:name] if args.key?(:name)
  @quantity = args[:quantity] if args.key?(:quantity)
  @value = args[:value] if args.key?(:value)
end