repull 0.2.15 → 0.2.17
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.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +149 -54
- data/lib/repull/api/billing_api.rb +4 -4
- data/lib/repull/api/booking_com_api.rb +122 -29
- data/lib/repull/api/conversations_api.rb +398 -4
- data/lib/repull/api/guests_api.rb +2 -2
- data/lib/repull/api/listings_api.rb +186 -16
- data/lib/repull/api/reservations_api.rb +157 -6
- data/lib/repull/api/webhooks_api.rb +10 -3
- data/lib/repull/models/accept_reservation_request200_response.rb +321 -0
- data/lib/repull/models/account_created_event.rb +95 -31
- data/lib/repull/models/account_disconnected_event.rb +95 -31
- data/lib/repull/models/ai_operation_completed_event.rb +95 -31
- data/lib/repull/models/ai_operation_failed_event.rb +95 -31
- data/lib/repull/models/airbnb_publish_result.rb +41 -2
- data/lib/repull/models/airbnb_reservation_action200_response.rb +157 -0
- data/lib/repull/models/airbnb_reservation_action_request.rb +248 -0
- data/lib/repull/models/booking_availability_update.rb +4 -20
- data/lib/repull/models/booking_availability_update_date_range.rb +193 -0
- data/lib/repull/models/booking_availability_update_request.rb +14 -3
- data/lib/repull/models/booking_pricing_rate_update.rb +32 -4
- data/lib/repull/models/booking_pricing_rate_update_date_range.rb +3 -0
- data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +10 -10
- data/lib/repull/models/booking_pricing_response.rb +16 -4
- data/lib/repull/models/booking_pricing_update_response.rb +82 -18
- data/lib/repull/models/booking_property.rb +107 -36
- data/lib/repull/models/booking_property_action_request.rb +176 -0
- data/lib/repull/models/booking_property_action_response.rb +281 -0
- data/lib/repull/models/booking_property_listings_inner.rb +244 -0
- data/lib/repull/models/booking_publish_result.rb +245 -0
- data/lib/repull/models/booking_publish_section_error.rb +220 -0
- data/lib/repull/models/booking_rate_write_occupancy.rb +187 -0
- data/lib/repull/models/booking_rate_write_price_half.rb +188 -0
- data/lib/repull/models/booking_rate_write_restriction_half.rb +212 -0
- data/lib/repull/models/booking_rate_write_verification.rb +200 -0
- data/lib/repull/models/booking_rate_write_verification_row.rb +196 -0
- data/lib/repull/models/booking_restriction_request_row.rb +199 -0
- data/lib/repull/models/booking_restriction_verification.rb +208 -0
- data/lib/repull/models/booking_restriction_verification_row.rb +203 -0
- data/lib/repull/models/booking_restriction_verification_row_booking_value.rb +105 -0
- data/lib/repull/models/booking_restriction_verification_row_expected.rb +105 -0
- data/lib/repull/models/booking_rooms_rates_response.rb +41 -7
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner.rb +12 -1
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner_rates_inner.rb +1 -0
- data/lib/repull/models/booking_setup_request.rb +44 -5
- data/lib/repull/models/booking_setup_request_legal_entity.rb +235 -0
- data/lib/repull/models/booking_upstream_failure.rb +204 -0
- data/lib/repull/models/calendar_updated_event.rb +95 -31
- data/lib/repull/models/channel_market_state_item.rb +291 -0
- data/lib/repull/models/conversation_message_attachment.rb +28 -1
- data/lib/repull/models/create_airbnb_offer_request.rb +93 -8
- data/lib/repull/models/create_airbnb_offer_request_guest_details.rb +279 -0
- data/lib/repull/models/create_conversation_special_offer201_response.rb +293 -0
- data/lib/repull/models/create_conversation_special_offer201_response_guests.rb +189 -0
- data/lib/repull/models/create_conversation_special_offer_request.rb +263 -0
- data/lib/repull/models/create_conversation_special_offer_request_guests.rb +263 -0
- data/lib/repull/models/decline_reservation_request_request.rb +234 -0
- data/lib/repull/models/error_error.rb +11 -1
- data/lib/repull/models/get_airbnb_offer200_response.rb +289 -0
- data/lib/repull/models/get_usage_summary200_response.rb +10 -1
- data/lib/repull/models/get_usage_summary200_response_limits.rb +11 -1
- data/lib/repull/models/get_usage_summary200_response_remaining.rb +11 -1
- data/lib/repull/models/get_usage_summary200_response_used.rb +10 -1
- data/lib/repull/models/get_usage_tier200_response.rb +10 -1
- data/lib/repull/models/get_usage_tier200_response_limits.rb +11 -1
- data/lib/repull/models/get_usage_tier200_response_remaining.rb +11 -1
- data/lib/repull/models/get_usage_tier200_response_used.rb +10 -1
- data/lib/repull/models/inquiry_created_event.rb +281 -0
- data/lib/repull/models/inquiry_created_payload.rb +185 -0
- data/lib/repull/models/inquiry_updated_event.rb +281 -0
- data/lib/repull/models/inquiry_updated_payload.rb +213 -0
- data/lib/repull/models/inquiry_webhook_object.rb +323 -0
- data/lib/repull/models/inquiry_webhook_object_expected_payout.rb +158 -0
- data/lib/repull/models/inquiry_webhook_object_guests.rb +188 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response.rb +170 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response_data_inner.rb +274 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response_pagination.rb +158 -0
- data/lib/repull/models/list_inquiries200_response.rb +192 -0
- data/lib/repull/models/list_inquiries200_response_data_inner.rb +418 -0
- data/lib/repull/models/list_inquiries200_response_data_inner_expected_payout.rb +159 -0
- data/lib/repull/models/list_inquiries200_response_data_inner_guests.rb +188 -0
- data/lib/repull/models/listing_address_readiness.rb +171 -0
- data/lib/repull/models/listing_content_update_request_address.rb +40 -3
- data/lib/repull/models/listing_create_request.rb +48 -2
- data/lib/repull/models/listing_created_event.rb +95 -31
- data/lib/repull/models/listing_deleted_event.rb +95 -31
- data/lib/repull/models/listing_deleted_payload.rb +55 -21
- data/lib/repull/models/listing_market_state_request.rb +149 -0
- data/lib/repull/models/listing_market_state_response.rb +221 -0
- data/lib/repull/models/listing_publish_booking_request.rb +149 -0
- data/lib/repull/models/{listing_publish_response.rb → listing_publish_booking_response.rb} +4 -5
- data/lib/repull/models/listing_publish_status_channel.rb +32 -1
- data/lib/repull/models/listing_publish_status_connection.rb +17 -5
- data/lib/repull/models/listing_publish_status_response.rb +13 -1
- data/lib/repull/models/listing_reactivated_event.rb +281 -0
- data/lib/repull/models/listing_suspended_event.rb +281 -0
- data/lib/repull/models/listing_suspension_payload.rb +202 -0
- data/lib/repull/models/listing_updated_event.rb +95 -31
- data/lib/repull/models/listing_updated_payload.rb +50 -22
- data/lib/repull/models/listing_webhook_object.rb +291 -0
- data/lib/repull/models/listing_webhook_object_address.rb +168 -0
- data/lib/repull/models/listing_webhook_object_channels_inner.rb +184 -0
- data/lib/repull/models/message.rb +1 -0
- data/lib/repull/models/payment_completed_event.rb +95 -31
- data/lib/repull/models/payment_completed_payload.rb +46 -44
- data/lib/repull/models/payment_refunded_event.rb +95 -31
- data/lib/repull/models/payment_refunded_payload.rb +46 -44
- data/lib/repull/models/payment_webhook_object.rb +351 -0
- data/lib/repull/models/preapprove_conversation201_response.rb +253 -0
- data/lib/repull/models/preapprove_conversation_request.rb +150 -0
- data/lib/repull/models/replay_webhook_delivery_request.rb +150 -0
- data/lib/repull/models/repull_ping_event.rb +95 -31
- data/lib/repull/models/reservation.rb +22 -2
- data/lib/repull/models/reservation_alteration_created_event.rb +95 -31
- data/lib/repull/models/reservation_alteration_responded_event.rb +95 -31
- data/lib/repull/models/reservation_cancelled_event.rb +95 -31
- data/lib/repull/models/reservation_created_event.rb +95 -32
- data/lib/repull/models/reservation_message_received_event.rb +95 -31
- data/lib/repull/models/reservation_message_received_payload.rb +17 -4
- data/lib/repull/models/reservation_request_created_event.rb +281 -0
- data/lib/repull/models/reservation_request_created_payload.rb +224 -0
- data/lib/repull/models/reservation_request_updated_event.rb +281 -0
- data/lib/repull/models/reservation_request_updated_payload.rb +251 -0
- data/lib/repull/models/reservation_updated_event.rb +95 -31
- data/lib/repull/models/review_created_event.rb +95 -31
- data/lib/repull/models/review_responded_event.rb +95 -31
- data/lib/repull/models/send_airbnb_message201_response.rb +104 -0
- data/lib/repull/models/send_airbnb_message_request.rb +4 -20
- data/lib/repull/models/send_message_attachment.rb +225 -0
- data/lib/repull/models/send_message_part.rb +201 -0
- data/lib/repull/models/send_message_request.rb +44 -19
- data/lib/repull/models/send_message_response.rb +29 -5
- data/lib/repull/models/sent_attachment.rb +196 -0
- data/lib/repull/models/usage_quota_warning_event.rb +281 -0
- data/lib/repull/models/usage_quota_warning_payload.rb +224 -0
- data/lib/repull/models/usage_quota_warning_payload_top_operation.rb +167 -0
- data/lib/repull/models/webhook_event.rb +17 -3
- data/lib/repull/models/webhook_event_account.rb +171 -0
- data/lib/repull/models/webhook_event_type.rb +8 -1
- data/lib/repull/models/withdraw_conversation_special_offer200_response.rb +240 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +71 -1
- data/openapi/v1.json +19706 -13248
- data/scripts/regen.sh +1 -1
- metadata +73 -3
|
@@ -14,23 +14,41 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# Inputs for `POST /v1/listings`.
|
|
17
|
+
# Inputs for `POST /v1/listings`. **Address requirements — read this before you build the payload.** Publishing to Airbnb runs a create preflight that refuses the listing outright if the address is incomplete, and the refusal only surfaces later, at publish time. Airbnb requires `street` and `city` for every country. For a **US** property it additionally requires `state` and `postalCode`. Crucially, **omitting `countryCode` makes the listing behave as US**, so a listing created without a country needs `state` and `postalCode` too. Send `countryCode` explicitly for a non-US property. `lat`/`lng` alone are not enough — Airbnb rejects coordinates that are not backed by a full postal address. Use `GET /v1/listings/{id}/publish-status` to see which parts are still missing before you attempt a publish.
|
|
18
18
|
class ListingCreateRequest < ApiModelBase
|
|
19
19
|
# Public guest-facing title
|
|
20
20
|
attr_accessor :name
|
|
21
21
|
|
|
22
22
|
attr_accessor :property_type
|
|
23
23
|
|
|
24
|
+
# What the guest actually gets. Airbnb refuses to activate a listing that has not stated one, answering \"Please specify a valid room type\" — which reads like a beds problem and is not. It is never defaulted: most listings are an entire home, but hundreds are a private or hotel room, and publishing one of those as an entire home is a false claim about someone's property. Settable later with `PUT /v1/listings/{id}/content` under `details`.
|
|
25
|
+
attr_accessor :room_type_category
|
|
26
|
+
|
|
27
|
+
# Airbnb's finer property-type category, when you know it. Optional.
|
|
28
|
+
attr_accessor :property_type_category
|
|
29
|
+
|
|
30
|
+
# Street address including the number. Required by Airbnb for every country — a publish is refused without it.
|
|
24
31
|
attr_accessor :street
|
|
25
32
|
|
|
33
|
+
# City / town. Required by Airbnb for every country — a publish is refused without it.
|
|
26
34
|
attr_accessor :city
|
|
27
35
|
|
|
36
|
+
# State, province or region. **Required for a US property**, and a listing with no `countryCode` counts as US. Optional elsewhere, but stored and used wherever the channel carries it.
|
|
28
37
|
attr_accessor :state
|
|
29
38
|
|
|
39
|
+
# Postal code — ZIP in the US, postcode in the UK, and so on. **Required for a US property**, and a listing with no `countryCode` counts as US. Send the complete code: Booking.com rejects a partial postcode such as `SW6` where the full value is `SW6 1EP`. Alias: `zipcode`.
|
|
40
|
+
attr_accessor :postal_code
|
|
41
|
+
|
|
42
|
+
# Alias for `postalCode`, accepted because it is the field name on the Airbnb mirror. `postalCode` wins if you send both. Prefer `postalCode` — the field holds non-US postcodes too.
|
|
43
|
+
attr_accessor :zipcode
|
|
44
|
+
|
|
45
|
+
# ISO-3166 alpha-2 country code. **Send this for any non-US property.** Omitting it does not mean \"unknown\" — the publish path treats a listing with no country as US, which then requires `state` and `postalCode` and will refuse the listing when they are absent.
|
|
30
46
|
attr_accessor :country_code
|
|
31
47
|
|
|
48
|
+
# Latitude. Useful for map search, but never a substitute for the postal address — Airbnb rejects coordinates it cannot reconcile with a full address.
|
|
32
49
|
attr_accessor :lat
|
|
33
50
|
|
|
51
|
+
# Longitude. See `lat`.
|
|
34
52
|
attr_accessor :lng
|
|
35
53
|
|
|
36
54
|
attr_accessor :bedrooms
|
|
@@ -68,9 +86,13 @@ module Repull
|
|
|
68
86
|
{
|
|
69
87
|
:'name' => :'name',
|
|
70
88
|
:'property_type' => :'propertyType',
|
|
89
|
+
:'room_type_category' => :'roomTypeCategory',
|
|
90
|
+
:'property_type_category' => :'propertyTypeCategory',
|
|
71
91
|
:'street' => :'street',
|
|
72
92
|
:'city' => :'city',
|
|
73
93
|
:'state' => :'state',
|
|
94
|
+
:'postal_code' => :'postalCode',
|
|
95
|
+
:'zipcode' => :'zipcode',
|
|
74
96
|
:'country_code' => :'countryCode',
|
|
75
97
|
:'lat' => :'lat',
|
|
76
98
|
:'lng' => :'lng',
|
|
@@ -107,9 +129,13 @@ module Repull
|
|
|
107
129
|
{
|
|
108
130
|
:'name' => :'String',
|
|
109
131
|
:'property_type' => :'String',
|
|
132
|
+
:'room_type_category' => :'String',
|
|
133
|
+
:'property_type_category' => :'String',
|
|
110
134
|
:'street' => :'String',
|
|
111
135
|
:'city' => :'String',
|
|
112
136
|
:'state' => :'String',
|
|
137
|
+
:'postal_code' => :'String',
|
|
138
|
+
:'zipcode' => :'String',
|
|
113
139
|
:'country_code' => :'String',
|
|
114
140
|
:'lat' => :'Float',
|
|
115
141
|
:'lng' => :'Float',
|
|
@@ -163,6 +189,14 @@ module Repull
|
|
|
163
189
|
self.property_type = attributes[:'property_type']
|
|
164
190
|
end
|
|
165
191
|
|
|
192
|
+
if attributes.key?(:'room_type_category')
|
|
193
|
+
self.room_type_category = attributes[:'room_type_category']
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'property_type_category')
|
|
197
|
+
self.property_type_category = attributes[:'property_type_category']
|
|
198
|
+
end
|
|
199
|
+
|
|
166
200
|
if attributes.key?(:'street')
|
|
167
201
|
self.street = attributes[:'street']
|
|
168
202
|
end
|
|
@@ -175,6 +209,14 @@ module Repull
|
|
|
175
209
|
self.state = attributes[:'state']
|
|
176
210
|
end
|
|
177
211
|
|
|
212
|
+
if attributes.key?(:'postal_code')
|
|
213
|
+
self.postal_code = attributes[:'postal_code']
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'zipcode')
|
|
217
|
+
self.zipcode = attributes[:'zipcode']
|
|
218
|
+
end
|
|
219
|
+
|
|
178
220
|
if attributes.key?(:'country_code')
|
|
179
221
|
self.country_code = attributes[:'country_code']
|
|
180
222
|
end
|
|
@@ -285,9 +327,13 @@ module Repull
|
|
|
285
327
|
self.class == o.class &&
|
|
286
328
|
name == o.name &&
|
|
287
329
|
property_type == o.property_type &&
|
|
330
|
+
room_type_category == o.room_type_category &&
|
|
331
|
+
property_type_category == o.property_type_category &&
|
|
288
332
|
street == o.street &&
|
|
289
333
|
city == o.city &&
|
|
290
334
|
state == o.state &&
|
|
335
|
+
postal_code == o.postal_code &&
|
|
336
|
+
zipcode == o.zipcode &&
|
|
291
337
|
country_code == o.country_code &&
|
|
292
338
|
lat == o.lat &&
|
|
293
339
|
lng == o.lng &&
|
|
@@ -317,7 +363,7 @@ module Repull
|
|
|
317
363
|
# Calculates hash code according to all attributes.
|
|
318
364
|
# @return [Integer] Hash code
|
|
319
365
|
def hash
|
|
320
|
-
[name, property_type, street, city, state, country_code, lat, lng, bedrooms, bathrooms, beds, person_capacity, summary, description, default_daily_price, cleaning_fee, cancellation_policy, check_in_time_start, check_out_time, allows_pets, allows_smoking, allows_children, allows_events].hash
|
|
366
|
+
[name, property_type, room_type_category, property_type_category, street, city, state, postal_code, zipcode, country_code, lat, lng, bedrooms, bathrooms, beds, person_capacity, summary, description, default_daily_price, cleaning_fee, cancellation_policy, check_in_time_start, check_out_time, allows_pets, allows_smoking, allows_children, allows_events].hash
|
|
321
367
|
end
|
|
322
368
|
|
|
323
369
|
# Builds the object from hash
|
|
@@ -15,23 +15,29 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
17
|
class ListingCreatedEvent < ApiModelBase
|
|
18
|
-
|
|
18
|
+
# The event name. This field is `event`, not `type`.
|
|
19
|
+
attr_accessor :event
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
attr_accessor :created_at
|
|
21
|
+
# Stable across every delivery and replay of this logical event — dedupe on it.
|
|
22
|
+
attr_accessor :event_id
|
|
23
23
|
|
|
24
24
|
attr_accessor :api_version
|
|
25
25
|
|
|
26
|
+
# When this delivery was built.
|
|
27
|
+
attr_accessor :timestamp
|
|
28
|
+
|
|
29
|
+
attr_accessor :account
|
|
30
|
+
|
|
26
31
|
attr_accessor :data
|
|
27
32
|
|
|
28
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
34
|
def self.attribute_map
|
|
30
35
|
{
|
|
31
|
-
:'
|
|
32
|
-
:'
|
|
33
|
-
:'created_at' => :'createdAt',
|
|
36
|
+
:'event' => :'event',
|
|
37
|
+
:'event_id' => :'eventId',
|
|
34
38
|
:'api_version' => :'apiVersion',
|
|
39
|
+
:'timestamp' => :'timestamp',
|
|
40
|
+
:'account' => :'account',
|
|
35
41
|
:'data' => :'data'
|
|
36
42
|
}
|
|
37
43
|
end
|
|
@@ -49,10 +55,11 @@ module Repull
|
|
|
49
55
|
# Attribute type mapping.
|
|
50
56
|
def self.openapi_types
|
|
51
57
|
{
|
|
52
|
-
:'
|
|
53
|
-
:'
|
|
54
|
-
:'created_at' => :'Time',
|
|
58
|
+
:'event' => :'String',
|
|
59
|
+
:'event_id' => :'String',
|
|
55
60
|
:'api_version' => :'String',
|
|
61
|
+
:'timestamp' => :'Time',
|
|
62
|
+
:'account' => :'WebhookEventAccount',
|
|
56
63
|
:'data' => :'ListingCreatedPayload'
|
|
57
64
|
}
|
|
58
65
|
end
|
|
@@ -60,6 +67,7 @@ module Repull
|
|
|
60
67
|
# List of attributes with nullable: true
|
|
61
68
|
def self.openapi_nullable
|
|
62
69
|
Set.new([
|
|
70
|
+
:'account',
|
|
63
71
|
])
|
|
64
72
|
end
|
|
65
73
|
|
|
@@ -79,22 +87,32 @@ module Repull
|
|
|
79
87
|
h[k.to_sym] = v
|
|
80
88
|
}
|
|
81
89
|
|
|
82
|
-
if attributes.key?(:'
|
|
83
|
-
self.
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
if attributes.key?(:'type')
|
|
87
|
-
self.type = attributes[:'type']
|
|
90
|
+
if attributes.key?(:'event')
|
|
91
|
+
self.event = attributes[:'event']
|
|
88
92
|
else
|
|
89
|
-
self.
|
|
93
|
+
self.event = nil
|
|
90
94
|
end
|
|
91
95
|
|
|
92
|
-
if attributes.key?(:'
|
|
93
|
-
self.
|
|
96
|
+
if attributes.key?(:'event_id')
|
|
97
|
+
self.event_id = attributes[:'event_id']
|
|
98
|
+
else
|
|
99
|
+
self.event_id = nil
|
|
94
100
|
end
|
|
95
101
|
|
|
96
102
|
if attributes.key?(:'api_version')
|
|
97
103
|
self.api_version = attributes[:'api_version']
|
|
104
|
+
else
|
|
105
|
+
self.api_version = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'timestamp')
|
|
109
|
+
self.timestamp = attributes[:'timestamp']
|
|
110
|
+
else
|
|
111
|
+
self.timestamp = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'account')
|
|
115
|
+
self.account = attributes[:'account']
|
|
98
116
|
end
|
|
99
117
|
|
|
100
118
|
if attributes.key?(:'data')
|
|
@@ -109,8 +127,20 @@ module Repull
|
|
|
109
127
|
def list_invalid_properties
|
|
110
128
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
129
|
invalid_properties = Array.new
|
|
112
|
-
if @
|
|
113
|
-
invalid_properties.push('invalid value for "
|
|
130
|
+
if @event.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @event_id.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @api_version.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @timestamp.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
114
144
|
end
|
|
115
145
|
|
|
116
146
|
if @data.nil?
|
|
@@ -124,19 +154,52 @@ module Repull
|
|
|
124
154
|
# @return true if the model is valid
|
|
125
155
|
def valid?
|
|
126
156
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
|
-
return false if @
|
|
157
|
+
return false if @event.nil?
|
|
158
|
+
return false if @event_id.nil?
|
|
159
|
+
return false if @api_version.nil?
|
|
160
|
+
return false if @timestamp.nil?
|
|
128
161
|
return false if @data.nil?
|
|
129
162
|
true
|
|
130
163
|
end
|
|
131
164
|
|
|
132
165
|
# Custom attribute writer method with validation
|
|
133
|
-
# @param [Object]
|
|
134
|
-
def
|
|
135
|
-
if
|
|
136
|
-
fail ArgumentError, '
|
|
166
|
+
# @param [Object] event Value to be assigned
|
|
167
|
+
def event=(event)
|
|
168
|
+
if event.nil?
|
|
169
|
+
fail ArgumentError, 'event cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@event = event
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] event_id Value to be assigned
|
|
177
|
+
def event_id=(event_id)
|
|
178
|
+
if event_id.nil?
|
|
179
|
+
fail ArgumentError, 'event_id cannot be nil'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@event_id = event_id
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] api_version Value to be assigned
|
|
187
|
+
def api_version=(api_version)
|
|
188
|
+
if api_version.nil?
|
|
189
|
+
fail ArgumentError, 'api_version cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@api_version = api_version
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Custom attribute writer method with validation
|
|
196
|
+
# @param [Object] timestamp Value to be assigned
|
|
197
|
+
def timestamp=(timestamp)
|
|
198
|
+
if timestamp.nil?
|
|
199
|
+
fail ArgumentError, 'timestamp cannot be nil'
|
|
137
200
|
end
|
|
138
201
|
|
|
139
|
-
@
|
|
202
|
+
@timestamp = timestamp
|
|
140
203
|
end
|
|
141
204
|
|
|
142
205
|
# Custom attribute writer method with validation
|
|
@@ -154,10 +217,11 @@ module Repull
|
|
|
154
217
|
def ==(o)
|
|
155
218
|
return true if self.equal?(o)
|
|
156
219
|
self.class == o.class &&
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
created_at == o.created_at &&
|
|
220
|
+
event == o.event &&
|
|
221
|
+
event_id == o.event_id &&
|
|
160
222
|
api_version == o.api_version &&
|
|
223
|
+
timestamp == o.timestamp &&
|
|
224
|
+
account == o.account &&
|
|
161
225
|
data == o.data
|
|
162
226
|
end
|
|
163
227
|
|
|
@@ -170,7 +234,7 @@ module Repull
|
|
|
170
234
|
# Calculates hash code according to all attributes.
|
|
171
235
|
# @return [Integer] Hash code
|
|
172
236
|
def hash
|
|
173
|
-
[
|
|
237
|
+
[event, event_id, api_version, timestamp, account, data].hash
|
|
174
238
|
end
|
|
175
239
|
|
|
176
240
|
# Builds the object from hash
|
|
@@ -15,23 +15,29 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
17
|
class ListingDeletedEvent < ApiModelBase
|
|
18
|
-
|
|
18
|
+
# The event name. This field is `event`, not `type`.
|
|
19
|
+
attr_accessor :event
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
attr_accessor :created_at
|
|
21
|
+
# Stable across every delivery and replay of this logical event — dedupe on it.
|
|
22
|
+
attr_accessor :event_id
|
|
23
23
|
|
|
24
24
|
attr_accessor :api_version
|
|
25
25
|
|
|
26
|
+
# When this delivery was built.
|
|
27
|
+
attr_accessor :timestamp
|
|
28
|
+
|
|
29
|
+
attr_accessor :account
|
|
30
|
+
|
|
26
31
|
attr_accessor :data
|
|
27
32
|
|
|
28
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
34
|
def self.attribute_map
|
|
30
35
|
{
|
|
31
|
-
:'
|
|
32
|
-
:'
|
|
33
|
-
:'created_at' => :'createdAt',
|
|
36
|
+
:'event' => :'event',
|
|
37
|
+
:'event_id' => :'eventId',
|
|
34
38
|
:'api_version' => :'apiVersion',
|
|
39
|
+
:'timestamp' => :'timestamp',
|
|
40
|
+
:'account' => :'account',
|
|
35
41
|
:'data' => :'data'
|
|
36
42
|
}
|
|
37
43
|
end
|
|
@@ -49,10 +55,11 @@ module Repull
|
|
|
49
55
|
# Attribute type mapping.
|
|
50
56
|
def self.openapi_types
|
|
51
57
|
{
|
|
52
|
-
:'
|
|
53
|
-
:'
|
|
54
|
-
:'created_at' => :'Time',
|
|
58
|
+
:'event' => :'String',
|
|
59
|
+
:'event_id' => :'String',
|
|
55
60
|
:'api_version' => :'String',
|
|
61
|
+
:'timestamp' => :'Time',
|
|
62
|
+
:'account' => :'WebhookEventAccount',
|
|
56
63
|
:'data' => :'ListingDeletedPayload'
|
|
57
64
|
}
|
|
58
65
|
end
|
|
@@ -60,6 +67,7 @@ module Repull
|
|
|
60
67
|
# List of attributes with nullable: true
|
|
61
68
|
def self.openapi_nullable
|
|
62
69
|
Set.new([
|
|
70
|
+
:'account',
|
|
63
71
|
])
|
|
64
72
|
end
|
|
65
73
|
|
|
@@ -79,22 +87,32 @@ module Repull
|
|
|
79
87
|
h[k.to_sym] = v
|
|
80
88
|
}
|
|
81
89
|
|
|
82
|
-
if attributes.key?(:'
|
|
83
|
-
self.
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
if attributes.key?(:'type')
|
|
87
|
-
self.type = attributes[:'type']
|
|
90
|
+
if attributes.key?(:'event')
|
|
91
|
+
self.event = attributes[:'event']
|
|
88
92
|
else
|
|
89
|
-
self.
|
|
93
|
+
self.event = nil
|
|
90
94
|
end
|
|
91
95
|
|
|
92
|
-
if attributes.key?(:'
|
|
93
|
-
self.
|
|
96
|
+
if attributes.key?(:'event_id')
|
|
97
|
+
self.event_id = attributes[:'event_id']
|
|
98
|
+
else
|
|
99
|
+
self.event_id = nil
|
|
94
100
|
end
|
|
95
101
|
|
|
96
102
|
if attributes.key?(:'api_version')
|
|
97
103
|
self.api_version = attributes[:'api_version']
|
|
104
|
+
else
|
|
105
|
+
self.api_version = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'timestamp')
|
|
109
|
+
self.timestamp = attributes[:'timestamp']
|
|
110
|
+
else
|
|
111
|
+
self.timestamp = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'account')
|
|
115
|
+
self.account = attributes[:'account']
|
|
98
116
|
end
|
|
99
117
|
|
|
100
118
|
if attributes.key?(:'data')
|
|
@@ -109,8 +127,20 @@ module Repull
|
|
|
109
127
|
def list_invalid_properties
|
|
110
128
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
129
|
invalid_properties = Array.new
|
|
112
|
-
if @
|
|
113
|
-
invalid_properties.push('invalid value for "
|
|
130
|
+
if @event.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @event_id.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @api_version.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @timestamp.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
114
144
|
end
|
|
115
145
|
|
|
116
146
|
if @data.nil?
|
|
@@ -124,19 +154,52 @@ module Repull
|
|
|
124
154
|
# @return true if the model is valid
|
|
125
155
|
def valid?
|
|
126
156
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
|
-
return false if @
|
|
157
|
+
return false if @event.nil?
|
|
158
|
+
return false if @event_id.nil?
|
|
159
|
+
return false if @api_version.nil?
|
|
160
|
+
return false if @timestamp.nil?
|
|
128
161
|
return false if @data.nil?
|
|
129
162
|
true
|
|
130
163
|
end
|
|
131
164
|
|
|
132
165
|
# Custom attribute writer method with validation
|
|
133
|
-
# @param [Object]
|
|
134
|
-
def
|
|
135
|
-
if
|
|
136
|
-
fail ArgumentError, '
|
|
166
|
+
# @param [Object] event Value to be assigned
|
|
167
|
+
def event=(event)
|
|
168
|
+
if event.nil?
|
|
169
|
+
fail ArgumentError, 'event cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@event = event
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] event_id Value to be assigned
|
|
177
|
+
def event_id=(event_id)
|
|
178
|
+
if event_id.nil?
|
|
179
|
+
fail ArgumentError, 'event_id cannot be nil'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@event_id = event_id
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] api_version Value to be assigned
|
|
187
|
+
def api_version=(api_version)
|
|
188
|
+
if api_version.nil?
|
|
189
|
+
fail ArgumentError, 'api_version cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@api_version = api_version
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Custom attribute writer method with validation
|
|
196
|
+
# @param [Object] timestamp Value to be assigned
|
|
197
|
+
def timestamp=(timestamp)
|
|
198
|
+
if timestamp.nil?
|
|
199
|
+
fail ArgumentError, 'timestamp cannot be nil'
|
|
137
200
|
end
|
|
138
201
|
|
|
139
|
-
@
|
|
202
|
+
@timestamp = timestamp
|
|
140
203
|
end
|
|
141
204
|
|
|
142
205
|
# Custom attribute writer method with validation
|
|
@@ -154,10 +217,11 @@ module Repull
|
|
|
154
217
|
def ==(o)
|
|
155
218
|
return true if self.equal?(o)
|
|
156
219
|
self.class == o.class &&
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
created_at == o.created_at &&
|
|
220
|
+
event == o.event &&
|
|
221
|
+
event_id == o.event_id &&
|
|
160
222
|
api_version == o.api_version &&
|
|
223
|
+
timestamp == o.timestamp &&
|
|
224
|
+
account == o.account &&
|
|
161
225
|
data == o.data
|
|
162
226
|
end
|
|
163
227
|
|
|
@@ -170,7 +234,7 @@ module Repull
|
|
|
170
234
|
# Calculates hash code according to all attributes.
|
|
171
235
|
# @return [Integer] Hash code
|
|
172
236
|
def hash
|
|
173
|
-
[
|
|
237
|
+
[event, event_id, api_version, timestamp, account, data].hash
|
|
174
238
|
end
|
|
175
239
|
|
|
176
240
|
# Builds the object from hash
|
|
@@ -14,20 +14,20 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# Payload for `listing.deleted`.
|
|
17
|
+
# Payload for `listing.deleted`. The listing is no longer reachable on the channel — usually because the host unlinked it.
|
|
18
18
|
class ListingDeletedPayload < ApiModelBase
|
|
19
|
-
attr_accessor :
|
|
20
|
-
|
|
21
|
-
attr_accessor :deleted_at
|
|
19
|
+
attr_accessor :object
|
|
22
20
|
|
|
23
21
|
attr_accessor :reason
|
|
24
22
|
|
|
23
|
+
attr_accessor :deleted_at
|
|
24
|
+
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
26
|
def self.attribute_map
|
|
27
27
|
{
|
|
28
|
-
:'
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
28
|
+
:'object' => :'object',
|
|
29
|
+
:'reason' => :'reason',
|
|
30
|
+
:'deleted_at' => :'deletedAt'
|
|
31
31
|
}
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -44,16 +44,16 @@ module Repull
|
|
|
44
44
|
# Attribute type mapping.
|
|
45
45
|
def self.openapi_types
|
|
46
46
|
{
|
|
47
|
-
:'
|
|
48
|
-
:'
|
|
49
|
-
:'
|
|
47
|
+
:'object' => :'ListingWebhookObject',
|
|
48
|
+
:'reason' => :'String',
|
|
49
|
+
:'deleted_at' => :'Time'
|
|
50
50
|
}
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
# List of attributes with nullable: true
|
|
54
54
|
def self.openapi_nullable
|
|
55
55
|
Set.new([
|
|
56
|
-
:'reason'
|
|
56
|
+
:'reason',
|
|
57
57
|
])
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -73,17 +73,21 @@ module Repull
|
|
|
73
73
|
h[k.to_sym] = v
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
if attributes.key?(:'
|
|
77
|
-
self.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if attributes.key?(:'deleted_at')
|
|
81
|
-
self.deleted_at = attributes[:'deleted_at']
|
|
76
|
+
if attributes.key?(:'object')
|
|
77
|
+
self.object = attributes[:'object']
|
|
78
|
+
else
|
|
79
|
+
self.object = nil
|
|
82
80
|
end
|
|
83
81
|
|
|
84
82
|
if attributes.key?(:'reason')
|
|
85
83
|
self.reason = attributes[:'reason']
|
|
86
84
|
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'deleted_at')
|
|
87
|
+
self.deleted_at = attributes[:'deleted_at']
|
|
88
|
+
else
|
|
89
|
+
self.deleted_at = nil
|
|
90
|
+
end
|
|
87
91
|
end
|
|
88
92
|
|
|
89
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -91,6 +95,14 @@ module Repull
|
|
|
91
95
|
def list_invalid_properties
|
|
92
96
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
93
97
|
invalid_properties = Array.new
|
|
98
|
+
if @object.nil?
|
|
99
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @deleted_at.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "deleted_at", deleted_at cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
94
106
|
invalid_properties
|
|
95
107
|
end
|
|
96
108
|
|
|
@@ -98,17 +110,39 @@ module Repull
|
|
|
98
110
|
# @return true if the model is valid
|
|
99
111
|
def valid?
|
|
100
112
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
return false if @object.nil?
|
|
114
|
+
return false if @deleted_at.nil?
|
|
101
115
|
true
|
|
102
116
|
end
|
|
103
117
|
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] object Value to be assigned
|
|
120
|
+
def object=(object)
|
|
121
|
+
if object.nil?
|
|
122
|
+
fail ArgumentError, 'object cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@object = object
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] deleted_at Value to be assigned
|
|
130
|
+
def deleted_at=(deleted_at)
|
|
131
|
+
if deleted_at.nil?
|
|
132
|
+
fail ArgumentError, 'deleted_at cannot be nil'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@deleted_at = deleted_at
|
|
136
|
+
end
|
|
137
|
+
|
|
104
138
|
# Checks equality by comparing each attribute.
|
|
105
139
|
# @param [Object] Object to be compared
|
|
106
140
|
def ==(o)
|
|
107
141
|
return true if self.equal?(o)
|
|
108
142
|
self.class == o.class &&
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
143
|
+
object == o.object &&
|
|
144
|
+
reason == o.reason &&
|
|
145
|
+
deleted_at == o.deleted_at
|
|
112
146
|
end
|
|
113
147
|
|
|
114
148
|
# @see the `==` method
|
|
@@ -120,7 +154,7 @@ module Repull
|
|
|
120
154
|
# Calculates hash code according to all attributes.
|
|
121
155
|
# @return [Integer] Hash code
|
|
122
156
|
def hash
|
|
123
|
-
[
|
|
157
|
+
[object, reason, deleted_at].hash
|
|
124
158
|
end
|
|
125
159
|
|
|
126
160
|
# Builds the object from hash
|