Class: MethodRuby::Resources::CardProducts

Inherits:
Object
  • Object
show all
Defined in:
lib/method_ruby/resources/card_products.rb

Overview

Card product definitions

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardProducts

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CardProducts.

Parameters:



39
40
41
# File 'lib/method_ruby/resources/card_products.rb', line 39

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(product_id, method_version:, request_options: {}) ⇒ MethodRuby::Models::CardProductRetrieveResponse

Some parameter documentations has been truncated, see Models::CardProductRetrieveParams for more details.

Returns a single card product by its identifier. Card products describe specific card programs from networks and issuers.

Parameters:

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/method_ruby/resources/card_products.rb', line 24

def retrieve(product_id, params)
  parsed, options = MethodRuby::CardProductRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["card_products/%1$s", product_id],
    headers: parsed.transform_keys(method_version: "method-version"),
    model: MethodRuby::Models::CardProductRetrieveResponse,
    security: {secret_key: true},
    options: options
  )
end