class Wegift::Product

Constants

PATH

Attributes

availability[RW]

response/success

barcode_format[RW]

response/success

card_image_url[RW]

response/success

categories[RW]

response/success

code[RW]

response/success

countries[RW]

response/success

currency_code[RW]

response/success

denomination_type[RW]

response/success

description[RW]

response/success

e_code_usage_type[RW]

response/success

expiry_date_policy[RW]

response/success

maximum_value[RW]

response/success

minimum_value[RW]

response/success

name[RW]

response/success

product_code[RW]

request/payload

redeem_instructions_html[RW]

response/success

state[RW]

response/success

terms_and_conditions_html[RW]

response/success

terms_and_conditions_pdf_url[RW]

response/success

terms_and_conditions_url[RW]

response/success

Public Class Methods

new(params = {}) click to toggle source
Calls superclass method Initializable::new
# File lib/wegift/models/product.rb, line 23
def initialize(params = {})
  super
end

Public Instance Methods

get(ctx) click to toggle source

Product Details List GET /api/b2b-sync/v1/products/ID

# File lib/wegift/models/product.rb, line 33
def get(ctx)
  response = ctx.request(:get, path)
  parse(response)
end
parse(response) click to toggle source
Calls superclass method Wegift::Response#parse
# File lib/wegift/models/product.rb, line 38
def parse(response)
  super(response)

  Wegift::Product.new(@payload)
end
path() click to toggle source
# File lib/wegift/models/product.rb, line 27
def path
  [PATH, @product_code.to_s].join('/')
end