Class: OnlinePayments::SDK::Merchant::Products::GetPaymentProductParams

Inherits:
Communication::ParamRequest show all
Defined in:
lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb

Overview

Query parameters for Get payment product (/v2/merchantId/products/paymentProductId)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountInteger

Returns the current value of amount.

Returns:

  • (Integer)

    the current value of amount



20
21
22
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 20

def amount
  @amount
end

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    the current value of country_code



20
21
22
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 20

def country_code
  @country_code
end

#currency_codeString

Returns the current value of currency_code.

Returns:

  • (String)

    the current value of currency_code



20
21
22
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 20

def currency_code
  @currency_code
end

#hideArray<String>

Returns the current value of hide.

Returns:

  • (Array<String>)

    the current value of hide



20
21
22
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 20

def hide
  @hide
end

#is_recurringtrue/false

Returns the current value of is_recurring.

Returns:

  • (true/false)

    the current value of is_recurring



20
21
22
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 20

def is_recurring
  @is_recurring
end

#localeString

Returns the current value of locale.

Returns:

  • (String)

    the current value of locale



20
21
22
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 20

def locale
  @locale
end

#operation_typeString

Returns the current value of operation_type.

Returns:

  • (String)

    the current value of operation_type



20
21
22
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 20

def operation_type
  @operation_type
end

Instance Method Details

#add_hide(value) ⇒ Object

Adds the parameter value to the hide Array

Parameters:

  • value (String)


39
40
41
42
43
44
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 39

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

#to_request_parametersArray<OnlinePayments::SDK::Communication::RequestParam>

Returns representing the attributes of this class.

Returns:



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb', line 47

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