Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add create_bundle_id & create_bundle_id_capability support #101

Merged
merged 5 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
app_store_connect (0.23.0)
app_store_connect (0.25.0)
activesupport (>= 6.0.3.1)
jwt (>= 1.4, <= 2.2.1)
mixpanel-ruby (<= 2.2.0)
Expand Down
10 changes: 10 additions & 0 deletions lib/app_store_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require 'app_store_connect/version'

require 'app_store_connect/bundle_id_create_request'
require 'app_store_connect/bundle_id_capability_create_request'
require 'app_store_connect/certificate_create_request'
require 'app_store_connect/device_create_request'
require 'app_store_connect/user_invitation_create_request'
Expand All @@ -18,5 +19,14 @@ module AppStoreConnect

class << self
attr_accessor :config

def rel(id, type, array = false)
if array
return {data: [{id: id, type: type}]}.freeze
else
return {data: {id: id, type: type}}.freeze
end
end

end
end
15 changes: 15 additions & 0 deletions lib/app_store_connect/bundle_id_capability_create_request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

require 'app_store_connect/create_request'

module AppStoreConnect
class BundleIdCapabilityCreateRequest < CreateRequest
data do
type 'bundleIdCapabilities'

attributes do
property :capability_type, required: true
end
end
end
end
2 changes: 1 addition & 1 deletion lib/app_store_connect/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module AppStoreConnect
VERSION = '0.23.0'
VERSION = '0.25.0'
end
12 changes: 12 additions & 0 deletions lib/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@
"http_body_type": "UserInvitationCreateRequest",
"http_method": "post"
},
{
"alias": "create_bundle_id",
"url": "https://api.appstoreconnect.apple.com/v1/bundleIds",
"http_body_type": "BundleIdCreateRequest",
"http_method": "post"
},
{
"alias": "create_bundle_id_capability",
"url": "https://api.appstoreconnect.apple.com/v1/bundleIdCapabilities",
"http_body_type": "BundleIdCapabilityCreateRequest",
"http_method": "post"
},
{
"http_method": "get",
"url": "https://api.appstoreconnect.apple.com/v1/users",
Expand Down