Skip to content

Commit 62c2920

Browse files
committed
feat: add use type to necessary resources
1 parent a06d5d8 commit 62c2920

25 files changed

+1229
-225
lines changed

README copy.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

__tests__/Integration/SelfMailer.spec.rb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
@selfMailerEditable = SelfMailerEditable.new({
3030
to: addr,
3131
inside: TestFixtures.FILE_LOCATION_6X18,
32-
outside: TestFixtures.FILE_LOCATION_6X18
32+
outside: TestFixtures.FILE_LOCATION_6X18,
33+
use_type: SfmUseType::MARKETING
3334
})
3435
end
3536

@@ -82,7 +83,8 @@
8283
selfMailerEditable = SelfMailerEditable.new({
8384
to: addr,
8485
inside: TestFixtures.FILE_LOCATION_6X18,
85-
outside: TestFixtures.FILE_LOCATION_6X18
86+
outside: TestFixtures.FILE_LOCATION_6X18,
87+
use_type: SfmUseType::MARKETING
8688
})
8789

8890
response = @selfMailerApi.create(selfMailerEditable)
@@ -118,19 +120,22 @@
118120
selfMailerEditable1 = SelfMailerEditable.new({
119121
to: addr,
120122
inside: TestFixtures.FILE_LOCATION_6X18,
121-
outside: TestFixtures.FILE_LOCATION_6X18
123+
outside: TestFixtures.FILE_LOCATION_6X18,
124+
use_type: SfmUseType::MARKETING
122125
})
123126

124127
selfMailerEditable2 = SelfMailerEditable.new({
125128
to: addr,
126129
inside: TestFixtures.FILE_LOCATION_6X18,
127-
outside: TestFixtures.FILE_LOCATION_6X18
130+
outside: TestFixtures.FILE_LOCATION_6X18,
131+
use_type: SfmUseType::MARKETING
128132
})
129133

130134
selfMailerEditable3 = SelfMailerEditable.new({
131135
to: addr,
132136
inside: TestFixtures.FILE_LOCATION_6X18,
133-
outside: TestFixtures.FILE_LOCATION_6X18
137+
outside: TestFixtures.FILE_LOCATION_6X18,
138+
use_type: SfmUseType::MARKETING
134139
})
135140

136141
response1 = @selfMailerApi.create(selfMailerEditable1)
@@ -247,7 +252,8 @@
247252
selfMailerEditable = SelfMailerEditable.new({
248253
to: addr,
249254
inside: TestFixtures.FILE_LOCATION_6X18,
250-
outside: TestFixtures.FILE_LOCATION_6X18
255+
outside: TestFixtures.FILE_LOCATION_6X18,
256+
use_type: SfmUseType::MARKETING
251257
})
252258

253259
response = @selfMailerApi.create(selfMailerEditable)

lib/openapi_client.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
require 'openapi_client/models/check_deletion'
6161
require 'openapi_client/models/check_editable'
6262
require 'openapi_client/models/check_list'
63+
require 'openapi_client/models/chk_use_type'
6364
require 'openapi_client/models/cmp_schedule_type'
6465
require 'openapi_client/models/cmp_use_type'
6566
require 'openapi_client/models/country_extended'
@@ -100,11 +101,13 @@
100101
require 'openapi_client/models/lob_error'
101102
require 'openapi_client/models/location'
102103
require 'openapi_client/models/location_analysis'
104+
require 'openapi_client/models/ltr_use_type'
103105
require 'openapi_client/models/mail_type'
104106
require 'openapi_client/models/multi_line_address'
105107
require 'openapi_client/models/multiple_components'
106108
require 'openapi_client/models/multiple_components_intl'
107109
require 'openapi_client/models/multiple_components_list'
110+
require 'openapi_client/models/optional_address_column_mapping'
108111
require 'openapi_client/models/placeholder_model'
109112
require 'openapi_client/models/postcard'
110113
require 'openapi_client/models/postcard_deletion'
@@ -113,14 +116,17 @@
113116
require 'openapi_client/models/postcard_editable'
114117
require 'openapi_client/models/postcard_list'
115118
require 'openapi_client/models/postcard_size'
119+
require 'openapi_client/models/psc_use_type'
116120
require 'openapi_client/models/qr_code'
121+
require 'openapi_client/models/required_address_column_mapping'
117122
require 'openapi_client/models/return_envelope'
118123
require 'openapi_client/models/reverse_geocode'
119124
require 'openapi_client/models/self_mailer'
120125
require 'openapi_client/models/self_mailer_deletion'
121126
require 'openapi_client/models/self_mailer_editable'
122127
require 'openapi_client/models/self_mailer_list'
123128
require 'openapi_client/models/self_mailer_size'
129+
require 'openapi_client/models/sfm_use_type'
124130
require 'openapi_client/models/sort_by'
125131
require 'openapi_client/models/sort_by1'
126132
require 'openapi_client/models/sort_by2'
@@ -147,6 +153,7 @@
147153
require 'openapi_client/models/upload_state'
148154
require 'openapi_client/models/upload_updatable'
149155
require 'openapi_client/models/upload_writable'
156+
require 'openapi_client/models/uploads_metadata'
150157
require 'openapi_client/models/us_autocompletions'
151158
require 'openapi_client/models/us_autocompletions_writable'
152159
require 'openapi_client/models/us_components'
@@ -186,10 +193,10 @@
186193
require 'openapi_client/api/us_verifications_api'
187194
require 'openapi_client/api/zip_lookups_api'
188195

