pike13 0.1.0.beta → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +67 -116
  3. data/README.md +1222 -315
  4. data/lib/pike13/api/v2/account.rb +19 -0
  5. data/lib/pike13/api/v2/desk/booking.rb +10 -0
  6. data/lib/pike13/api/v2/desk/business.rb +2 -1
  7. data/lib/pike13/api/v2/desk/event_occurrence.rb +2 -2
  8. data/lib/pike13/api/v2/desk/person.rb +5 -3
  9. data/lib/pike13/api/v2/desk/plan.rb +2 -2
  10. data/lib/pike13/api/v2/desk/plan_product.rb +2 -2
  11. data/lib/pike13/api/v2/desk/service.rb +2 -2
  12. data/lib/pike13/api/v2/desk/visit.rb +2 -2
  13. data/lib/pike13/api/v2/front/branding.rb +2 -1
  14. data/lib/pike13/api/v2/front/business.rb +2 -1
  15. data/lib/pike13/api/v2/front/event_occurrence.rb +2 -2
  16. data/lib/pike13/api/v2/front/plan_product.rb +2 -2
  17. data/lib/pike13/api/v2/front/service.rb +2 -2
  18. data/lib/pike13/api/v2/front/visit.rb +2 -2
  19. data/lib/pike13/api/v3/desk/base.rb +46 -0
  20. data/lib/pike13/api/v3/desk/clients.rb +180 -0
  21. data/lib/pike13/api/v3/desk/enrollments.rb +203 -0
  22. data/lib/pike13/api/v3/desk/event_occurrence_staff_members.rb +170 -0
  23. data/lib/pike13/api/v3/desk/event_occurrences.rb +154 -0
  24. data/lib/pike13/api/v3/desk/invoice_item_transactions.rb +189 -0
  25. data/lib/pike13/api/v3/desk/invoice_items.rb +193 -0
  26. data/lib/pike13/api/v3/desk/invoices.rb +167 -0
  27. data/lib/pike13/api/v3/desk/monthly_business_metrics.rb +151 -0
  28. data/lib/pike13/api/v3/desk/pays.rb +128 -0
  29. data/lib/pike13/api/v3/desk/person_plans.rb +265 -0
  30. data/lib/pike13/api/v3/desk/staff_members.rb +127 -0
  31. data/lib/pike13/api/v3/desk/transactions.rb +169 -0
  32. data/lib/pike13/http_client.rb +4 -1
  33. data/lib/pike13/http_client_v3.rb +101 -0
  34. data/lib/pike13/validators.rb +136 -0
  35. data/lib/pike13/version.rb +1 -1
  36. data/lib/pike13.rb +26 -7
  37. metadata +17 -2
  38. data/lib/pike13/api/v2/account/me.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40ff200316bf806e4894c0689a8ca85b9eb607354bc63afafa62a8d1251b32d6
4
- data.tar.gz: 577c1d5e9ac786fedaf0f80251e600b927304c4ce5fdc4e110f4f6ad10033073
3
+ metadata.gz: 9952a78d601be88d6a496a250fd0a303ca3fcd1121eaefb4e3ade80fedf6182a
4
+ data.tar.gz: 9da1000c8ad902aea5b507b4b8a3c2f06fd7b27549e55eeb58140e8ca45810d1
5
5
  SHA512:
6
- metadata.gz: 1617471ee88b05382f2f8f16e9ad7c7fa436bf8fec5e213cade375dbd804e2775c5f46fc0069a58b74c6c4cc4b2b01ab59fe3d56d602da0196cf536ab2c519bb
7
- data.tar.gz: 44ff76cbb187f072d898c4d13484242c3f08a5a8981f454b71e0d01eb86f0d2526f58749f0911a9cbb162d4b1a48fdac41527981efd86c903066cbd6717e66f0
6
+ metadata.gz: 5d24f8ea42f18ff20c724cff011d2fea91c9261dd25690b93d97eae869b7561bebfd7acdada6584f7679a166d353d6b0c3064769bce892756937d2ec97e78da3
7
+ data.tar.gz: 46ea0e8d878b3843ea0e016caea97ed0ae3fa34463a683abafa9e7d460496e77849b66be9910fbf3c1f5aa0c14af8be2b3d4707f43015430222ccee3776a06fc
data/CHANGELOG.md CHANGED
@@ -7,128 +7,79 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.1.0] - 2025-01-27
10
+ ## [0.1.0] - 2025-10-31
11
+
12
+ Initial release with complete Pike13 API support.
11
13
 
