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.



782
783
784
# File 'lib/google/apis/adsense_v2/classes.rb', line 782

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)


759
760
761
# File 'lib/google/apis/adsense_v2/classes.rb', line 759

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 (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type. DateTime * google.protobuf.Timestamp Corresponds to the JSON property date



771
772
773
# File 'lib/google/apis/adsense_v2/classes.rb', line 771

def date
  @date
end

#nameString

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)


780
781
782
# File 'lib/google/apis/adsense_v2/classes.rb', line 780

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



787
788
789
790
791
# File 'lib/google/apis/adsense_v2/classes.rb', line 787

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