189-
module Lob
196+
module OpenapiClient
190197
class << self
191198
# Customize default settings for the SDK using block.
192-
# Lob.configure do |config|
199+
# OpenapiClient.configure do |config|
193200
# config.username = "xxx"
194201
# config.password = "xxx"
195202
# end

lib/openapi_client/models/check.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class Check
8787
# Only returned if the resource has been successfully deleted.
8888
attr_accessor :deleted
8989

90+
attr_accessor :use_type
91+
9092
class EnumAttributeValidator
9193
attr_reader :datatype
9294
attr_reader :allowable_values
@@ -137,7 +139,8 @@ def self.attribute_map
137139
:'object' => :'object',
138140
:'date_created' => :'date_created',
139141
:'date_modified' => :'date_modified',
140-
:'deleted' => :'deleted'
142+
:'deleted' => :'deleted',
143+
:'use_type' => :'use_type'
141144
}
142145
end
143146

@@ -174,7 +177,8 @@ def self.openapi_types
174177
:'object' => :'String',
175178
:'date_created' => :'Time',
176179
:'date_modified' => :'Time',
177-
:'deleted' => :'Boolean'
180+
:'deleted' => :'Boolean',
181+
:'use_type' => :'ChkUseType'
178182
}
179183
end
180184

@@ -185,6 +189,7 @@ def self.openapi_nullable
185189
:'merge_variables',
186190
:'memo',
187191
:'tracking_events',
192+
:'use_type'
188193
])
189194
end
190195

@@ -318,6 +323,10 @@ def initialize(attributes = {})
318323
if attributes.key?(:'deleted')
319324
self.deleted = attributes[:'deleted']
320325
end
326+
327+
if attributes.key?(:'use_type')
328+
self.use_type = attributes[:'use_type']
329+
end
321330
end
322331

323332
# Show invalid properties with the reasons. Usually used together with valid?
@@ -654,7 +663,8 @@ def ==(o)
654663
object == o.object &&
655664
date_created == o.date_created &&
656665
date_modified == o.date_modified &&
657-
deleted == o.deleted
666+
deleted == o.deleted &&
667+
use_type == o.use_type
658668
end
659669

660670
# @see the `==` method
@@ -666,7 +676,7 @@ def eql?(o)
666676
# Calculates hash code according to all attributes.
667677
# @return [Integer] Hash code
668678
def hash
669-
[id, to, from, description, metadata, merge_variables, send_date, mail_type, memo, check_number, message, amount, bank_account, check_bottom_template_id, attachment_template_id, check_bottom_template_version_id, attachment_template_version_id, url, carrier, thumbnails, expected_delivery_date, tracking_events, object, date_created, date_modified, deleted].hash
679+
[id, to, from, description, metadata, merge_variables, send_date, mail_type, memo, check_number, message, amount, bank_account, check_bottom_template_id, attachment_template_id, check_bottom_template_version_id, attachment_template_version_id, url, carrier, thumbnails, expected_delivery_date, tracking_events, object, date_created, date_modified, deleted, use_type].hash
670680
end
671681