12
14
  ### Added
13
15
 
14
16
  #### Core Infrastructure
15
- - HTTP client with Faraday and automatic retry (max 2 retries, exponential backoff)
16
- - Bearer token authentication
17
- - Automatic JSON response parsing
18
- - Global configuration management via `Pike13.configure`
19
- - URL validation supporting HTTP/HTTPS schemes and custom ports
20
- - Support for production (`mybiz.pike13.com`) and development (`http://mybiz.pike13.test:3000`) environments
21
-
22
- #### Error Handling
23
- - `Pike13::Error` - Base error class
24
- - `Pike13::ConfigurationError` - Configuration validation errors
25
- - `Pike13::APIError` - Base for HTTP errors
26
- - `Pike13::AuthenticationError` (401)
27
- - `Pike13::NotFoundError` (404)
28
- - `Pike13::ValidationError` (422)
29
- - `Pike13::RateLimitError` (429) with rate limit reset header tracking
30
- - `Pike13::ServerError` (5xx)
31
-
32
- #### Account Scope Resources
33
- Base URL: `https://pike13.com/api/v2`
34
-
35
- - **Account::Me** - Get current account details
36
- - **Account::Business** - List and find businesses
37
- - **Account::Person** - List and find people
38
- - **Account::Password** - Password reset/creation
39
- - **Account::Confirmation** - Email confirmation
40
-
41
- #### Desk Scope Resources (Staff Interface)
42
- Base URL: `https://[base_url]/api/v2`
43
-
44
- **People Management:**
45
- - **Desk::Person** - Full CRUD operations
46
- - List all people, find by ID, search, get authenticated user
47
- - Create, update, and delete people
48
-
49
- **Business & Locations:**
50
- - **Desk::Business** - Get business information
51
- - **Desk::Location** - List and find locations
52
-
53
- **Events & Scheduling:**
54
- - **Desk::Event** - List and find events
55
- - **Desk::EventOccurrence** - List and find occurrences, summaries, enrollment eligibility
56
- - **Desk::Appointment** - Find available slots and availability summaries
57
-
58
- **Bookings & Visits:**
59
- - **Desk::Booking** - Full CRUD operations for bookings
60
- - **Desk::Visit** - List and find visits, get visit summaries
61
-
62
- **Services & Staff:**
63
- - **Desk::Service** - List and find services, enrollment eligibility
64
- - **Desk::StaffMember** - List and find staff members, get authenticated staff
65
-
66
- **Plans & Products:**
67
- - **Desk::Plan** - List and find plans
68
- - **Desk::PlanProduct** - List and find plan products
69
- - **Desk::PackProduct** - List and find pack products
70
- - **Desk::Pack** - Find packs by ID
71
- - **Desk::Punch** - Find punches by ID
72
-
73
- **Financial:**
74
- - **Desk::Invoice** - List and find invoices
75
- - **Desk::Payment** - Find payments, void payments, get payment configuration
76
- - **Desk::Refund** - Find refunds, void refunds
77
- - **Desk::RevenueCategory** - List and find revenue categories
78
- - **Desk::SalesTax** - List and find sales taxes
79
-
80
- **Notes & Communication:**
81
- - **Desk::Note** - Full CRUD operations for person notes
82
- - List notes for a person
83
- - Create, update, and delete notes
84
-
85
- **Other Resources:**
86
- - **Desk::MakeUp** - Find make-ups, list reasons, generate make-up credits
87
- - **Desk::WaitlistEntry** - List and find waitlist entries
88
- - **Desk::CustomField** - List and find custom fields
89
-
90
- #### Front Scope Resources (Client Interface)
91
- Base URL: `https://[base_url]/api/v2`
92
-
93
- **Business & Branding:**
94
- - **Front::Business** - Get business information
95
- - **Front::Branding** - Get branding information
96
-
97
- **People:**
98
- - **Front::Person** - Get authenticated client user only
99
-
100
- **Events & Scheduling:**
101
- - **Front::Event** - List and find events
102
- - **Front::EventOccurrence** - List and find occurrences, summaries, enrollment eligibility
103
- - **Front::Appointment** - Find available slots and availability summaries
104
-
105
- **Bookings & Visits:**
106
- - **Front::Booking** - Full CRUD operations, find leases
107
- - **Front::Visit** - List and find visits
108
-
109
- **Services & Staff:**
110
- - **Front::Service** - List and find services, enrollment eligibility
111
- - **Front::StaffMember** - List and find staff members
112
- - **Front::Location** - List and find locations
113
-
114
- **Plans & Products:**
115
- - **Front::Plan** - List and find plans
116
- - **Front::PlanProduct** - List and find plan products
117
-
118
- **Financial:**
119
- - **Front::Invoice** - Find invoices by ID
120
- - **Front::Payment** - Find payments, get payment configuration
121
-
122
- **Other Resources:**
123
- - **Front::Note** - List and find person notes (read-only)
124
- - **Front::WaitlistEntry** - List and find waitlist entries
17
+ - HTTP client with HTTParty and automatic error handling
18
+ - Bearer token authentication with configurable base URLs
19
+ - Global configuration management with URL normalization
20
+ - Comprehensive error handling with specific HTTP status mappings
21
+ - Support for both production and development environments
22
+
23
+ #### API v2 - Core API
24
+ **Account Resources:**
25
+ - Account management and business listing
26
+ - Person management across businesses
27
+ - Password reset functionality
28
+ - Email confirmation system
29
+
30
+ **Desk Resources (Staff Interface):**
31
+ - Person CRUD operations with search functionality
32
+ - Business and location management
33
+ - Event and event occurrence scheduling
34
+ - Appointment availability and slot management
35
+ - Booking system with lease support
36
+ - Visit tracking and summaries
37
+ - Service management with enrollment eligibility
38
+ - Staff member management
39
+ - Plan, pack, and product management
40
+ - Invoice and payment processing
41
+ - Revenue category and sales tax management
42
+ - Note system for person records
43
+ - Make-up credit management
44
+ - Waitlist entry management
45
+ - Custom field support
46
+
47
+ **Front Resources (Client Interface):**
48
+ - Business and branding information
49
+ - Authenticated user access
50
+ - Event browsing and enrollment eligibility
51
+ - Appointment booking with lease support
52
+ - Payment method management
53
+ - Read-only access to appropriate resources
54
+
55
+ #### API v3 - Reporting API
56
+ Complete reporting analytics with 12 endpoints:
57
+ - Monthly business metrics
58
+ - Client demographics and engagement analysis
59
+ - Transaction records with payment breakdowns
60
+ - Invoice tracking and revenue analysis
61
+ - Enrollment and attendance patterns
62
+ - Event occurrence analytics
63
+ - Staff workload and assignment tracking
64
+ - Invoice item details
65
+ - Transaction-level payment/refund tracking
66
+ - Staff compensation data
67
+ - Client plan ownership metrics
68
+ - Complete staff roster management
69
+
70
+ #### Technical Features
71
+ - Ruby >= 3.0.0 compatibility
72
+ - Faraday HTTP client with retry middleware
73
+ - Comprehensive test coverage (93% line coverage)
74
+ - RuboCop code quality enforcement
75
+ - SimpleCov coverage reporting
125
76
 
126
77
  ### Dependencies
127
- - `faraday` (~> 2.0) - HTTP client
128
- - `faraday-retry` (~> 2.0) - Automatic retry middleware
78
+ - `httparty` (~> 0.21) - HTTP client library
129
79
  - Ruby >= 3.0.0 required
130
80
 
131
81
  ### Development
132
- - RuboCop configuration for code quality
133
- - Minitest test suite with 99 tests, 93% line coverage
134
- - SimpleCov for test coverage reporting
82
+ - Minitest test suite with 300+ test methods
83
+ - SimpleCov for coverage reporting
84
+ - RuboCop for code quality
85
+ - GitHub Actions CI/CD ready