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

New SDK version: v4 #20

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

New SDK version: v4 #20

wants to merge 7 commits into from

Conversation

iDiegoNL
Copy link
Member

@iDiegoNL iDiegoNL commented May 1, 2024

This pull request is still heavily worked on, and is not ready to be merged or used yet.


SDK checklist:

  • Remove static functions
  • Rework SDK structure
  • Bump minimum PHP version to 8.2
  • Add Pint
  • Update & improve README

And most importantly:

  • v4 API is ready

iDiegoNL and others added 3 commits April 30, 2024 15:42
* Remove all static function references from models

* Remove all static mappers

* Remove ApiClient.php

* Remove RequestException.php
# Conflicts:
#	src/ApiClient.php
#	src/Enum/CustomAttributeTypes.php
#	src/Enum/GiftcardType.php
#	src/Enum/RewardAttributeDataTypes.php
#	src/Enum/RewardType.php
#	src/Exceptions/Error.php
#	src/Exceptions/ExceptionMapper.php
#	src/Exceptions/PiggyRequestException.php
#	src/Exceptions/RequestException.php
#	src/Http/BaseClient.php
#	src/Http/Responses/AuthenticationResponse.php
#	src/Http/Responses/Response.php
#	src/Http/Traits/SetsOAuthResources.php
#	src/Http/Traits/SetsRegisterResources.php
#	src/Mappers/Automations/AutomationMapper.php
#	src/Mappers/Automations/AutomationsMapper.php
#	src/Mappers/BaseMapper.php
#	src/Mappers/Brandkit/BrandkitMapper.php
#	src/Mappers/Contacts/AttributesMapper.php
#	src/Mappers/Contacts/ContactAttributesMapper.php
#	src/Mappers/Contacts/ContactsMapper.php
#	src/Mappers/Contacts/SubscriptionTypesMapper.php
#	src/Mappers/Contacts/SubscriptionsMapper.php
#	src/Mappers/ContactsPortal/ContactsPortalAuthUrlMapper.php
#	src/Mappers/Forms/FormMapper.php
#	src/Mappers/Forms/FormsMapper.php
#	src/Mappers/Giftcards/GiftcardMapper.php
#	src/Mappers/Giftcards/GiftcardProgramMapper.php
#	src/Mappers/Giftcards/GiftcardProgramsMapper.php
#	src/Mappers/Giftcards/GiftcardTransactionMapper.php
#	src/Mappers/Giftcards/GiftcardTransactionSettlementMapper.php
#	src/Mappers/Giftcards/GiftcardTransactionsMapper.php
#	src/Mappers/Loyalty/CreditBalanceMapper.php
#	src/Mappers/Loyalty/LoyaltyProgramMapper.php
#	src/Mappers/Loyalty/LoyaltyTransactionAttributes/LoyaltyTransactionAttributeMapper.php
#	src/Mappers/Loyalty/LoyaltyTransactionAttributes/LoyaltyTransactionAttributesMapper.php
#	src/Mappers/Loyalty/LoyaltyTransactionMapper.php
#	src/Mappers/Loyalty/MediaMapper.php
#	src/Mappers/Loyalty/Receptions/CreditReceptionMapper.php
#	src/Mappers/Loyalty/Receptions/DigitalRewardReceptionMapper.php
#	src/Mappers/Loyalty/Receptions/PhysicalRewardReceptionMapper.php
#	src/Mappers/Loyalty/Receptions/RewardReceptionMapper.php
#	src/Mappers/Loyalty/RewardAttributes/RewardAttributesMapper.php
#	src/Mappers/Loyalty/Rewards/CollectableRewardMapper.php
#	src/Mappers/Loyalty/Rewards/CollectableRewardsMapper.php
#	src/Mappers/Loyalty/Rewards/DigitalRewardCodeMapper.php
#	src/Mappers/Loyalty/Rewards/DigitalRewardMapper.php
#	src/Mappers/Loyalty/Rewards/PhysicalRewardMapper.php
#	src/Mappers/Loyalty/Rewards/RewardsMapper.php
#	src/Mappers/OAuthTokenMapper.php
#	src/Mappers/PortalSessions/PortalSessionMapper.php
#	src/Mappers/Prepaid/PrepaidBalanceMapper.php
#	src/Mappers/Prepaid/PrepaidTransactionMapper.php
#	src/Mappers/Registers/RegisterMapper.php
#	src/Mappers/Shops/ShopMapper.php
#	src/Mappers/Shops/ShopsMapper.php
#	src/Mappers/Tiers/TierMapper.php
#	src/Mappers/Tiers/TiersMapper.php
#	src/Mappers/Units/UnitMapper.php
#	src/Mappers/Units/UnitsMapper.php
#	src/Mappers/Vouchers/LockMapper.php
#	src/Mappers/Vouchers/PromotionAttributeMapper.php
#	src/Mappers/Vouchers/PromotionAttributesMapper.php
#	src/Mappers/Vouchers/PromotionMapper.php
#	src/Mappers/Vouchers/PromotionsMapper.php
#	src/Mappers/Vouchers/VoucherLockMapper.php
#	src/Mappers/Vouchers/VoucherMapper.php
#	src/Mappers/Vouchers/VouchersMapper.php
#	src/Mappers/WebhookSubscriptions/WebhookSubscriptionMapper.php
#	src/Mappers/WebhookSubscriptions/WebhookSubscriptionsMapper.php
#	src/Models/Automations/Automation.php
#	src/Models/Brandkit/Brandkit.php
#	src/Models/Contacts/Attribute.php
#	src/Models/Contacts/Contact.php
#	src/Models/Contacts/ContactAttribute.php
#	src/Models/Contacts/ContactIdentifier.php
#	src/Models/Contacts/ContactVerification.php
#	src/Models/Contacts/Subscription.php
#	src/Models/Contacts/SubscriptionType.php
#	src/Models/ContactsPortal/ContactsPortal.php
#	src/Models/ContactsPortal/ContactsPortalAuthUrl.php
#	src/Models/CustomAttributes/CustomAttribute.php
#	src/Models/Forms/Form.php
#	src/Models/Giftcards/Giftcard.php
#	src/Models/Giftcards/GiftcardProgram.php
#	src/Models/Giftcards/GiftcardTransaction.php
#	src/Models/Loyalty/CreditBalance.php
#	src/Models/Loyalty/LoyaltyProgram.php
#	src/Models/Loyalty/Media.php
#	src/Models/Loyalty/Receptions/CreditReception.php
#	src/Models/Loyalty/Receptions/DigitalRewardReception.php
#	src/Models/Loyalty/Receptions/PhysicalRewardReception.php
#	src/Models/Loyalty/Receptions/RewardReception.php
#	src/Models/Loyalty/RewardAttributes/RewardAttribute.php
#	src/Models/Loyalty/Rewards/CollectableReward.php
#	src/Models/Loyalty/Rewards/DigitalReward.php
#	src/Models/Loyalty/Rewards/DigitalRewardCode.php
#	src/Models/Loyalty/Rewards/PhysicalReward.php
#	src/Models/Loyalty/Rewards/Reward.php
#	src/Models/Loyalty/Token/LoyaltyToken.php
#	src/Models/Loyalty/Transactions/LoyaltyTransaction.php
#	src/Models/Loyalty/Transactions/LoyaltyTransactionAttribute.php
#	src/Models/Loyalty/Unit.php
#	src/Models/OAuthToken.php
#	src/Models/PortalSessions/PortalSession.php
#	src/Models/Prepaid/PrepaidBalance.php
#	src/Models/Prepaid/PrepaidTransaction.php
#	src/Models/Referrals/Referral.php
#	src/Models/Registers/Register.php
#	src/Models/Shops/Shop.php
#	src/Models/Tiers/Tier.php
#	src/Models/Vouchers/Promotion.php
#	src/Models/Vouchers/PromotionAttribute.php
#	src/Models/Vouchers/Voucher.php
#	src/Models/WebhookSubscriptions/WebhookSubscription.php
#	src/OAuthClient.php
#	src/OAuthClientApiKey.php
#	src/RegisterClient.php
#	src/Resources/BaseResource.php
#	src/Resources/OAuth/Automations/AutomationsResource.php
#	src/Resources/OAuth/Brandkit/BrandkitResource.php
#	src/Resources/OAuth/ContactSubscriptionsResource.php
#	src/Resources/OAuth/Contacts/ContactAttributesResource.php
#	src/Resources/OAuth/Contacts/ContactIdentifiersResource.php
#	src/Resources/OAuth/Contacts/ContactVerificationResource.php
#	src/Resources/OAuth/Contacts/ContactsResource.php
#	src/Resources/OAuth/ContactsPortal/ContactsPortalAuthUrlResource.php
#	src/Resources/OAuth/Forms/FormsResource.php
#	src/Resources/OAuth/Giftcards/GiftcardTransactionsResource.php
#	src/Resources/OAuth/Giftcards/GiftcardsResource.php
#	src/Resources/OAuth/Giftcards/Program/GiftcardProgramsResource.php
#	src/Resources/OAuth/Loyalty/Program/LoyaltyProgramsResource.php
#	src/Resources/OAuth/Loyalty/Receptions/CreditReceptionsResource.php
#	src/Resources/OAuth/Loyalty/Receptions/LoyaltyTransactionAttributesResource.php
#	src/Resources/OAuth/Loyalty/Receptions/LoyaltyTransactionsResource.php
#	src/Resources/OAuth/Loyalty/Receptions/RewardReceptionsResource.php
#	src/Resources/OAuth/Loyalty/Rewards/CollectableRewardsResource.php
#	src/Resources/OAuth/Loyalty/Rewards/RewardAttributesResource.php
#	src/Resources/OAuth/Loyalty/Rewards/RewardsResource.php
#	src/Resources/OAuth/Loyalty/Tokens/LoyaltyTokensResource.php
#	src/Resources/OAuth/PortalSessions/PortalSessionsResource.php
#	src/Resources/OAuth/PrepaidTransactionsResource.php
#	src/Resources/OAuth/Shops/ShopsResource.php
#	src/Resources/OAuth/SubscriptionTypesResource.php
#	src/Resources/OAuth/Tiers/TiersResource.php
#	src/Resources/OAuth/Units/UnitsResource.php
#	src/Resources/OAuth/Vouchers/PromotionAttributesResource.php
#	src/Resources/OAuth/Vouchers/PromotionsResource.php
#	src/Resources/OAuth/Vouchers/VouchersResource.php
#	src/Resources/OAuth/WebhookSubscriptions/WebhookSubscriptionsResource.php
#	src/Resources/Register/ContactIdentifiersResource.php
#	src/Resources/Register/Contacts/ContactsResource.php
#	src/Resources/Register/Giftcards/GiftcardTransactionsResource.php
#	src/Resources/Register/Giftcards/GiftcardsResource.php
#	src/Resources/Register/Loyalty/Receptions/CreditReceptionsResource.php
#	src/Resources/Register/Loyalty/Receptions/RewardReceptionsResource.php
#	src/Resources/Register/Loyalty/Rewards/RewardsResource.php
#	src/Resources/Register/PrepaidTransactionResource.php
#	src/Resources/Register/Registers/RegisterResource.php
#	src/StaticMappers/Automations/AutomationMapper.php
#	src/StaticMappers/Automations/AutomationsMapper.php
#	src/StaticMappers/BaseMapper.php
#	src/StaticMappers/Brandkit/BrandkitMapper.php
#	src/StaticMappers/ContactIdentifiers/ContactIdentifierMapper.php
#	src/StaticMappers/Contacts/AttributeMapper.php
#	src/StaticMappers/Contacts/AttributesMapper.php
#	src/StaticMappers/Contacts/ContactAttributeMapper.php
#	src/StaticMappers/Contacts/ContactAttributesMapper.php
#	src/StaticMappers/Contacts/ContactMapper.php
#	src/StaticMappers/Contacts/ContactsMapper.php
#	src/StaticMappers/Contacts/SubscriptionMapper.php
#	src/StaticMappers/Contacts/SubscriptionTypeMapper.php
#	src/StaticMappers/Contacts/SubscriptionTypesMapper.php
#	src/StaticMappers/Contacts/SubscriptionsMapper.php
#	src/StaticMappers/ContactsPortal/ContactsPortalMapper.php
#	src/StaticMappers/CustomAttributes/CustomAttributeMapper.php
#	src/StaticMappers/CustomAttributes/CustomAttributesMapper.php
#	src/StaticMappers/CustomAttributes/GroupMapper.php
#	src/StaticMappers/Forms/FormMapper.php
#	src/StaticMappers/Forms/FormsMapper.php
#	src/StaticMappers/Giftcards/GiftcardMapper.php
#	src/StaticMappers/Giftcards/GiftcardProgramMapper.php
#	src/StaticMappers/Giftcards/GiftcardProgramsMapper.php
#	src/StaticMappers/Giftcards/GiftcardTransactionMapper.php
#	src/StaticMappers/Giftcards/GiftcardTransactionSettlementMapper.php
#	src/StaticMappers/Giftcards/GiftcardTransactionsMapper.php
#	src/StaticMappers/Loyalty/CreditBalanceMapper.php
#	src/StaticMappers/Loyalty/LoyaltyProgramMapper.php
#	src/StaticMappers/Loyalty/LoyaltyTransactionAttributes/LoyaltyTransactionAttributeMapper.php
#	src/StaticMappers/Loyalty/LoyaltyTransactionAttributes/LoyaltyTransactionAttributesMapper.php
#	src/StaticMappers/Loyalty/LoyaltyTransactionMapper.php
#	src/StaticMappers/Loyalty/MediaMapper.php
#	src/StaticMappers/Loyalty/Receptions/CreditReceptionMapper.php
#	src/StaticMappers/Loyalty/Receptions/DigitalRewardReceptionMapper.php
#	src/StaticMappers/Loyalty/Receptions/PhysicalRewardReceptionMapper.php
#	src/StaticMappers/Loyalty/Receptions/RewardReceptionMapper.php
#	src/StaticMappers/Loyalty/RewardAttributes/RewardAttributeMapper.php
#	src/StaticMappers/Loyalty/RewardAttributes/RewardAttributesMapper.php
#	src/StaticMappers/Loyalty/Rewards/CollectableRewardMapper.php
#	src/StaticMappers/Loyalty/Rewards/CollectableRewardsMapper.php
#	src/StaticMappers/Loyalty/Rewards/DigitalRewardCodeMapper.php
#	src/StaticMappers/Loyalty/Rewards/DigitalRewardMapper.php
#	src/StaticMappers/Loyalty/Rewards/PhysicalRewardMapper.php
#	src/StaticMappers/Loyalty/Rewards/RewardMapper.php
#	src/StaticMappers/Loyalty/Rewards/RewardsMapper.php
#	src/StaticMappers/OAuthTokenMapper.php
#	src/StaticMappers/PortalSessions/PortalSessionMapper.php
#	src/StaticMappers/Prepaid/PrepaidBalanceMapper.php
#	src/StaticMappers/Prepaid/PrepaidTransactionMapper.php
#	src/StaticMappers/Referrals/ReferralMapper.php
#	src/StaticMappers/Referrals/ReferralsMapper.php
#	src/StaticMappers/Shops/ShopMapper.php
#	src/StaticMappers/Shops/ShopsMapper.php
#	src/StaticMappers/Tiers/TierMapper.php
#	src/StaticMappers/Tiers/TiersMapper.php
#	src/StaticMappers/Units/UnitMapper.php
#	src/StaticMappers/Units/UnitsMapper.php
#	src/StaticMappers/Vouchers/LockMapper.php
#	src/StaticMappers/Vouchers/PromotionAttributeMapper.php
#	src/StaticMappers/Vouchers/PromotionAttributesMapper.php
#	src/StaticMappers/Vouchers/PromotionMapper.php
#	src/StaticMappers/Vouchers/PromotionsMapper.php
#	src/StaticMappers/Vouchers/VoucherLockMapper.php
#	src/StaticMappers/Vouchers/VoucherMapper.php
#	src/StaticMappers/Vouchers/VouchersMapper.php
#	src/StaticMappers/WebhookSubscriptions/WebhookSubscriptionMapper.php
#	src/StaticMappers/WebhookSubscriptions/WebhookSubscriptionsMapper.php
#	tests/BaseTestCase.php
#	tests/OAuth/Automations/AutomationsResourceTest.php
#	tests/OAuth/Brandkit/BrandkitResourceTest.php
#	tests/OAuth/ContactSubscriptionResourceTest.php
#	tests/OAuth/Contacts/ContactIdentifiersResourceTest.php
#	tests/OAuth/Contacts/ContactVerificationResourceTest.php
#	tests/OAuth/Contacts/ContactsResourceTest.php
#	tests/OAuth/Giftcards/GiftcardTransactionsResourceTest.php
#	tests/OAuth/Giftcards/GiftcardsResourceTest.php
#	tests/OAuth/Loyalty/Program/LoyaltyProgramResourceTest.php
#	tests/OAuth/Loyalty/Receptions/CreditReceptionsResourceTest.php
#	tests/OAuth/Loyalty/Receptions/RewardReceptionsResourceTest.php
#	tests/OAuth/Loyalty/Rewards/CollectableRewardsResourceTest.php
#	tests/OAuth/Loyalty/Rewards/RewardsResourceTest.php
#	tests/OAuth/Loyalty/Tokens/LoyaltyTokenResourceTest.php
#	tests/OAuth/PortalSessions/PortalSessionsResourceTest.php
#	tests/OAuth/PrepaidTransactionResourceTest.php
#	tests/OAuth/SubscriptionTypesResourceTest.php
#	tests/OAuth/Vouchers/PromotionsResourceTest.php
#	tests/OAuth/WebhookSubscriptions/WebhookSubscriptionsResourceTest.php
#	tests/OAuthTestCase.php
@iDiegoNL iDiegoNL self-assigned this May 1, 2024
Thibaux and others added 4 commits May 1, 2024 15:50
* Upgrade php version

* Update workflow

* Feedback PR
* Upgrade php version

* Update workflow

* Added Pint as dep

* Added pint workflow

* Like this i think

* Add emojis to workflow

* added ./

* added matrix

* this

* this?

* package dan maar?

* Pint workflow changes

* Test if the Pint workflow works?

* Auto-commit: Format PHP style with Pint

* Use PHP 8.2 for PHPStan workflow

* Always run PHPStan workflow on PR

* Minor Pint workflow improvements

* Test if Pint workflow works

* Auto-commit: Format PHP style with Pint

* Attempt to pass Pint workflow?

* Auto-commit: Format PHP style with Pint

* Maybe like this?

* Maybe like this?

* Auto-commit: Format PHP style with Pint

* Maybe like this?

* Auto-commit: Format PHP style with Pint

---------

Co-authored-by: Diego Relyveld <[email protected]>
Co-authored-by: iDiegoNL <[email protected]>
# Conflicts:
#	src/StaticMappers/Loyalty/Receptions/CreditReceptionMapper.php
#	src/StaticMappers/Loyalty/Receptions/DigitalRewardReceptionMapper.php
#	src/StaticMappers/Loyalty/Receptions/PhysicalRewardReceptionMapper.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants