class SpikePay::ProductsRequest

Attributes

attributes[R]

Public Class Methods

create(params) click to toggle source
# File lib/spike_pay/data_types.rb, line 126
def self.create(params)
  return params if params.is_a?(self)
  hash = case params
    when Hash; params
    else
      raise SpikePay::InvalidRequestError.new("#{self} does not accept the given value", params)
    end
  self.new(hash)
end
fields() click to toggle source
# File lib/spike_pay/data_types.rb, line 121
def self.fields
  ['id', 'title', 'description', 'language', 'price', 'currency', 'count', 'stock']
end
new(hash = {}) click to toggle source
# File lib/spike_pay/data_types.rb, line 136
def initialize(hash = {})
  hash = normalize_hash(hash)
  @attributes = hash
end

Public Instance Methods

count() click to toggle source
# File lib/spike_pay/data_types.rb, line 166
def count
  attributes['count']
end
currency() click to toggle source
# File lib/spike_pay/data_types.rb, line 162
def currency
  attributes['currency']
end
description() click to toggle source
# File lib/spike_pay/data_types.rb, line 150
def description
  attributes['description']
end
id() click to toggle source

attributes accessors

# File lib/spike_pay/data_types.rb, line 142
def id
  attributes['id']
end
language() click to toggle source
# File lib/spike_pay/data_types.rb, line 154
def language
  attributes['language']
end
price() click to toggle source
# File lib/spike_pay/data_types.rb, line 158
def price
  attributes['price']
end
stock() click to toggle source
# File lib/spike_pay/data_types.rb, line 170
def stock
  attributes['stock']
end
title() click to toggle source
# File lib/spike_pay/data_types.rb, line 146
def title
  attributes['title']
end