Module: Google::Shopping::Merchant::Lfp
- Defined in:
- lib/google/shopping/merchant/lfp.rb,
lib/google/shopping/merchant/lfp/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
-
.lfp_inventory_service(version: :v1beta, transport: :grpc, &block) ⇒ ::Object
Create a new client object for LfpInventoryService.
-
.lfp_sale_service(version: :v1beta, transport: :grpc, &block) ⇒ ::Object
Create a new client object for LfpSaleService.
-
.lfp_store_service(version: :v1beta, transport: :grpc, &block) ⇒ ::Object
Create a new client object for LfpStoreService.
Class Method Details
.lfp_inventory_service(version: :v1beta, transport: :grpc, &block) ⇒ ::Object
Create a new client object for LfpInventoryService.
By default, this returns an instance of
Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client
for a gRPC client for version V1beta of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the LfpInventoryService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About LfpInventoryService
Service for a LFP partner to submit local inventories for a merchant.
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/google/shopping/merchant/lfp.rb', line 55 def self.lfp_inventory_service version: :v1beta, transport: :grpc, &block require "google/shopping/merchant/lfp/#{version.to_s.downcase}" package_name = Google::Shopping::Merchant::Lfp .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpInventoryService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.lfp_sale_service(version: :v1beta, transport: :grpc, &block) ⇒ ::Object
Create a new client object for LfpSaleService.
By default, this returns an instance of
Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client
for a gRPC client for version V1beta of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the LfpSaleService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About LfpSaleService
Service for a LFP partner to submit sales data for a merchant.
91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/google/shopping/merchant/lfp.rb', line 91 def self.lfp_sale_service version: :v1beta, transport: :grpc, &block require "google/shopping/merchant/lfp/#{version.to_s.downcase}" package_name = Google::Shopping::Merchant::Lfp .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpSaleService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.lfp_store_service(version: :v1beta, transport: :grpc, &block) ⇒ ::Object
Create a new client object for LfpStoreService.
By default, this returns an instance of
Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client
for a gRPC client for version V1beta of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the LfpStoreService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About LfpStoreService
Service for a LFP partner to submit local stores for a merchant.
127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/google/shopping/merchant/lfp.rb', line 127 def self.lfp_store_service version: :v1beta, transport: :grpc, &block require "google/shopping/merchant/lfp/#{version.to_s.downcase}" package_name = Google::Shopping::Merchant::Lfp .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpStoreService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |