Class: Google::Apis::GanV1beta1::Event::Product

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Product

Returns a new instance of Product



940
941
942
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 940

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

Instance Attribute Details

#category_idString

Id of the category this product belongs to. Corresponds to the JSON property categoryId

Returns:

  • (String)


898
899
900
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 898

def category_id
  @category_id
end

#category_nameString

Name of the category this product belongs to. Corresponds to the JSON property categoryName

Returns:

  • (String)


903
904
905
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 903

def category_name
  @category_name
end

#earningsGoogle::Apis::GanV1beta1::Money

An ApiMoneyProto. Corresponds to the JSON property earnings



908
909
910
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 908

def earnings
  @earnings
end

#network_feeGoogle::Apis::GanV1beta1::Money

An ApiMoneyProto. Corresponds to the JSON property networkFee



913
914
915
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 913

def network_fee
  @network_fee
end

#publisher_feeGoogle::Apis::GanV1beta1::Money

An ApiMoneyProto. Corresponds to the JSON property publisherFee



918
919
920
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 918

def publisher_fee
  @publisher_fee
end

#quantityString

Quantity of this product bought/exchanged. Corresponds to the JSON property quantity

Returns:

  • (String)


923
924
925
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 923

def quantity
  @quantity
end

#skuString

Sku of this product. Corresponds to the JSON property sku

Returns:

  • (String)


928
929
930
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 928

def sku
  @sku
end

#sku_nameString

Sku name of this product. Corresponds to the JSON property skuName

Returns:

  • (String)


933
934
935
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 933

def sku_name
  @sku_name
end

#unit_priceGoogle::Apis::GanV1beta1::Money

An ApiMoneyProto. Corresponds to the JSON property unitPrice



938
939
940
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 938

def unit_price
  @unit_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



945
946
947
948
949
950
951
952
953
954
955
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 945

def update!(**args)
  @category_id = args[:category_id] if args.key?(:category_id)
  @category_name = args[:category_name] if args.key?(:category_name)
  @earnings = args[:earnings] if args.key?(:earnings)
  @network_fee = args[:network_fee] if args.key?(:network_fee)
  @publisher_fee = args[:publisher_fee] if args.key?(:publisher_fee)
  @quantity = args[:quantity] if args.key?(:quantity)
  @sku = args[:sku] if args.key?(:sku)
  @sku_name = args[:sku_name] if args.key?(:sku_name)
  @unit_price = args[:unit_price] if args.key?(:unit_price)
end