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.



884
885
886
# File 'lib/google/apis/adsense_v2/classes.rb', line 884

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)


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

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



873
874
875
# File 'lib/google/apis/adsense_v2/classes.rb', line 873

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)


882
883
884
# File 'lib/google/apis/adsense_v2/classes.rb', line 882

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



889
890
891
892
893
# File 'lib/google/apis/adsense_v2/classes.rb', line 889

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