Class: KeyReportRequest
- Inherits:
-
Object
- Object
- KeyReportRequest
- Defined in:
- lib/genba/key_report_request.rb
Overview
KeyReportRequest
Instance Attribute Summary collapse
-
#country_iso ⇒ Object
Returns the value of attribute country_iso.
-
#e_tailer_buying_price ⇒ Object
Returns the value of attribute e_tailer_buying_price.
-
#e_tailer_buying_price_currency_code ⇒ Object
Returns the value of attribute e_tailer_buying_price_currency_code.
-
#e_tailer_selling_price_currency_code ⇒ Object
Returns the value of attribute e_tailer_selling_price_currency_code.
-
#e_tailer_selling_price_gross ⇒ Object
Returns the value of attribute e_tailer_selling_price_gross.
-
#e_tailer_selling_price_net ⇒ Object
Returns the value of attribute e_tailer_selling_price_net.
-
#key ⇒ Object
Returns the value of attribute key.
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#sale_date ⇒ Object
Returns the value of attribute sale_date.
-
#user_ip_address ⇒ Object
Returns the value of attribute user_ip_address.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ KeyReportRequest
constructor
A new instance of KeyReportRequest.
- #to_genba_json_payload ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ KeyReportRequest
Returns a new instance of KeyReportRequest.
10 11 12 13 14 15 |
# File 'lib/genba/key_report_request.rb', line 10 def initialize(data = {}) @key = data[:key] @key_id = data[:key_id] @country_iso = data[:country_iso] @user_ip_address = data[:user_ip_address] end |
Instance Attribute Details
#country_iso ⇒ Object
Returns the value of attribute country_iso.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def country_iso @country_iso end |
#e_tailer_buying_price ⇒ Object
Returns the value of attribute e_tailer_buying_price.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def end |
#e_tailer_buying_price_currency_code ⇒ Object
Returns the value of attribute e_tailer_buying_price_currency_code.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def end |
#e_tailer_selling_price_currency_code ⇒ Object
Returns the value of attribute e_tailer_selling_price_currency_code.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def e_tailer_selling_price_currency_code @e_tailer_selling_price_currency_code end |
#e_tailer_selling_price_gross ⇒ Object
Returns the value of attribute e_tailer_selling_price_gross.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def e_tailer_selling_price_gross @e_tailer_selling_price_gross end |
#e_tailer_selling_price_net ⇒ Object
Returns the value of attribute e_tailer_selling_price_net.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def e_tailer_selling_price_net @e_tailer_selling_price_net end |
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def key @key end |
#key_id ⇒ Object
Returns the value of attribute key_id.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def key_id @key_id end |
#sale_date ⇒ Object
Returns the value of attribute sale_date.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def sale_date @sale_date end |
#user_ip_address ⇒ Object
Returns the value of attribute user_ip_address.
5 6 7 |
# File 'lib/genba/key_report_request.rb', line 5 def user_ip_address @user_ip_address end |
Instance Method Details
#to_genba_json_payload ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/genba/key_report_request.rb', line 17 def to_genba_json_payload { key: @key, keyId: @key_id, countryISO: @country_iso, saleDate: @sale_date, userIpAddress: @user_ip_address, : , : , ETailerSellingPriceNet: @e_tailer_selling_price_net, ETailerSellingPriceGross: @e_tailer_selling_price_gross, ETailerSellingPriceCurrencyCode: @e_tailer_selling_price_currency_code }.select { |_, v| !v.nil? } end |