Class: AppStoreDevApi::Request::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/app_store_dev_api/request/body.rb

Direct Known Subclasses

ProfileCreateRequest, AppStoreDevApi::Requests::V1::App::Update, AppStoreDevApi::Requests::V1::AppAvailability::Create, AppStoreDevApi::Requests::V1::AppAvailability::Delete, AppStoreDevApi::Requests::V1::AppAvailability::Update, AppStoreDevApi::Requests::V1::AppInfo::Update, AppStoreDevApi::Requests::V1::AppInfoLocalizations::Create, AppStoreDevApi::Requests::V1::AppInfoLocalizations::Update, AppStoreDevApi::Requests::V1::AppPriceSchedule::Update, AppStoreDevApi::Requests::V1::AppPromotedPurchases::Update, AppStoreDevApi::Requests::V1::AppStoreReviewDetail::Create, AppStoreDevApi::Requests::V1::AppStoreReviewDetail::Update, AppStoreDevApi::Requests::V1::AppStoreVersion::Create, AppStoreDevApi::Requests::V1::AppStoreVersion::Update, AppStoreDevApi::Requests::V1::AppStoreVersionLocalization::Create, AppStoreDevApi::Requests::V1::AppStoreVersionLocalization::Update, AppStoreDevApi::Requests::V1::AppStoreVersionPhasedRelease::Create, AppStoreDevApi::Requests::V1::AppStoreVersionPhasedRelease::Update, AppStoreDevApi::Requests::V1::AppStoreVersionPromotion::Create, AppStoreDevApi::Requests::V1::AppStoreVersionReleaseRequest::Create, AppStoreDevApi::Requests::V1::AutoRenewableSubscriptionOfferCodeOneTimeUseCode::Update, AppStoreDevApi::Requests::V1::BetaBuildLocalization::Create, AppStoreDevApi::Requests::V1::BetaBuildLocalization::Update, AppStoreDevApi::Requests::V1::BuildBetaDetail::Update, AppStoreDevApi::Requests::V1::BuildBetaGroups::Create, AppStoreDevApi::Requests::V1::BuildBetaGroups::Delete, AppStoreDevApi::Requests::V1::BuildUpdateRequest::Update, AppStoreDevApi::Requests::V1::BundleId::Create, AppStoreDevApi::Requests::V1::BundleIdCapability::Create, AppStoreDevApi::Requests::V1::Certificate::Create, AppStoreDevApi::Requests::V1::CustomerReviewResponse::Create, AppStoreDevApi::Requests::V1::Device::Create, AppStoreDevApi::Requests::V1::InAppPurchaseAvailability::Create, AppStoreDevApi::Requests::V1::InAppPurchaseLocalization::Create, AppStoreDevApi::Requests::V1::InAppPurchaseLocalization::Update, AppStoreDevApi::Requests::V1::InAppPurchasePriceSchedule::Create, AppStoreDevApi::Requests::V1::InAppPurchaseReviewScreenshot::Create, AppStoreDevApi::Requests::V1::InAppPurchaseReviewScreenshot::Update, AppStoreDevApi::Requests::V1::InAppPurchaseSubmission::Create, AppStoreDevApi::Requests::V1::Profile::Create, AppStoreDevApi::Requests::V1::PromotedPurchases::Create, AppStoreDevApi::Requests::V1::PromotedPurchases::Update, AppStoreDevApi::Requests::V1::PromotedPurchasesImage::Create, AppStoreDevApi::Requests::V1::PromotedPurchasesImage::Update, AppStoreDevApi::Requests::V1::ReviewSubmissionCreateRequest::Create, AppStoreDevApi::Requests::V1::ReviewSubmissionItemCreateRequest::Create, AppStoreDevApi::Requests::V1::Subscription::Create, AppStoreDevApi::Requests::V1::Subscription::Update, AppStoreDevApi::Requests::V1::SubscriptionAvailability::Create, AppStoreDevApi::Requests::V1::SubscriptionGracePeriod::Update, AppStoreDevApi::Requests::V1::SubscriptionGroup::Create, AppStoreDevApi::Requests::V1::SubscriptionGroup::Update, AppStoreDevApi::Requests::V1::SubscriptionGroupLocalization::Create, AppStoreDevApi::Requests::V1::SubscriptionGroupLocalization::Update, AppStoreDevApi::Requests::V1::SubscriptionGroupSubmission::Create, AppStoreDevApi::Requests::V1::SubscriptionIntroductoryOffer::Create, AppStoreDevApi::Requests::V1::SubscriptionIntroductoryOffer::Delete, AppStoreDevApi::Requests::V1::SubscriptionIntroductoryOffer::Update, AppStoreDevApi::Requests::V1::SubscriptionLocalization::Create, AppStoreDevApi::Requests::V1::SubscriptionLocalization::Update, AppStoreDevApi::Requests::V1::SubscriptionOfferCode::Create, AppStoreDevApi::Requests::V1::SubscriptionOfferCode::Update, AppStoreDevApi::Requests::V1::SubscriptionOfferCodeCustomCode::Create, AppStoreDevApi::Requests::V1::SubscriptionOfferCodeCustomCode::Update, AppStoreDevApi::Requests::V1::SubscriptionOfferCodeOneTimeUseCode::Create, AppStoreDevApi::Requests::V1::SubscriptionPrice::Create, AppStoreDevApi::Requests::V1::SubscriptionPriceChangeConsentReason::Create, AppStoreDevApi::Requests::V1::SubscriptionPromotionalOffers::Create, AppStoreDevApi::Requests::V1::SubscriptionPromotionalOffers::Update, AppStoreDevApi::Requests::V1::SubscriptionReviewScreenshot::Create, AppStoreDevApi::Requests::V1::SubscriptionReviewScreenshot::Update, AppStoreDevApi::Requests::V1::SubscriptionSubmission::Create, AppStoreDevApi::Requests::V2::InAppPurchase::Create, AppStoreDevApi::Requests::V2::InAppPurchase::Update, AppStoreDevApi::Requests::V2::SandboxTester::Create, AppStoreDevApi::Requests::V2::SandboxTester::Update, AppStoreDevApi::Requests::V2::SandboxTestersClearPurchaseHistory::Update, UserInvitationCreateRequest

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ Body

Returns a new instance of Body.



13
14
15
16
# File 'lib/app_store_dev_api/request/body.rb', line 13

def initialize(**kwargs)
  @included = self.class::Included.new([*kwargs.delete(:included)])
  @data = self.class::Data.new(**kwargs)
end

Class Method Details

.inherited(klass) ⇒ Object



6
7
8
9
10
11
# File 'lib/app_store_dev_api/request/body.rb', line 6

def self.inherited(klass)
  super

  klass.include(Object::Included)
  klass.include(Object::Data)
end

Instance Method Details

#to_hObject



18
19
20
21
22
23
# File 'lib/app_store_dev_api/request/body.rb', line 18

def to_h
  {
    data: data.to_data_type,
    included: included.to_a
  }
end