Class: Google::Apis::AdsenseV2::Payment

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

Overview

Representation of an unpaid or paid payment. See Payment timelines for AdSense for more information about payments and the YouTube homepage and payments account article for information about dedicated payments accounts for YouTube.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Payment

Returns a new instance of Payment.



855
856
857
# File 'lib/google/apis/adsense_v2/classes.rb', line 855

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

Instance Attribute Details

#amountString

Output only. The amount of unpaid or paid earnings, as a formatted string, including the currency. E.g. "¥1,235 JPY", "$1,234.57", "£87.65". Corresponds to the JSON property amount

Returns:

  • (String)


832
833
834
# File 'lib/google/apis/adsense_v2/classes.rb', line 832

def amount
  @amount
end

#dateGoogle::Apis::AdsenseV2::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property date



844
845
846
# File 'lib/google/apis/adsense_v2/classes.rb', line 844

def date
  @date
end

#nameString

Output only. Resource name of the payment. Format: - accounts/account/ payments/unpaid for unpaid (current) AdSense earnings. - accounts/account/ payments/youtube-unpaid for unpaid (current) YouTube earnings. - accounts/ account/payments/yyyy-MM-dd for paid AdSense earnings. - accounts/account/ payments/youtube-yyyy-MM-dd for paid YouTube earnings. Corresponds to the JSON property name

Returns:

  • (String)


853
854
855
# File 'lib/google/apis/adsense_v2/classes.rb', line 853

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



860
861
862
863
864
# File 'lib/google/apis/adsense_v2/classes.rb', line 860

def update!(**args)
  @amount = args[:amount] if args.key?(:amount)
  @date = args[:date] if args.key?(:date)
  @name = args[:name] if args.key?(:name)
end