Class: Ingenico::Connect::SDK::Merchant::Products::GetProductParams

Inherits:
ParamRequest
  • Object
show all
Defined in:
lib/ingenico/connect/sdk/merchant/products/get_product_params.rb

Overview

Query parameters for Get payment product

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountInteger



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 20

def amount
  @amount
end

#country_codeString



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 20

def country_code
  @country_code
end

#currency_codeString



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 20

def currency_code
  @currency_code
end

#force_basic_flowtrue/false



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 20

def force_basic_flow
  @force_basic_flow
end

#hideArray<String>



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 20

def hide
  @hide
end

#is_recurringtrue/false



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 20

def is_recurring
  @is_recurring
end

#localeString



20
21
22
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 20

def locale
  @locale
end

Instance Method Details

#add_hide(value) ⇒ Object

Adds the parameter value to the hide Array



38
39
40
41
42
43
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 38

def add_hide(value)
  unless @hide
    @hide = []
  end
  @hide << value
end

#to_request_parametersArray<Ingenico::Connect::SDK::RequestParam>



46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/ingenico/connect/sdk/merchant/products/get_product_params.rb', line 46

def to_request_parameters
  result = []
  result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
  result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
  result << RequestParam.new('locale', @locale) unless @locale.nil?
  result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
  result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
  unless @hide.nil?
    @hide.each {|e| result << RequestParam.new('hide', e)}
  end
  result << RequestParam.new('forceBasicFlow', @force_basic_flow.to_s) unless @force_basic_flow.nil?
  result
end