class Spaceship::Base

Spaceship::Base is the superclass for models in Apple Developer Portal. It’s mainly responsible for mapping responses to objects.

A class-level attribute ‘client` is used to maintain the spaceship which we are using to talk to ADP.

Example of creating a new ADP model:

class Widget < Spaceship::Base
  attr_accessor :id, :name, :foo_bar, :wiz_baz
  attr_mapping({
    'name' => :name,
    'fooBar' => :foo_bar,
    'wizBaz' => :wiz_baz
  })
end

When you want to instantiate a model pass in the parsed response: ‘Widget.new(widget_json)`