class Spaceship::Portal::Merchant
Attributes
@return (String
) The name you provided for this merchant @example
"Spaceship Production"
@return (String
) the supported platform of this merchant @example
"ios"
Prefix provided by the Dev Portal
@example
"5A9972XTK2"
@return (String
) Status of the merchant @example
"current"
Public Class Methods
@param mac [Bool] Fetches Mac merchant if true @return (Array
) Returns all merchants available for this account
# File spaceship/lib/spaceship/portal/merchant.rb, line 48 def all(mac: false) client.merchants(mac: mac).map { |merchant| new(merchant) } end
Creates a new Merchant
on the Apple Dev Portal
@param bundle_id
[String] the bundle id (merchant_identifier) of the merchant @param name [String] the name of the Merchant
@param mac [Bool] is this a Mac Merchant
? @return (Merchant
) The Merchant
you just created
# File spaceship/lib/spaceship/portal/merchant.rb, line 58 def create!(bundle_id: nil, name: nil, mac: false) new_merchant = client.create_merchant!(name, bundle_id, mac: mac) new(new_merchant) end
Find a specific Merchant
ID based on the bundle_id
@param mac [Bool] Searches Mac merchants if true @return (Merchant
) The Merchant
you're looking for. This is nil if the merchant can't be found.
# File spaceship/lib/spaceship/portal/merchant.rb, line 66 def find(bundle_id, mac: false) all(mac: mac).find do |merchant| merchant.bundle_id == bundle_id end end
Public Instance Methods
@return (Bool) Is this a Mac merchant?
# File spaceship/lib/spaceship/portal/merchant.rb, line 81 def mac? platform == 'mac' end