Skip to content

Commit

Permalink
Stripe::Charge updates (#30)
Browse files Browse the repository at this point in the history
* Updates

* Code review (typos + comments)

* Removed quantity getter in Stripe::Subscription (#28)

* Bump actions/cache from 2.1.5 to 2.1.6 (#29)

* Adds Stripe::File and Stripe::FileLink (#32)

* file + file_link classes

* Add retrieve methods and specs

* Readme update

* Adds Stripe::Account (#31)

* Stripe::Account class. Needs to be reviewed for nillable types

* WIP - refactoring Address

* Complete Account object

* Added working spec

* Merge Adress and AdressJP

* Adds Event object and Webhook class (#26)

* Adds Event object + spec

* WIP - Adding Webhook class / methods / specs

* WIP - needs proper new  Error objects

* Webhook methods tested and updated.

* Fixed ameba style verbose warning in webhook

* WIP on macroization

* cleanup

* webhook security specs

* Better event spec + previous_attributes field

* Added annotations + respective macros

* Stripe::Account union fields

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
rmarronnier and dependabot[bot] authored Jul 11, 2021
1 parent 10b5f16 commit 6b192df
Showing 1 changed file with 33 additions and 9 deletions.
42 changes: 33 additions & 9 deletions src/stripe/objects/core/charge.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class Stripe::Charge

enum UserReport
Safe
Fraudlent
Fraudulent
end

enum StripeReport
Fraudlent
Fraudulent
end

@[JSON::Field(converter: Enum::StringConverter(Stripe::Charge::FraudDetails::UserReport))]
Expand Down Expand Up @@ -79,44 +79,68 @@ class Stripe::Charge

getter id : String
getter amount : Int32
getter amount_captured : Int32?
getter amount_refunded : Int32
getter application : String?
getter application_fee : String?
getter balance_transaction : String?
getter application_fee_amount : Int32?
getter balance_transaction : String? # | Stripe::BalanceTransaction

class BillingDetails
include JSON::Serializable

getter address : Stripe::Address?
getter email : String?
getter name : String?
getter phone : String?
end

getter billing_details : BillingDetails?

getter captured : Bool?

@[JSON::Field(converter: Time::EpochConverter)]
getter created : Time

getter currency : String
getter customer : String?
getter customer : String? | Stripe::Customer?
getter description : String?
getter destination : String?
getter dispute : String?
getter failure_code : String?
getter failure_message : String?
getter fraud_details : FraudDetails?
getter invoice : String?
getter invoice : String? | Stripe::Invoice?
getter livemode : Bool
getter metadata : Hash(String, String)?
getter on_behalf_of : String?
getter order : String?
getter on_behalf_of : String? | Stripe::Account?
getter order : String? # | Stripe::Order
getter outcome : Outcome?
getter paid : Bool?
getter payment_intent : String?
getter receipt_email : String?
getter receipt_url : String?
getter receipt_number : String?
getter refunded : Bool
getter refunds : List(Refund)
getter review : String?
getter shipping : Shipping?
getter source : PaymentMethods::Card
getter source_transfer : String?
getter source_transfer : String? | Stripe::Account?
getter statement_descriptor : String?
getter statement_descriptor_suffix : String?

@[JSON::Field(converter: Enum::StringConverter(Stripe::Charge::Status))]
getter status : Status

getter transfer : String?
getter transfer : String? | Stripe::Account?

class TransferData
include JSON::Serializable
getter amount : Int32?
getter destination : String? | Stripe::Account?
end

getter transfer_data : TransferData?
getter transfer_group : String?
end

0 comments on commit 6b192df

Please sign in to comment.