672682

lib/openapi_client/models/check_editable.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ class CheckEditable
6262
# An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See [Billing Group API](https://lob.github.io/lob-openapi/#tag/Billing-Groups) for more information.
6363
attr_accessor :billing_group_id
6464

65+
attr_accessor :use_type
66+
6567
class EnumAttributeValidator
6668
attr_reader :datatype
6769
attr_reader :allowable_values
@@ -102,7 +104,8 @@ def self.attribute_map
102104
:'memo' => :'memo',
103105
:'check_number' => :'check_number',
104106
:'message' => :'message',
105-
:'billing_group_id' => :'billing_group_id'
107+
:'billing_group_id' => :'billing_group_id',
108+
:'use_type' => :'use_type'
106109
}
107110
end
108111

@@ -129,7 +132,8 @@ def self.openapi_types
129132
:'memo' => :'String',
130133
:'check_number' => :'Integer',
131134
:'message' => :'String',
132-
:'billing_group_id' => :'String'
135+
:'billing_group_id' => :'String',
136+
:'use_type' => :'ChkUseType'
133137
}
134138
end
135139

@@ -142,6 +146,7 @@ def self.openapi_nullable
142146
:'description',
143147
:'merge_variables',
144148
:'memo',
149+
:'use_type'
145150
])
146151
end
147152

@@ -227,6 +232,10 @@ def initialize(attributes = {})
227232
if attributes.key?(:'billing_group_id')
228233
self.billing_group_id = attributes[:'billing_group_id']
229234
end
235+
236+
if attributes.key?(:'use_type')
237+
self.use_type = attributes[:'use_type']
238+
end
230239
end
231240

232241
# Show invalid properties with the reasons. Usually used together with valid?
@@ -379,7 +388,8 @@ def ==(o)
379388
memo == o.memo &&
380389
check_number == o.check_number &&
381390
message == o.message &&
382-
billing_group_id == o.billing_group_id
391+
billing_group_id == o.billing_group_id &&
392+
use_type == o.use_type
383393
end
384394

385395
# @see the `==` method
@@ -391,7 +401,7 @@ def eql?(o)
391401
# Calculates hash code according to all attributes.
392402
# @return [Integer] Hash code
393403
def hash
394-
[from, to, bank_account, amount, logo, check_bottom, attachment, description, metadata, merge_variables, send_date, mail_type, memo, check_number, message, billing_group_id].hash
404+
[from, to, bank_account, amount, logo, check_bottom, attachment, description, metadata, merge_variables, send_date, mail_type, memo, check_number, message, billing_group_id, use_type].hash
395405
end
396406

397407

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
=begin
2+
#Lob
3+
4+
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
5+
6+
The version of the OpenAPI document: 1.3.0
7+
8+
Generated by: https://openapi-generator.tech
9+
OpenAPI Generator version: 5.2.1
10+
11+
=end
12+
13+
require 'date'
14+
require 'time'
15+
16+
module Lob
17+
class ChkUseType
18+
MARKETING = "marketing".freeze
19+
OPERATIONAL = "operational".freeze
20+
NULL = "null".freeze
21+
22+
# Builds the enum from string
23+
# @param [String] The enum value in the form of the string
24+
# @return [String] The enum value
25+
def self.build_from_hash(value)
26+
new.build_from_hash(value)
27+
end
28+
29+
# Builds the enum from string
30+
# @param [String] The enum value in the form of the string
31+
# @return [String] The enum value
32+
def build_from_hash(value)
33+
constantValues = ChkUseType.constants.select { |c| ChkUseType::const_get(c) == value }
34+
raise "Invalid ENUM value #{value} for class #ChkUseType" if constantValues.empty?
35+
value
36+
end
37+
end
38+
end

lib/openapi_client/models/creative_writable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def self.openapi_types
9292
:'metadata' => :'Hash<String, String>',
9393
:'resource_type' => :'String',
9494
:'campaign_id' => :'String',
95-
:'details' => Array[:'LetterDetailsWritable', :'PostcardDetailsWritable'],
95+
:'details' => Array[:'PostcardDetailsWritable', :'String'],
9696
:'file' => :'String',
9797
:'front' => :'String',
9898
:'back' => :'String'

0 commit comments

Comments
 (0)